2007-03-11 Everaldo Canuto <everaldo@simios.org>
authorEveraldo Canuto <everaldo@mono-cvs.ximian.com>
Mon, 12 Mar 2007 02:16:06 +0000 (02:16 -0000)
committerEveraldo Canuto <everaldo@mono-cvs.ximian.com>
Mon, 12 Mar 2007 02:16:06 +0000 (02:16 -0000)
commit14dd699e4b818a32fa9c1604330d5e9f7df2b3fb
treec3c915cb20b2bb2fd6d9389e2fd842d9188079bb
parent4c100e7487da35d982571e0bda86ba0dea5d9d17
2007-03-11  Everaldo Canuto  <everaldo@simios.org>

* Theme.cs: GetLinkFont abstract method added.

* LinkLabel.cs:
- Remove CalcTrimRectangle, no longer needed.
- Factor also remove, position issues must be fixed in libgdiplus.
- Move GetPieceColor to ThemeWin32Classic.cs as it is theme related.
- GetPieceFont, CreateLinkFont and link_font removed, theme must be
care about font used to draw links.
- Set TabStop to true when control is "Selectable", control is selectable
when have one or more links. Fixes #80501 (test case is also added).
- Set the LinkArea values after links change, LinkArea values must be
based in first link position and size, a test case was created.
- Fix ControlStyles.Selectable value, now is based on LinkArea value,
the attribute must be true LinkArea.Length > 0. The same was applied to
TabStop.

* ThemeWin32Classic.cs:
- LinkLabelGetPieceColor and LinkLabelGetPieceFont created and used
in draw method.
- Use CPDrawStringDisabled to draw disabled text instead of hard code
color change.
- Draw focus rectangle for every parts focused, including parts that
is on another line, its because regions returns various rectangles
and not only one. Needed to mimic W32 look.
- Uses Graphics.Clip to delimite region painted, it mean that now
complete text is passed to DrawString, with this we solve layout
issues without create another text renderer.
- Uses Region.Intersect to fix some flickers problems, now only needed
parts will redrawed.
- This changes fixes #79614 and some other unreported issues, on Linux
some layout problems still remain, the problem is under
MeasureCharacterRanges but it is an libgdiplus bug.

svn path=/trunk/mcs/; revision=74082
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/LinkLabel.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/Theme.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs