diff --git a/DarkUI/Controls/DarkComboBox.cs b/DarkUI/Controls/DarkComboBox.cs index 5d1d1c4..064e7e6 100644 --- a/DarkUI/Controls/DarkComboBox.cs +++ b/DarkUI/Controls/DarkComboBox.cs @@ -102,6 +102,13 @@ protected override void OnResize(EventArgs e) Invalidate(); } + protected override void OnEnabledChanged(EventArgs e) + { + base.OnEnabledChanged(e); + _buffer = null; + Invalidate(); + } + private void PaintCombobox() { if (_buffer == null) @@ -111,7 +118,7 @@ private void PaintCombobox() { var rect = new Rectangle(0, 0, ClientSize.Width, ClientSize.Height); - var textColor = ThemeProvider.Theme.Colors.LightText; + var textColor = Enabled ? ThemeProvider.Theme.Colors.LightText : ThemeProvider.Theme.Colors.Colors.DisabledText; var borderColor = ThemeProvider.Theme.Colors.GreySelection; var fillColor = ThemeProvider.Theme.Colors.LightBackground;