[Users] [Bug 3017] Privacy emblem positioning is broken

noreply at thewildbeast.co.uk noreply at thewildbeast.co.uk
Fri Oct 18 17:24:40 CEST 2013


http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3017

--- Comment #11 from Ian Nartowicz <mozilla at virginmedia.com> ---
That isn't what the code does though.

For example, the algorithm (in do_pix_draw) for positioning "right" is the
width of the base icon minus the width of the overlay icon plus twice the
border.  If you want to describe this as positioning towards the right, then it
is positioning towards the right by the width of the sensitive area (base icon
plus two borders) minus the width of the overlay icon.  Any sensible person
would call that positioning at the right side of the area, but call it what you
will.

To visualise easily, take an extreme case with a 100px base icon, a 1px overlay
icon, and a 10px border.  The origin (left side of the overlay icon) becomes
119px.  The icon is crammed against the edge of the right border.  Only when
the two icons are approximately the same size does the algorithm reduce to
overlaying towards the right by the border width.

End result, the emblem is not positioned where this algorithm intends,
apparently because the wrong height and width data is passed in.  Try it with a
tiny emblem and a huge base icon and it is immediately obvious that something
is wrong.  The emblem is positioned near the left when the algorithm intends it
to be positioned near the right.  Maybe you've convinced yourself that's what
you want, but it isn't what the code was written to do.  To position as you
describe does not require the height and widths of the two icons, only the
offset amount, which is the width of the border.

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Users mailing list