Bug 563684

Summary: [CSS] GTK dark theme improvements
Product: [Eclipse Project] Platform Reporter: Amit Mendapara <mendapara.amit>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: aobuchow, gautier.desaintmartinlacaze, Lars.Vogel, mmarchand
Version: 4.16   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
See Also: https://git.eclipse.org/r/163800
https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/163800
Whiteboard:
Bug Depends on: 563001, 563736    
Bug Blocks:    
Attachments:
Description Flags
screencast.mkv
none
screencast-2.mkv none

Description Amit Mendapara CLA 2020-05-28 14:08:50 EDT
The GTK dark theme should use colors matching with the default GTK3 Adwaita-dark theme.

I am working on a gtk dark theme that should fix most of the color inconsistencies we see with current dark theme.

Gerrit is coming soon :)
Comment 1 Mike Marchand CLA 2020-05-28 14:20:16 EDT
I look forward to it!
Comment 2 Eclipse Genie CLA 2020-05-28 14:45:00 EDT
New Gerrit change created: https://git.eclipse.org/r/163800
Comment 3 Amit Mendapara CLA 2020-05-28 14:46:14 EDT
Created attachment 283066 [details]
screencast.mkv

Here is the screencast.
Comment 4 Amit Mendapara CLA 2020-05-28 14:50:39 EDT
*** Bug 563290 has been marked as a duplicate of this bug. ***
Comment 5 Amit Mendapara CLA 2020-05-29 04:06:39 EDT
Depends on Bug 563001.
Comment 6 Lars Vogel CLA 2020-05-29 04:20:27 EDT
(In reply to Amit Mendapara from comment #5)
> Depends on Bug 563001.

You could use the depends on field for that. :-)
Comment 7 Amit Mendapara CLA 2020-05-29 04:23:30 EDT
(In reply to Lars Vogel from comment #6)
> (In reply to Amit Mendapara from comment #5)
> > Depends on Bug 563001.
> 
> You could use the depends on field for that. :-)

Thanks!
Comment 8 Amit Mendapara CLA 2020-05-29 10:44:13 EDT
(In reply to Eclipse Genie from comment #2)
> New Gerrit change created: https://git.eclipse.org/r/163800

This change can lead to following error:

org.eclipse.swt.SWTException: Graphic is disposed
	at org.eclipse.swt.SWT.error(SWT.java:4723)
	at org.eclipse.swt.SWT.error(SWT.java:4638)
	at org.eclipse.swt.SWT.error(SWT.java:4609)
	at org.eclipse.swt.graphics.Color.getRGB(Color.java:323)
	at org.eclipse.ui.themes.ColorUtil.getSystemColor(ColorUtil.java:137)
	at org.eclipse.ui.themes.ColorUtil.process(ColorUtil.java:48)
	at org.eclipse.ui.themes.ColorUtil.getColorValue(ColorUtil.java:156)
	at org.eclipse.ui.internal.themes.ColorDefinition.getValue(ColorDefinition.java:111)
	at org.eclipse.ui.internal.themes.ThemeElementHelper.installColor(ThemeElementHelper.java:287)
	at org.eclipse.ui.internal.themes.ThemeElementHelper.populateRegistry(ThemeElementHelper.java:184)
	at org.eclipse.ui.internal.themes.WorkbenchThemeManager.updateThemes(WorkbenchThemeManager.java:176)
	at org.eclipse.ui.internal.themes.WorkbenchThemeManager.lambda$1(WorkbenchThemeManager.java:147)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5686)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5678)
	at org.eclipse.swt.widgets.Display.runSettings(Display.java:5008)


The code in question "WorkbenchThemeManager.updateThemes" seems too old and related to Windows. We can omit "sendEvent" from "Display.runSettings" but I don't know the purpose of emitting that event.
Comment 9 Amit Mendapara CLA 2020-05-29 10:51:53 EDT
(In reply to Amit Mendapara from comment #8)
> (In reply to Eclipse Genie from comment #2)
> > New Gerrit change created: https://git.eclipse.org/r/163800
> 
> This change can lead to following error:
> 
> org.eclipse.swt.SWTException: Graphic is disposed
> 	at org.eclipse.swt.SWT.error(SWT.java:4723)
> 	at org.eclipse.swt.SWT.error(SWT.java:4638)
> 	at org.eclipse.swt.SWT.error(SWT.java:4609)
> 	at org.eclipse.swt.graphics.Color.getRGB(Color.java:323)
> 	at org.eclipse.ui.themes.ColorUtil.getSystemColor(ColorUtil.java:137)
> 	at org.eclipse.ui.themes.ColorUtil.process(ColorUtil.java:48)
> 	at org.eclipse.ui.themes.ColorUtil.getColorValue(ColorUtil.java:156)
> 	at
> org.eclipse.ui.internal.themes.ColorDefinition.getValue(ColorDefinition.java:
> 111)
> 	at
> org.eclipse.ui.internal.themes.ThemeElementHelper.
> installColor(ThemeElementHelper.java:287)
> 	at
> org.eclipse.ui.internal.themes.ThemeElementHelper.
> populateRegistry(ThemeElementHelper.java:184)
> 	at
> org.eclipse.ui.internal.themes.WorkbenchThemeManager.
> updateThemes(WorkbenchThemeManager.java:176)
> 	at
> org.eclipse.ui.internal.themes.WorkbenchThemeManager.
> lambda$1(WorkbenchThemeManager.java:147)
> 	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
> 	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5686)
> 	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5678)
> 	at org.eclipse.swt.widgets.Display.runSettings(Display.java:5008)
> 
> 
> The code in question "WorkbenchThemeManager.updateThemes" seems too old and
> related to Windows. We can omit "sendEvent" from "Display.runSettings" but I
> don't know the purpose of emitting that event.

Sorry, wrong bug report. It's related bug (In reply to Amit Mendapara from comment #8)
> (In reply to Eclipse Genie from comment #2)
> > New Gerrit change created: https://git.eclipse.org/r/163800
> 
> This change can lead to following error:
> 
> org.eclipse.swt.SWTException: Graphic is disposed
> 	at org.eclipse.swt.SWT.error(SWT.java:4723)
> 	at org.eclipse.swt.SWT.error(SWT.java:4638)
> 	at org.eclipse.swt.SWT.error(SWT.java:4609)
> 	at org.eclipse.swt.graphics.Color.getRGB(Color.java:323)
> 	at org.eclipse.ui.themes.ColorUtil.getSystemColor(ColorUtil.java:137)
> 	at org.eclipse.ui.themes.ColorUtil.process(ColorUtil.java:48)
> 	at org.eclipse.ui.themes.ColorUtil.getColorValue(ColorUtil.java:156)
> 	at
> org.eclipse.ui.internal.themes.ColorDefinition.getValue(ColorDefinition.java:
> 111)
> 	at
> org.eclipse.ui.internal.themes.ThemeElementHelper.
> installColor(ThemeElementHelper.java:287)
> 	at
> org.eclipse.ui.internal.themes.ThemeElementHelper.
> populateRegistry(ThemeElementHelper.java:184)
> 	at
> org.eclipse.ui.internal.themes.WorkbenchThemeManager.
> updateThemes(WorkbenchThemeManager.java:176)
> 	at
> org.eclipse.ui.internal.themes.WorkbenchThemeManager.
> lambda$1(WorkbenchThemeManager.java:147)
> 	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
> 	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5686)
> 	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5678)
> 	at org.eclipse.swt.widgets.Display.runSettings(Display.java:5008)
> 
> 
> The code in question "WorkbenchThemeManager.updateThemes" seems too old and
> related to Windows. We can omit "sendEvent" from "Display.runSettings" but I
> don't know the purpose of emitting that event.

Sorry, it was meant for Bug (In reply to Amit Mendapara from comment #8)
> (In reply to Eclipse Genie from comment #2)
> > New Gerrit change created: https://git.eclipse.org/r/163800
> 
> This change can lead to following error:
> 
> org.eclipse.swt.SWTException: Graphic is disposed
> 	at org.eclipse.swt.SWT.error(SWT.java:4723)
> 	at org.eclipse.swt.SWT.error(SWT.java:4638)
> 	at org.eclipse.swt.SWT.error(SWT.java:4609)
> 	at org.eclipse.swt.graphics.Color.getRGB(Color.java:323)
> 	at org.eclipse.ui.themes.ColorUtil.getSystemColor(ColorUtil.java:137)
> 	at org.eclipse.ui.themes.ColorUtil.process(ColorUtil.java:48)
> 	at org.eclipse.ui.themes.ColorUtil.getColorValue(ColorUtil.java:156)
> 	at
> org.eclipse.ui.internal.themes.ColorDefinition.getValue(ColorDefinition.java:
> 111)
> 	at
> org.eclipse.ui.internal.themes.ThemeElementHelper.
> installColor(ThemeElementHelper.java:287)
> 	at
> org.eclipse.ui.internal.themes.ThemeElementHelper.
> populateRegistry(ThemeElementHelper.java:184)
> 	at
> org.eclipse.ui.internal.themes.WorkbenchThemeManager.
> updateThemes(WorkbenchThemeManager.java:176)
> 	at
> org.eclipse.ui.internal.themes.WorkbenchThemeManager.
> lambda$1(WorkbenchThemeManager.java:147)
> 	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
> 	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5686)
> 	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5678)
> 	at org.eclipse.swt.widgets.Display.runSettings(Display.java:5008)
> 
> 
> The code in question "WorkbenchThemeManager.updateThemes" seems too old and
> related to Windows. We can omit "sendEvent" from "Display.runSettings" but I
> don't know the purpose of emitting that event.

Sorry, this is specific to Bug 563001 not this one.
Comment 10 Amit Mendapara CLA 2020-05-29 13:49:06 EDT
Created attachment 283096 [details]
screencast-2.mkv

Here is the updated screencast.

Should be tested with these 3 changes:

https://git.eclipse.org/r/163821
https://git.eclipse.org/r/163855
https://git.eclipse.org/r/163800

Alternatively, launch eclipse with GTK_THEME=Adwaita:dark environment with last gerrit patch.
Comment 11 Amit Mendapara CLA 2020-07-08 01:47:10 EDT
Is there any chance of getting this merged in 4.17?
Comment 12 Lars Vogel CLA 2020-08-25 04:30:09 EDT
(In reply to Amit Mendapara from comment #11)
> Is there any chance of getting this merged in 4.17?

Lets try early 4.18.
Comment 13 Amit Mendapara CLA 2020-09-11 05:36:42 EDT
Though the new "System" theme is the future, I still would like to see this in 4.18 till new "System" theme is matured.
Comment 14 Lars Vogel CLA 2020-11-18 08:32:22 EST
Mass change to 4.19 M1, please update the target if you have other plans.
Comment 15 Alexander Kurtakov CLA 2021-01-07 03:06:58 EST
Mass move 4.19 M1 bugs to M3
Comment 16 Niraj Modi CLA 2021-02-19 07:58:55 EST
Removing milestone from 4.19 M3 to 4.19, please re-target accordingly.
Comment 17 Kalyan Prasad Tatavarthi CLA 2021-03-02 02:07:24 EST
Mass move out of 4.19
Comment 18 Kalyan Prasad Tatavarthi CLA 2021-06-04 00:54:27 EDT
Mass Move out of 4.20