Skip to content

Commit 98882a6

Browse files
Revert "Fixes darkmode issue in ComboBoxRenderer."
This reverts commit 404d516.
1 parent 404d516 commit 98882a6

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

src/System.Windows.Forms/System/Windows/Forms/Control.cs

-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ public unsafe partial class Control :
163163
internal const string ItemsViewThemeIdentifier = "ItemsView";
164164
internal const string ComboBoxButtonThemeIdentifier = "CFD";
165165
internal const string BannerContainerThemeIdentifier = "FileExplorerBannerContainer";
166-
internal const string ComboboxClassIdentifier = "COMBOBOX";
167166

168167
private const short PaintLayerBackground = 1;
169168
private const short PaintLayerForeground = 2;

src/System.Windows.Forms/System/Windows/Forms/Controls/ComboBox/ComboBoxRenderer.cs

+1-9
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,7 @@ public static class ComboBoxRenderer
1414
// Make this per-thread, so that different threads can safely use these methods.
1515
[ThreadStatic]
1616
private static VisualStyleRenderer? t_visualStyleRenderer;
17-
18-
#pragma warning disable WFO5001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
19-
20-
private static readonly VisualStyleElement s_comboBoxElement = Application.IsDarkModeEnabled
21-
? VisualStyleElement.CreateElement($"{Control.DarkModeIdentifier}_{Control.ComboBoxButtonThemeIdentifier}::{Control.ComboboxClassIdentifier}", 1, 1)
22-
: VisualStyleElement.ComboBox.DropDownButton.Normal;
23-
24-
#pragma warning restore WFO5001 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
25-
17+
private static readonly VisualStyleElement s_comboBoxElement = VisualStyleElement.ComboBox.DropDownButton.Normal;
2618
private static readonly VisualStyleElement s_textBoxElement = VisualStyleElement.TextBox.TextEdit.Normal;
2719

2820
/// <summary>

0 commit comments

Comments
 (0)