Skip to content

Commit d1f78f6

Browse files
committed
fix: Remove unneeded ThemeFix
Some ThemeFix no longer needed for theming with .net9. For ListBox BorderStyle.Fixed3D does not look great in dark mode but is rendered correctly and not overridden. # Conflicts: # src/app/GitExtUtils/GitUI/Theming/ThemeFix.cs
1 parent 1aeb76d commit d1f78f6

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

src/app/GitExtUtils/GitUI/Theming/ThemeFix.cs

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,10 @@ public static void FixVisualStyle(this Control container)
2525
.ForEach(SetupGroupBox);
2626
container.DescendantsToFix<TreeView>()
2727
.ForEach(SetupTreeView);
28-
container.DescendantsToFix<ListBox>()
29-
.ForEach(SetupListBox);
3028
container.DescendantsToFix<TabControl>()
3129
.ForEach(SetupTabControl);
3230
container.DescendantsToFix<TextBoxBase>()
3331
.ForEach(SetupTextBoxBase);
34-
container.DescendantsToFix<ComboBox>()
35-
.ForEach(SetupComboBox);
3632
container.DescendantsToFix<LinkLabel>()
3733
.ForEach(SetupLinkLabel);
3834
container.DescendantsToFix<ToolStrip>()
@@ -71,22 +67,13 @@ private static void SetupTextBoxBase(TextBoxBase textBox)
7167
private static void SetupToolStrip(ToolStrip strip)
7268
{
7369
strip.UseExtendedThemeAwareRenderer();
74-
strip.Items.OfType<ToolStripLabel>()
75-
.ForEach(SetupToolStripLabel);
7670
}
7771

7872
private static void SetupContextMenu(ContextMenuStrip strip)
7973
{
8074
strip.UseExtendedThemeAwareRenderer();
8175
}
8276

83-
private static void SetupToolStripLabel(ToolStripLabel label)
84-
{
85-
label.LinkColor = label.LinkColor.AdaptTextColor();
86-
label.VisitedLinkColor = label.VisitedLinkColor.AdaptTextColor();
87-
label.ActiveLinkColor = label.ActiveLinkColor.AdaptTextColor();
88-
}
89-
9077
private static void SetupLinkLabel(this LinkLabel label)
9178
{
9279
label.LinkColor = label.LinkColor.AdaptTextColor();
@@ -116,23 +103,6 @@ private static void SetupTabPage(TabPage page)
116103

117104
private static void SetupTreeView(TreeView view)
118105
{
119-
IntPtr unused = view.Handle; // force handle creation
120-
view.TouchBackColor();
121-
view.TouchForeColor();
122-
view.LineColor = SystemColors.ControlDark;
123-
}
124-
125-
private static void SetupListBox(ListBox view)
126-
{
127-
if (view.BorderStyle == BorderStyle.Fixed3D)
128-
{
129-
view.BorderStyle = BorderStyle.FixedSingle;
130-
}
131-
}
132-
133-
private static void SetupComboBox(this ComboBox menu)
134-
{
135-
menu.TouchBackColor();
136106
}
137107

138108
private static void TouchBackColor(this Control c)

0 commit comments

Comments
 (0)