[Mono-bugs] [Bug 599950] New: TabControl / TabPage: default ItemSize is different from .NET

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Apr 27 02:58:47 EDT 2010


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

http://bugzilla.novell.com/show_bug.cgi?id=599950#c0


           Summary: TabControl / TabPage: default ItemSize is different
                    from .NET
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.6.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: stifu at free.fr
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.3)
Gecko/20100401 Firefox/3.6.3

I stumbled on this bug while investigating bug 599841, but so as not to
sidetrack that bug, I decided to post a new one for this specific issue.

See this screenshot: https://bugzilla.novell.com/attachment.cgi?id=356982

As you can see from this screenshot, the width of the SizeMode = Fixed tabs is
wrong with Mono, they're too narrow.
This is due to the fact the ItemSize property of the TabControl is not set,
which makes Mono use the default item size, and that's where the bug is: Mono
enforces the wrong default item size.

The problem lies in TabControlPainter (line 170):
defaultItemSize = new Size (42, 21);

When SizeMode = Normal, this bug doesn't appear, as the tab width is
automatically determined from the tab content.
However, when SizeMode = Fixed, then the default item size should be 96 * 19,
to match .NET. Or possibly 96 * 21, as 21 was the height enforced in the first
place. If set to 19, it becomes thinner than in .NET, although the same padding
is used... So I'm not sure where that 2px different comes from.

So, in the end, I guess doing this will do for now:

defaultItemSize = new Size (96, 21);

Reproducible: Always

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


More information about the mono-bugs mailing list