-
Notifications
You must be signed in to change notification settings - Fork 188
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
Reset in colors preference page now respects theme-specific defaults #2421
base: master
Are you sure you want to change the base?
Reset in colors preference page now respects theme-specific defaults #2421
Conversation
This was also reported in https://bugs.eclipse.org/bugs/show_bug.cgi?id=478835 |
what happens if i press "Restore Defaults" while in the dark theme and later on switch back to light theme. |
Test Results 1 821 files ±0 1 821 suites ±0 1h 43m 53s ⏱️ - 8m 48s For more details on these errors, see this check. Results for commit 66a430a. ± Comparison against base commit 3fd04b3. ♻️ This comment has been updated with latest results. |
f0e08f5
to
de3c93e
Compare
This pull request changes some projects for the first time in this development cycle.
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
Further information are available in Common Build Issues - Missing version increments. |
...i.css.swt/src/org/eclipse/e4/ui/css/swt/properties/preference/EclipsePreferencesHandler.java
Outdated
Show resolved
Hide resolved
...i.css.swt/src/org/eclipse/e4/ui/css/swt/properties/preference/EclipsePreferencesHandler.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ColorDefinition.java
Outdated
Show resolved
Hide resolved
Your PR does if the issue in the "Fonts & Colors" preference page but is does not fix the issue reported in https://bugs.eclipse.org/bugs/show_bug.cgi?id=478835 (on JDTs "Syntax Color" preference page). |
efe8300
to
12f71a8
Compare
...pse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ColorsAndFontsPreferencePage.java
Outdated
Show resolved
Hide resolved
...pse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ColorsAndFontsPreferencePage.java
Outdated
Show resolved
Hide resolved
...pse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ColorsAndFontsPreferencePage.java
Outdated
Show resolved
Hide resolved
...pse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ColorsAndFontsPreferencePage.java
Outdated
Show resolved
Hide resolved
...pse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ColorsAndFontsPreferencePage.java
Outdated
Show resolved
Hide resolved
...pse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes/ColorsAndFontsPreferencePage.java
Outdated
Show resolved
Hide resolved
7bbd241
to
dbc3c7b
Compare
I did a manual test round and this looks good. Bugs have been fixed. Testcases"Colors And Fonts" Preference Page1) ✅Change color values in light theme. 2) ✅In "Light" theme set a user defined color value. This did not work correctly before this PR 3) ✅In dark theme change the the color value. This did not work correctly before this PR 4) ❌In “Dark” theme set a user defined color value. User defined value still there. Re-opening the preference dialog or restarting the IDE does not change this. ❌ JDT's "Syntax Colors" Preference Page5) ✅In "Light" theme enable "Classes" color and set a user defined color and set font to bold 6) ❌In “Light” theme enable “Classes” color and set a user defined color. We still see the user's value. ❌ 7) ✅In “Dark” theme enable “Classes” color and set a user defined color. 8) ❌In Light theme change to dark theme press "Apply" but don't restart and don't close the preference dialog We still see the user’s value. ❌ |
Let's merge this early in 4.35 |
The "Reset" button in the colors and fonts preference page does not take the default colors overridden in the theme specific css files into account.
Example:
org.eclipse.ui.editors.inlineAnnotationColor is specified with 128,128,128 in plugin.xml
and for the dark theme e4-dark_preferencestyle.css it is overridden with 155,155,155:
I would have expected that click on "Reset" button in the colors preference page sets the color to 155,155,155 in the dark theme which is not the case.
(Reset button is disabled, so default value is visible which is 128,128,128 instead 155,155,155)
This pull requests changes the behavior and sets the default color to 155,155,155 in the dark theme and to 128,128,128 in the light theme.
There already exists a method
RGB getColorValue(ColorDefinition definition)
inColorsAndFontsPreferencePage
but it was not working. I now created a second methodRGB getColorRGB(ColorDefinition definition)
which works as I expect; it returns the default color from plugin.xml if no theme is set or the color from the css theme if available.Is the changed behavior in this pull request ok? Could you please explain the intent of the old method? Should we try to merge the behavior of the two methods?
Any guidance you can provide would be greatly appreciated. Thank you very much!