From f412b5529e560bca594e0c29a47f32dcfb252820 Mon Sep 17 00:00:00 2001 From: Marek Habersack Date: Fri, 16 Oct 2015 21:39:29 +0200 Subject: [PATCH] [WinForms] ComboBox, ListBox and TextBox should use Control Foreground+Background They have been using Window Foreground+Background so far which make them unreadable on systms with dark themes. This change makes them behave. --- .../System.Windows.Forms/System.Windows.Forms/ComboBox.cs | 2 +- .../System.Windows.Forms/System.Windows.Forms/ListBox.cs | 2 +- .../System.Windows.Forms/System.Windows.Forms/TextBox.cs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/ComboBox.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/ComboBox.cs index fad6981b745..58a6f94bd3e 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/ComboBox.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/ComboBox.cs @@ -98,7 +98,7 @@ namespace System.Windows.Forms items = new ObjectCollection (this); DropDownStyle = ComboBoxStyle.DropDown; item_height = FontHeight + 2; - background_color = ThemeEngine.Current.ColorWindow; + background_color = ThemeEngine.Current.ColorControl; border_style = BorderStyle.None; drop_down_height = default_drop_down_height; diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/ListBox.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/ListBox.cs index d7f84766858..538e9e5ead3 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/ListBox.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/ListBox.cs @@ -102,7 +102,7 @@ namespace System.Windows.Forms requested_height = bounds.Height; InternalBorderStyle = BorderStyle.Fixed3D; - BackColor = ThemeEngine.Current.ColorWindow; + BackColor = ThemeEngine.Current.ColorControl; /* Vertical scrollbar */ vscrollbar = new ImplicitVScrollBar (); diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/TextBox.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/TextBox.cs index d7c548ca0a2..bbf7778ce7c 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/TextBox.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/TextBox.cs @@ -69,8 +69,8 @@ namespace System.Windows.Forms { this.RightToLeftChanged += new EventHandler (TextBox_RightToLeftChanged); MouseWheel += new MouseEventHandler (TextBox_MouseWheel); - BackColor = SystemColors.Window; - ForeColor = SystemColors.WindowText; + BackColor = ThemeEngine.Current.ColorControl; + ForeColor = ThemeEngine.Current.ColorControlText; backcolor_set = false; SetStyle (ControlStyles.StandardClick | ControlStyles.StandardDoubleClick, false); -- 2.25.1