Bug 561588

Summary: [Dark Theme] Activate the windows API for dark scrollbars in the dark theme
Product: [Eclipse Project] Platform Reporter: Lars Vogel <Lars.Vogel>
Component: UIAssignee: Lars Vogel <Lars.Vogel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: akurtakov, alexandr.miloslavskiy, info, kalyan_prasad, kongogamry, Lars.Vogel, mmarchand, Vikas.Chandra
Version: 4.14Keywords: noteworthy, usability
Target Milestone: 4.16 M3   
Hardware: PC   
OS: Windows All   
See Also: https://git.eclipse.org/r/160204
https://git.eclipse.org/r/160926
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=b987db6af682f49cfae9d828efa26ac97bf11e3c
https://git.eclipse.org/r/160929
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=4b398853ccf816ff603f3b287c68cbb277b54122
https://git.eclipse.org/c/www.eclipse.org/eclipse/news.git/commit/?id=4be4500d67db4bdaa40e3c7268d9a2006cfcb6a9
https://git.eclipse.org/r/163287
https://git.eclipse.org/c/www.eclipse.org/eclipse/news.git/commit/?id=28af85e9e725ea439bafb375de9a0f9f09db4bfe
https://git.eclipse.org/r/163315
https://git.eclipse.org/c/www.eclipse.org/eclipse/news.git/commit/?id=3b51202bd62184585a4938330d9af9cd6aa251f1
Whiteboard:
Bug Depends on: 444560    
Bug Blocks: 560385, 562112    
Attachments:
Description Flags
Old / New side by side none

Description Lars Vogel CLA 2020-03-30 10:47:22 EDT
With Bug 444560 done, we should also activate this for the dark theme for Windows.
Comment 1 Alexandr Miloslavskiy CLA 2020-03-30 10:49:35 EDT
It should be sufficient to do this:

display.setData("org.eclipse.swt.internal.win32.enableDarkScrollbars", true)
Comment 2 Lars Vogel CLA 2020-03-30 11:03:16 EDT
(In reply to Alexandr Miloslavskiy from comment #1)
> It should be sufficient to do this:
> 
> display.setData("org.eclipse.swt.internal.win32.enableDarkScrollbars", true)

Thanks.
Comment 3 Lars Vogel CLA 2020-03-30 11:16:48 EDT
We currently have two plug-ins used for the purpose to set the dark theme:

org.eclipse.e4.ui.swt.gtk
org.eclipse.e4.ui.workbench.renderers.swt.cocoa

I think I put the call windows call together with the gtk call into org.eclipse.e4.ui.swt.gtk

@Alexander, should I rename the plug-in or would that break something?
Comment 4 Lars Vogel CLA 2020-03-30 11:18:35 EDT
(In reply to Lars Vogel from comment #3)
> We currently have two plug-ins used for the purpose to set the dark theme:
> 
> org.eclipse.e4.ui.swt.gtk
> org.eclipse.e4.ui.workbench.renderers.swt.cocoa
> 
> I think I put the call windows call together with the gtk call into
> org.eclipse.e4.ui.swt.gtk
> 
> @Alexander, should I rename the plug-in or would that break something?

Not sure if I can put these calls together without unified API, I think this will create compile errors on the corresponding platform.
Comment 5 Alexandr Miloslavskiy CLA 2020-03-30 11:19:32 EDT
I have no idea, sorry. I don't really use Eclipse, and my SWT patches are aimed for other product that uses SWT. It doesn't use Eclipse plugins.
Comment 6 Alexander Kurtakov CLA 2020-03-30 11:24:59 EDT
(In reply to Lars Vogel from comment #3)
> We currently have two plug-ins used for the purpose to set the dark theme:
> 
> org.eclipse.e4.ui.swt.gtk
> org.eclipse.e4.ui.workbench.renderers.swt.cocoa
> 
> I think I put the call windows call together with the gtk call into
> org.eclipse.e4.ui.swt.gtk
> 
> @Alexander, should I rename the plug-in or would that break something?

You should not put win32 calls in gtk fragment. You have to create new fragment for win32 and put it there. This is needed as the gtk fragment uses gtk specific swt calls thus we need one fragment per WS.
Comment 7 Eclipse Genie CLA 2020-03-30 11:29:47 EDT
New Gerrit change created: https://git.eclipse.org/r/160204
Comment 8 Lars Vogel CLA 2020-03-30 11:32:16 EDT
(In reply to Alexander Kurtakov from comment #6)
> (In reply to Lars Vogel from comment #3)
> > We currently have two plug-ins used for the purpose to set the dark theme:
> > 
> > org.eclipse.e4.ui.swt.gtk
> > org.eclipse.e4.ui.workbench.renderers.swt.cocoa
> > 
> > I think I put the call windows call together with the gtk call into
> > org.eclipse.e4.ui.swt.gtk
> > 
> > @Alexander, should I rename the plug-in or would that break something?
> 
> You should not put win32 calls in gtk fragment. You have to create new
> fragment for win32 and put it there. This is needed as the gtk fragment uses
> gtk specific swt calls thus we need one fragment per WS.

I think if we solve Bug 546859 (unified API for setting the dark theme) we can get rid of the gtk (and the new win32 fragment).
Comment 9 Lars Vogel CLA 2020-04-14 10:16:19 EDT
Created attachment 282439 [details]
Old / New side by side

Looks great, see attachment. Thanks Alexandr and Conrad for the SWT API.
Comment 10 Eclipse Genie CLA 2020-04-14 12:08:09 EDT
New Gerrit change created: https://git.eclipse.org/r/160926
Comment 12 Eclipse Genie CLA 2020-04-14 13:02:04 EDT
New Gerrit change created: https://git.eclipse.org/r/160929
Comment 15 Eclipse Genie CLA 2020-05-19 23:53:24 EDT
New Gerrit change created: https://git.eclipse.org/r/163287
Comment 17 Vikas Chandra CLA 2020-05-20 07:47:56 EDT
(In reply to Eclipse Genie from comment #16)
> Gerrit change https://git.eclipse.org/r/163287 was merged to [master].
> Commit:
> http://git.eclipse.org/c/www.eclipse.org/eclipse/news.git/commit/
> ?id=28af85e9e725ea439bafb375de9a0f9f09db4bfe

The image in N&N is more than 800 pixel wide. Instruction is

". The image should be no more than 800 pixels wide and in PNG format "

Can you please reattach a picture that fits the instruction.
Comment 18 Eclipse Genie CLA 2020-05-20 08:51:09 EDT
New Gerrit change created: https://git.eclipse.org/r/163315