Search code examples
javaeclipsercpe4

eclipse rcp e4: how to highlight the selected tab in part stack?


What I have now (notice there is no highlight):

enter image description here

What I want (highlight the currently active part):

enter image description here

Thanks a lot!


Solution

  • These colors are controlled by your CSS.

    Assuming you are using the usual e4 tab renderer the selected tab color can be set with:

    .MPartStack.active {
         swt-selected-tabs-background: #E5EDFC #99BAF3 100%;
    }
    

    By the 'usual tab renderer' I mean:

    .MPartStack {
        swt-tab-renderer: url('bundleclass://org.eclipse.e4.ui.workbench.renderers.swt/org.eclipse.e4.ui.workbench.renderers.swt.CTabRendering');
    }
    

    Update:

    Inactive tab colors are controlled by the swt-unselected-tabs-color value.