Skip to content

Commit 376733d

Browse files
committed
DO-NOT-MERGE-FOR-TESTING: Remove hard-coded dark styling for buttons in
workspace selection dialog Skip the early dark-theme styling for Button controls in the workspace selection dialog at startup so buttons get the native macOS dark appearance instead, matching what the ThemeEngine applies later. Other widgets (Shell, Composite, Label, Link, ExpandableComposite) remain styled as before since the ThemeEngine is not yet available during workspace selection. Test change for #3905
1 parent 27c8c9d commit 376733d

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

  • bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application

bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEApplication.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
import org.eclipse.swt.SWT;
5959
import org.eclipse.swt.graphics.Color;
6060
import org.eclipse.swt.layout.FillLayout;
61+
import org.eclipse.swt.widgets.Button;
6162
import org.eclipse.swt.widgets.Composite;
6263
import org.eclipse.swt.widgets.Control;
6364
import org.eclipse.swt.widgets.Display;
@@ -945,6 +946,15 @@ private void applyDarkStyles(Shell shell) {
945946
}
946947

947948
private void applyStylesRecursive(Control control, Color bg, Color fg, Color linkColor) {
949+
if (control instanceof Button button) {
950+
// On Windows, check buttons need an explicit background; otherwise they
951+
// appear white because the parent background is not inherited.
952+
if (Platform.OS_WIN32.equals(Platform.getOS()) && (button.getStyle() & SWT.CHECK) != 0) {
953+
button.setBackground(bg);
954+
}
955+
// Leave other buttons unstyled so the native dark appearance is used
956+
return;
957+
}
948958
control.setBackground(bg);
949959
if (control instanceof Link link) {
950960
link.setLinkForeground(linkColor);

0 commit comments

Comments
 (0)