Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 550939

Summary: Dark theme with Text control and SWT.SEARCH style
Product: [Eclipse Project] Platform Reporter: Alex Boyko <aboyko>
Component: UIAssignee: Alex Boyko <aboyko>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Lars.Vogel, ma.becker
Version: 4.13   
Target Milestone: 4.14 M1   
Hardware: PC   
OS: Mac OS X   
See Also: https://git.eclipse.org/r/149283
https://git.eclipse.org/r/149319
https://git.eclipse.org/r/149320
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=b4eecb3a953fd0091878be6846d803047d2ef31f
Whiteboard:
Bug Depends on:    
Bug Blocks: 551494    
Attachments:
Description Flags
Screenshot of Eclipse Marketplace wizard search box
none
Old, New and Native search box with this change none

Description Alex Boyko CLA 2019-09-10 10:26:15 EDT
Created attachment 279832 [details]
Screenshot of Eclipse Marketplace wizard search box

The org.eclipse.swt.widgets.Text created with SWT.SEARCH style.

Eclipse Dark Theme is on on Mac OSX 10.14.6

The text control has very whitish background unlike the text control without the SWT.SEARCH style on.
Comment 1 Lars Vogel CLA 2019-09-10 10:45:19 EDT
Thanks, Alex. Can you suggest via Gerrit a better color? I think the right place to change this is in the eclipse.platform.ui repo in the org.eclipse.ui.themes plug-in.

Currently I see the following setting: 

File: e4-dark_globalstyle.css

Text[style~='SWT.SEARCH'],
Text[style~='SWT.SEARCH'] + Label /* SWT-BUG: adjacent sibling selector is ignored (CSS2.1) */ {
    /* search boxes */
    background-color: #949DA5;
    color: #ffffff;
}

File:  e4-dark_mac1013.css

Text[style~='SWT.SEARCH'],
/* the following are required due to Bug 419482: */
Composite > Text[style~='SWT.SEARCH'],
TabFolder > Composite > Text[style~='SWT.SEARCH'],
TabFolder > Composite > * > Text[style~='SWT.SEARCH'],
DocCommentOwnerComposite > Group > Text[style~='SWT.SEARCH'],
TabFolder > Composite > ScrolledComposite > Text[style~='SWT.SEARCH'],
Shell > Composite > Composite > Text[style~='SWT.SEARCH'],
Composite > Composite > Composite > Group > Text[style~='SWT.SEARCH'],
Shell > Composite > Composite > Composite > Text[style~='SWT.SEARCH'],
ScrolledComposite > Composite > Composite > Composite > Text[style~='SWT.SEARCH'],
Shell > Composite > Composite > Composite > Composite > Composite > Text[style~='SWT.SEARCH'],
Shell[style~='SWT.RADIO'][style~='SWT.CASCADE'][style~='SWT.SHADOW_ETCHED_IN'][style~='SWT.SHADOW_ETCHED_OUT'][style~='SWT.RESIZE'][style~='SWT.MENU'][style~='SWT.FULL_SELECTION'][style~='SWT.DATE'] > Composite > Text[style~='SWT.SEARCH'],
Shell[style~='SWT.RADIO'][style~='SWT.CASCADE'][style~='SWT.SHADOW_ETCHED_IN'][style~='SWT.SHADOW_ETCHED_OUT'][style~='SWT.RESIZE'][style~='SWT.MENU'][style~='SWT.FULL_SELECTION'][style~='SWT.DATE'] > Composite > * > Text[style~='SWT.SEARCH'],
#org-eclipse-pde-runtime-LogView Text[style~='SWT.SEARCH'],
Form > LayoutComposite > LayoutComposite > Text[style~='SWT.SEARCH'],
.MPart LayoutComposite > * > LayoutComposite > Section > LayoutComposite > Text[style~='SWT.SEARCH'] {
    /* search boxes */
    background-color: #949da5; /* background-color is hard-coded */
    color: #333;
}
Comment 2 Eclipse Genie CLA 2019-09-10 13:08:06 EDT
New Gerrit change created: https://git.eclipse.org/r/149283
Comment 3 Alex Boyko CLA 2019-09-10 13:14:53 EDT
Thank you very much for pointing to the place where that stuff is defined! Next time i encounter a similar issue would know where to look!-)
Is there any chance to customize the color when search box control has focus or maybe better when the hosting shell has focus?
Comment 4 Matthias Becker CLA 2019-09-11 02:09:14 EDT
Created attachment 279833 [details]
Old, New and Native search box with this change
Comment 5 Matthias Becker CLA 2019-09-11 02:10:07 EDT
I tested this change. Search Box looks more like the native search box. So this looks fine to me. 

But I have some questions regarding the implementation. Will post them on gerrit.
Comment 6 Eclipse Genie CLA 2019-09-11 02:22:06 EDT
New Gerrit change created: https://git.eclipse.org/r/149319
Comment 7 Eclipse Genie CLA 2019-09-11 02:22:51 EDT
New Gerrit change created: https://git.eclipse.org/r/149320
Comment 8 Lars Vogel CLA 2019-09-24 17:52:30 EDT
Thanks Alex and Matthias.