Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZoltan Varga <vargaz@gmail.com>2014-12-05 22:07:39 +0300
committerZoltan Varga <vargaz@gmail.com>2014-12-05 22:07:39 +0300
commitc49994e9042b4ed6620cd0a795821b669f2e7d45 (patch)
tree8d668f4524f254ddf76dd64ae6921a9e32a1e583 /mcs/class/Managed.Windows.Forms
parenta1ab4919b0abcd3685ca2e4c241a69301ab52cfe (diff)
parent3ae08e65b87072498343a53b91a0f61f578dc0d0 (diff)
Merge pull request #1442 from ermshiperete/TextOverlapsImage
[MWF] Fix problem when button text overlaps image
Diffstat (limited to 'mcs/class/Managed.Windows.Forms')
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
index 26edaf80995..7180bd30969 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
@@ -545,8 +545,11 @@ namespace System.Windows.Forms
var textHeight = excess_height >= 0 ? totalArea.Height - final_image_rect.Height : textSize.Height;
final_text_rect = new Rectangle (AlignInRectangle (totalArea, textSize, textAlign).Left, final_image_rect.Bottom + element_spacing, textSize.Width, textHeight);
- if (final_text_rect.Bottom > totalArea.Bottom)
- final_text_rect.Y = totalArea.Top;
+ if (final_text_rect.Bottom > totalArea.Bottom) {
+ final_text_rect.Y -= (final_text_rect.Bottom - totalArea.Bottom);
+ if (final_text_rect.Y < totalArea.Top)
+ final_text_rect.Y = totalArea.Top;
+ }
}
if (displayEllipsis) {