Skip to content

Fix disabled wizard buttons appearing enabled in dark theme#3870

Open
vogella wants to merge 1 commit intoeclipse-platform:masterfrom
vogella:fix/dark-theme-disabled-wizard-buttons
Open

Fix disabled wizard buttons appearing enabled in dark theme#3870
vogella wants to merge 1 commit intoeclipse-platform:masterfrom
vogella:fix/dark-theme-disabled-wizard-buttons

Conversation

@vogella
Copy link
Copy Markdown
Contributor

@vogella vogella commented Apr 7, 2026

In the dark theme, the CSS sets a foreground color on all Button elements, which overrides the native OS disabled button rendering. This causes disabled buttons (like 'Finish') to look identical to enabled ones.

Approach

Sets a disabled CSS class on wizard buttons when they are disabled via setData("org.eclipse.e4.ui.css.CssClassName", "disabled"). The dark theme CSS includes a new Button.disabled rule with a dimmed foreground color. A reskin(SWT.NONE) call triggers the CSS engine to re-apply styles.

This avoids enabling global dynamic CSS pseudo-class support (org.eclipse.e4.ui.css.dynamic), which is disabled for performance reasons.

Changes

  • WizardDialog.java: Added setButtonEnabled() helper used in all button state change paths (updateButtons, saveEnableStateAndSet, restoreEnableState)
  • e4-dark_globalstyle.css: Added Button.disabled { color: #777777; } rule

@vogella
Copy link
Copy Markdown
Contributor Author

vogella commented Apr 7, 2026

New

image

Old

image

@eclipse-platform-bot
Copy link
Copy Markdown
Contributor

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

bundles/org.eclipse.e4.ui.workbench3/META-INF/MANIFEST.MF

An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch.

Git patch
From 664b8946aac56760a83e69d2d26e7a4b687ac2ff Mon Sep 17 00:00:00 2001
From: Eclipse Platform Bot <platform-bot@eclipse.org>
Date: Tue, 7 Apr 2026 13:52:17 +0000
Subject: [PATCH] Version bump(s) for 4.40 stream


diff --git a/bundles/org.eclipse.e4.ui.workbench3/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.ui.workbench3/META-INF/MANIFEST.MF
index 2e81ac7007..55437fe77e 100644
--- a/bundles/org.eclipse.e4.ui.workbench3/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.e4.ui.workbench3/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-SymbolicName: org.eclipse.e4.ui.workbench3;singleton:=true
-Bundle-Version: 0.18.0.qualifier
+Bundle-Version: 0.18.100.qualifier
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-- 
2.53.0

Further information are available in Common Build Issues - Missing version increments.

@vogella vogella force-pushed the fix/dark-theme-disabled-wizard-buttons branch from 3c17f6b to c7c8bb4 Compare April 7, 2026 14:10
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

Test Results

   852 files  ±0     852 suites  ±0   57m 59s ⏱️ -15s
 7 894 tests ±0   7 651 ✅ ±0  243 💤 ±0  0 ❌ ±0 
20 184 runs  ±0  19 529 ✅ ±0  655 💤 ±0  0 ❌ ±0 

Results for commit 0273e2a. ± Comparison against base commit 4d4e25a.

♻️ This comment has been updated with latest results.

@vogella vogella force-pushed the fix/dark-theme-disabled-wizard-buttons branch from c7c8bb4 to bebec37 Compare April 8, 2026 07:17
@vogella vogella marked this pull request as ready for review April 8, 2026 07:18
@vogella vogella force-pushed the fix/dark-theme-disabled-wizard-buttons branch from bebec37 to 3d92220 Compare April 8, 2026 10:03
In the dark theme, the CSS sets a foreground color on all Button elements,
which overrides the native OS disabled button rendering. This causes
disabled buttons (like 'Finish') to look identical to enabled ones.

Fix this by setting a 'disabled' CSS class on wizard buttons when they
are disabled. The dark theme CSS now includes a Button.disabled rule
with a dimmed foreground color. A reskin is triggered on state change
so the CSS engine re-applies styles without needing the global
dynamic CSS pseudo-class support (which is disabled for performance).
@vogella vogella force-pushed the fix/dark-theme-disabled-wizard-buttons branch from 3d92220 to 0273e2a Compare April 8, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants