[Mono-bugs] [Bug 599841] TabControl / TabPage Text and Image should be centered when SizeMode = Fixed

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon May 17 02:28:48 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=599841

http://bugzilla.novell.com/show_bug.cgi?id=599841#c15


--- Comment #15 from Thomas Goldstein <stifu at free.fr> 2010-05-17 06:28:47 UTC ---
>From my tests, it doesn't look right without it. Even more so since texts are
now vertically centered. Before, text / image used to move up and left for the
selected tab because the rectangle used to draw it was all-around larger. But
since it's now vertically centered, this means the text won't move vertically
anymore when you select a tab, only horizontally (and only if SizeMode !=
Fixed, as in Fixed mode, nothing will move due to the fact it's both vertically
and horizontally centered).

The code may look messy, but as I said above, maybe the cleanest way to do it
would have been to define 2 rectangles: one for the tab itself, which would
vary whether it's selected or not, and a sub-rectangle for the tab content,
which would always have the same size, but which would move up. I think the
code complexity comes from the fact we're using a single rectangle for
everything.

Anyway, thanks for having had a look at this, Carlos.

By the way, when you have some time, it'd be cool if you could have a look at
this other TabControl patch too:
https://bugzilla.novell.com/show_bug.cgi?id=515045#c8
I'm afraid it might get lost in the mess I made on that bug report. The patch
is pretty simple and straightforward, and it fixes one of my top pet bugs. :)
I don't mind filing that bug as a separate bug report, if you wish.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list