-->

eclipse rcp e4: how to highlight the selected tab

2019-06-09 23:39发布

问题:

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

What I want (highlight the currently active part):

Thanks a lot!

回答1:

These colors are controlled by your CSS.

Assuming you are using using 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.