Repository navigation
Add an e4 example that sets the SVG currentColor at startup - #1
Merged
Merged
Conversation
com.vogella.rcp.svg.currentcolor shows a login dialog before the workbench window is rendered. The user picks the icon color there, with a live preview, and the lifecycle passes it to SVGFileFormat.setCurrentColor, so all currentColor SVG icons in the menu, toolbar, part tabs and parts use it. A -currentColor RRGGBB program argument preselects the color; SWT's swt.svg.currentColor system property still works as well. The CSS property swt-svg-current-color proposed in eclipse.platform.ui pull request 4497 is not available yet, so the example uses the SWT method directly. That method is newer than the 2026-09 release, so the target platform now uses the 4.42 I-builds. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01As7ZUt86VBsfVRcjyZwyqf
vogella
added a commit
that referenced
this pull request
Oct 16, 2026
com.vogella.rcp.svg.currentcolor shows a login dialog before the workbench window is rendered. The user picks the icon color there, with a live preview, and the lifecycle passes it to SVGFileFormat.setCurrentColor, so all currentColor SVG icons in the menu, toolbar, part tabs and parts use it. A -currentColor RRGGBB program argument preselects the color; SWT's swt.svg.currentColor system property still works as well. The CSS property swt-svg-current-color proposed in eclipse.platform.ui pull request 4497 is not available yet, so the example uses the SWT method directly. That method is newer than the 2026-09 release, so the target platform now uses the 4.42 I-builds. Assisted-by: multiple AI agents and layers of automated tooling 🤖
vogella
added a commit
that referenced
this pull request
Oct 16, 2026
com.vogella.rcp.svg.currentcolor shows a login dialog before the workbench window is rendered. The user picks the icon color there, with a live preview, and the lifecycle passes it to SVGFileFormat.setCurrentColor, so all currentColor SVG icons in the menu, toolbar, part tabs and parts use it. A -currentColor RRGGBB program argument preselects the color; SWT's swt.svg.currentColor system property still works as well. The CSS property swt-svg-current-color proposed in eclipse.platform.ui pull request 4497 is not available yet, so the example uses the SWT method directly. That method is newer than the 2026-09 release, so the target platform now uses the 4.42 I-builds.
vogella
added a commit
that referenced
this pull request
Oct 16, 2026
com.vogella.rcp.svg.currentcolor shows a login dialog before the workbench window is rendered. The user picks the icon color there, with a live preview, and the lifecycle passes it to SVGFileFormat.setCurrentColor, so all currentColor SVG icons in the menu, toolbar, part tabs and parts use it. A -currentColor RRGGBB program argument preselects the color; SWT's swt.svg.currentColor system property still works as well. The CSS property swt-svg-current-color proposed in eclipse.platform.ui pull request 4497 is not available yet, so the example uses the SWT method directly. That method is newer than the 2026-09 release, so the target platform now uses the 4.42 I-builds.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New e4 RCP example
com.vogella.rcp.svg.currentcolor. It sets the color that SVG icons use forcurrentColorbefore the workbench window is rendered. The CSS propertyswt-svg-current-colorfrom eclipse-platform/eclipse.platform.ui#4497 isn't available yet, so the example calls the SWT methodSVGFileFormat.setCurrentColor(RGB)directly.How the color is set
@PostContextCreatelifecycle opens a login screen with user and password fields and an icon color picker (presets plus aColorDialog). The preview is rasterized again on every change. Clicking Login passes the chosen color toSVGFileFormat.setCurrentColor.-currentColor RRGGBBpreselects the color in the dialog. The.productpasses1E88E5. Write the value without the#, because the launcher ini treats a line that starts with#as a comment, and so does a shell after a space.-Dswt.svg.currentColor=RRGGBBstill works. It is preselected when no program argument is given.All the icons (menu, toolbar, part tabs, part contents) are SVGs with
fill/stroke="currentColor".Target platform
setCurrentColorwas added to SWT on 2026-10-15, so it isn't in the 2026-09 release. The target now resolves fromhttps://download.eclipse.org/eclipse/updates/4.42-I-builds/. It should switch to the 2026-12 release once that ships. CLAUDE.md and README note this.Testing
mvn clean verifypasses for the whole reactor on JDK 25.#1E88E5. With no argument, I picked "Orange" in the dialog and the workbench icons came out#EF6C00.