diff options
author | Carlos Alberto Cortez <calberto.cortez@gmail.com> | 2010-03-01 17:21:11 +0300 |
---|---|---|
committer | Carlos Alberto Cortez <calberto.cortez@gmail.com> | 2010-03-01 17:21:11 +0300 |
commit | 927660e1eab492a172745fba664317bf1f41eed6 (patch) | |
tree | 50d97f2f47413ba36e801ffdb9b39166d92f4501 /mcs | |
parent | a80553752efeca6dccd5f0f44878f5259bea9c99 (diff) |
2010-03-01 Carlos Alberto Cortez <calberto.cortez@gmail.com>
* ToolStripMenuItem.cs: Don't try to use SystemColors.MenuText if fore
color is SystemColors.ControlText, as this system color detection
should be done *completely*. This is specially important when
detecting colors in systems running Gtk+ and dark themes.
svn path=/branches/mono-2-6/mcs/; revision=152691
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog | 7 | ||||
-rw-r--r-- | mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs | 5 |
2 files changed, 10 insertions, 2 deletions
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog index e2c9792a9c1..9e0657f7c5e 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog @@ -1,3 +1,10 @@ +2010-03-01 Carlos Alberto Cortez <calberto.cortez@gmail.com> + + * ToolStripMenuItem.cs: Don't try to use SystemColors.MenuText if fore + color is SystemColors.ControlText, as this system color detection + should be done *completely*. This is specially important when + detecting colors in systems running Gtk+ and dark themes. + 2010-01-21 Carlos Alberto Cortez <calberto.cortez@gmail.com> * ComboBox.cs: When the normal drop down window is closed, make sure diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs index caa88fbe27f..de4a6ff17c5 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs @@ -344,8 +344,9 @@ namespace System.Windows.Forms // If DropDown.ShowImageMargin is false, we don't display the image Image draw_image = this.UseImageMargin ? this.Image : null; - // Figure out our text color - Color font_color = this.ForeColor == SystemColors.ControlText ? SystemColors.MenuText : this.ForeColor; + // Disable this color detection until we do the color detection for ToolStrip *completely* + // Color font_color = this.ForeColor == SystemColors.ControlText ? SystemColors.MenuText : this.ForeColor; + Color font_color = ForeColor; if ((this.Selected || this.Pressed) && this.IsOnDropDown && font_color == SystemColors.MenuText) font_color = SystemColors.HighlightText; |