Bug 545239 - TabbedPropertyList tabs don't update color as set in the CSS file until focus is gained
Summary: TabbedPropertyList tabs don't update color as set in the CSS file until focus...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.10   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-09 13:17 EST by Phil Beauvoir CLA
Modified: 2020-04-14 09:56 EDT (History)
1 user (show)

See Also:


Attachments
Screenshot shows first edit part selected - correct (41.01 KB, image/png)
2019-03-09 13:19 EST, Phil Beauvoir CLA
no flags Details
Screenshot shows second edit part selected - incorrect (40.83 KB, image/png)
2019-03-09 13:19 EST, Phil Beauvoir CLA
no flags Details
Initial-color-is-gray (38.22 KB, image/png)
2020-04-09 08:51 EDT, Philippe Dul CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Beauvoir CLA 2019-03-09 13:17:57 EST
This affects a TabbedPropertySheetPage's tabs on the left side.

One can specify the colors used for these in the e4 CSS styling files in the "TabbedPropertyList" section

To see this problem more clearly set the value of swt-tabNormalShadow-color in the "e4_default_win.css" file to red "#ff0000;":

TabbedPropertyList {
   swt-tabAreaBackground-color : #ffffff;
   swt-tabBackground-color     : '#org-eclipse-ui-workbench-ACTIVE_NOFOCUS_TAB_BG_START';
   swt-tabNormalShadow-color   : #ff0000;  /* RED */
   swt-tabDarkShadow-color     : '#org-eclipse-ui-workbench-ACTIVE_NOFOCUS_TAB_SELECTED_TEXT_COLOR';
   color                       : #505050; 
}

In Eclipse or an RCP app that uses tabbed properties:

1. Ensure the Properties View is closed.
2. Select a View Part or Edit Part and show the Properties View. The Tabs are coloured as expected.
3. Select another View Part or Edit Part so that it updates the Properties View. The Tabs are NOT coloured as expected
4. Put the focus on the Properties View by clicking on it. The Tabs are coloured as expected.
Comment 1 Phil Beauvoir CLA 2019-03-09 13:19:01 EST
Created attachment 277813 [details]
Screenshot shows first edit part selected - correct
Comment 2 Phil Beauvoir CLA 2019-03-09 13:19:27 EST
Created attachment 277814 [details]
Screenshot shows second edit part selected - incorrect
Comment 3 Phil Beauvoir CLA 2019-03-09 13:21:42 EST
My theory is that TabbedPropertyList is rendering the tabs before TabbedPropertyList#setWidgetNormalShadowColor() has been called. But setting the focus on the Tabbed Property View corrects this.
Comment 4 Phil Beauvoir CLA 2019-03-10 07:47:44 EDT
A workaround is to call reskin() on TabbedPropertyComposite#getList() (TabbedPropertyList) after creating the controls in an AbstractPropertySection
Comment 5 Eclipse Genie CLA 2020-04-09 08:19:25 EDT
New Gerrit change created: https://git.eclipse.org/r/160709
Comment 6 Philippe Dul CLA 2020-04-09 08:51:50 EDT
Created attachment 282396 [details]
Initial-color-is-gray