-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make it possible to ColorDefinitions from CSS theme also in preference CSS nodes #93
Comments
@vogella @mickaelistria WDYT, If you think its good I can start work on it. |
@gayanper sorry, I'm not sure what is missing here. You could define colors and fonts via the colors and fonts extension point and style them via CSS. What is the intended change here? |
We can only use color and font definitions in css style blocks. The suggestion is to add support for preferences blocks as well. Today preference blocks are parsed as it is. Allowing it to be parameterize using color and font definitions will enable us to have these sections as templates in their respective plugins and redefine the color and fonts in theme plugins, at least thats my intension here. Got this idea from vscode theming. |
@gayanper I still don't fully get your suggestion but feel free to send a PR to support it, I'm happy to help with the review. I may also final understand the proposal after I saw the code. :-) |
Let try again. Lets take the vscode theme i shared few weeks back. Now when i defined it, i wanted the javadoc, source view popups to have the same background which is used for views like in vscode. I used a color definition for this view background and use it for all swt styling. But javadoc seems to use the information background. Now i can of course override it as a preference in my stylesheet. But i have to duplicate the color as rgb value in the preference entry string. But if we had the support to refer to the color definition then it would be simple to change this color value later so all referenced places will get effected in runtime. |
Thanks @gayanper. I still think we already partially support this (at least in the IDE case), see e4-dark_ide_colorextensions.css in org.eclipse.ui.themes which is for example used in e4-dark_tabstyle.css
So what I think is missing and you are suggesting:
That is a great goal. It would also be great if we would replace all the color constants in our default files with color definitions so that we actually allow the user to change these. |
Add support to resolve Color and Font definitions in the following PreferenceHandler
eclipse.platform.ui/bundles/org.eclipse.e4.ui.css.swt/src/org/eclipse/e4/ui/css/swt/properties/preference/EclipsePreferencesHandler.java
Line 26 in daf172a
UseCase
When defining new themes, we can define template preferences in a more core theme, which can be extended by importing those theme templates and providing color and font definitions. Today this can only be done at SWT widget styling. Adding this to preference we can improve the support. This will enable us to define more of a predefined theme configuration like in vscode.
The text was updated successfully, but these errors were encountered: