diff --git a/bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEApplication.java b/bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEApplication.java index be179fdc56c..aee878c76b2 100644 --- a/bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEApplication.java +++ b/bundles/org.eclipse.ui.ide.application/src/org/eclipse/ui/internal/ide/application/IDEApplication.java @@ -58,6 +58,7 @@ import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.layout.FillLayout; +import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; @@ -945,6 +946,15 @@ private void applyDarkStyles(Shell shell) { } private void applyStylesRecursive(Control control, Color bg, Color fg, Color linkColor) { + if (control instanceof Button button) { + // On Windows, check buttons need an explicit background; otherwise they + // appear white because the parent background is not inherited. + if (Platform.OS_WIN32.equals(Platform.getOS()) && (button.getStyle() & SWT.CHECK) != 0) { + button.setBackground(bg); + } + // Leave other buttons unstyled so the native dark appearance is used + return; + } control.setBackground(bg); if (control instanceof Link link) { link.setLinkForeground(linkColor);