[scribus-dev] Review Request: Fix painting of overflow marker and move it to PageItem

Elvis Stansvik elvstone at gmail.com
Wed Jul 20 14:43:23 UTC 2011


Hi,

Since this change affects things outside of my project, I'm posting it
here for a quick review before I commit.

Description:

The painting of the overflow marker was wrong. The size of it was
calculated by multiplying by the zoom factor, resulting in the marker
growing huge at large zoom levels. The code probably intended to
_divide_ by the zoom factor so that the on screen size of the marker
stays constant at different zoom levels. The attached patch fixes
this. The behavior now is that at zoom levels >= 100%, the size of the
marker stays constant, and for zoom levels < 100%, it shrinks with the
zoom level. I also changed it to use QPointF and the new
drawLine(QPointF, QPointF) I've added to ScPainter.

Since I want to reuse this code for tables that overflows their frame,
I also moved the function up to PageItem. Another detail is that I
removed the function declaration of drawUnderflowMarker(...) from
PageItem_TextFrame. It had no implementation anywhere.

The attached screenshots shows the drawing of the marker at zoom
levels 25%, 50%, 100%, 200% and 400%.

Testing:

Tested that the marker still respects the Display->Color preferences
when the item is part of a set of linked text frames, a PDF
annotation, a PDF bookmark, a locked item and that the marker is red
when selected.

Cheers,
Elvis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-overflow-marker.diff
Type: text/x-patch
Size: 5465 bytes
Desc: not available
URL: <http://lists.scribus.net/pipermail/scribus-dev/attachments/20110720/c8cc4702/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 25.png
Type: image/png
Size: 2288 bytes
Desc: not available
URL: <http://lists.scribus.net/pipermail/scribus-dev/attachments/20110720/c8cc4702/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 50.png
Type: image/png
Size: 6123 bytes
Desc: not available
URL: <http://lists.scribus.net/pipermail/scribus-dev/attachments/20110720/c8cc4702/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 100.png
Type: image/png
Size: 16196 bytes
Desc: not available
URL: <http://lists.scribus.net/pipermail/scribus-dev/attachments/20110720/c8cc4702/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 200.png
Type: image/png
Size: 37664 bytes
Desc: not available
URL: <http://lists.scribus.net/pipermail/scribus-dev/attachments/20110720/c8cc4702/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 400.png
Type: image/png
Size: 76029 bytes
Desc: not available
URL: <http://lists.scribus.net/pipermail/scribus-dev/attachments/20110720/c8cc4702/attachment-0009.png>


More information about the scribus-dev mailing list