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

Bug 515391

Summary: [CSS] [Dark Theme] Allow to set the TitleBarForeground of ExpandableComposite via CSS
Product: [Eclipse Project] Platform Reporter: Lars Vogel <Lars.Vogel>
Component: UIAssignee: Fabian Pfaff <fabian.pfaff>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Lars.Vogel
Version: 4.7   
Target Milestone: 4.7 M7   
Hardware: PC   
OS: All   
See Also: https://git.eclipse.org/r/95322
https://git.eclipse.org/r/95387
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=9a8613c1e1108657a0c4c52a4c2a023ce6fa2abb
https://git.eclipse.org/r/96156
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=f17d97d57e9f04bbd991e91f22da68190440cbaf
https://bugs.eclipse.org/bugs/show_bug.cgi?id=521488
Whiteboard:
Bug Depends on:    
Bug Blocks: 515518, 515520    
Attachments:
Description Flags
Screenshot none

Description Lars Vogel CLA 2017-04-18 10:57:24 EDT
Created attachment 267839 [details]
Screenshot
Comment 1 Lars Vogel CLA 2017-04-18 10:58:09 EDT
David, lets look at this tomorrow. You know the code and I am the CSS styling, maybe we can have a fast fix for this.
Comment 2 Lars Vogel CLA 2017-04-19 07:33:32 EDT
Looks to me that the CSS engine does not set the foregroundColor and background Color for Composite. I write a test to confirm that.
Comment 3 Lars Vogel CLA 2017-04-19 07:40:00 EDT
(In reply to Lars Vogel from comment #2)
> Looks to me that the CSS engine does not set the foregroundColor and
> background Color for Composite. I write a test to confirm that.

Nope, Composite works but not ExpandableComposite. I investigate further.
Comment 4 Lars Vogel CLA 2017-04-19 15:53:55 EDT
The relevant method is setTitleBarForeground. ExpandableComposite needs a custom CSS handler for this.
Comment 5 Eclipse Genie CLA 2017-04-19 16:13:54 EDT
New Gerrit change created: https://git.eclipse.org/r/95322
Comment 6 Lars Vogel CLA 2017-04-19 16:14:59 EDT
Fabian, you already defined the new CSS handlers for tables and trees. Can you implement one for the ExpandableComposite calling its setTitleBarForeground method? For testing you can use the new test case from the Gerrit.

CSS should be defined in the org.eclipse.ui.forms plug-in.
Comment 7 Eclipse Genie CLA 2017-04-20 10:19:15 EDT
New Gerrit change created: https://git.eclipse.org/r/95387
Comment 9 Lars Vogel CLA 2017-04-20 11:48:09 EDT
Thanks Fabian
Comment 10 Lars Vogel CLA 2017-05-02 07:43:55 EDT
This is not complete. setTitleBackground is ignored at the moment. We need to unconditionally save the color and also allow to set the hyperlink color.
Comment 11 Eclipse Genie CLA 2017-05-02 08:14:45 EDT
New Gerrit change created: https://git.eclipse.org/r/96156
Comment 13 Lars Vogel CLA 2017-05-02 12:49:06 EDT
Fixed, will verify tomorrow.