Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the color of Eclipse RCP view title bar

How to change the color of Eclipse RCP view title bar?

like image 694
ccyu Avatar asked Mar 10 '09 02:03

ccyu


1 Answers

You can change the color with this is possible with the org.eclipse.ui.themes Extension-Point.

Here's an example snippet

   <extension
         point="org.eclipse.ui.themes">
      <theme
            id="de.spiritlink.custom.ui.theme"
            name="Custom Theme">
         <colorOverride
               id="org.eclipse.ui.workbench.ACTIVE_TAB_BG_END"
               value="255,0,0">
         </colorOverride>
         <colorOverride
               id="org.eclipse.ui.workbench.ACTIVE_TAB_BG_START"
               value="0,255,0">
         </colorOverride>
      </theme>
   </extension>

Setting the theme programmatically with IThemeManager, which is an object that contains references to usable ITheme objects and maintains a reference to the currently active theme. This theme will be used by the workbench to decorate tab folders and other controls where possible:

PlatformUI.getWorkbench().getThemeManager().setCurrentTheme("myThemeID");

Other details in thoses articles:

  • Adding Color and Font preferences
  • RCP Custom Look and Feel
like image 125
VonC Avatar answered Sep 29 '22 19:09

VonC