How can I configure the font size for the tree item in the package explorer/outline in Eclipse?
Which item in Font under Preferences I should change?
In Eclipse v4.4 (Luna) Service Release 2 (4.4.2) under Windows 7:
If you select the "Windows" theme (Eclipse default configuration)
[Window => Preferences => General->Appearance -> Theme: Windows]
You could add the following code snippet into below css file.
[Eclipse root folder]\plugins\org.eclipse.ui.themes_x.x.x.vxxxxxxxx-xxxx\css\e4_default_win7.css
Tree,
RegistryFilteredTree,
/* the following are required due to Bug 419482 (see <1>): */
Composite > Tree,
TabFolder > Composite > Tree,
TabFolder > Composite > * > Tree,
DocCommentOwnerComposite > Group > Tree,
TabFolder > Composite > ScrolledComposite > Tree,
Shell > Composite > Composite > Tree,
Composite > Composite > Composite > Group > Tree,
Shell > Composite > Composite > Composite > Tree,
ScrolledComposite > Composite > Composite > Composite > Tree,
Shell > Composite > Composite > Composite > Composite > Composite > Tree,
Shell[style~='SWT.RADIO'][style~='SWT.CASCADE'][style~='SWT.SHADOW_ETCHED_IN'][style~='SWT.SHADOW_ETCHED_OUT'][style~='SWT.RESIZE'][style~='SWT.MENU'][style~='SWT.FULL_SELECTION'][style~='SWT.DATE'] > Composite > Tree,
Shell[style~='SWT.RADIO'][style~='SWT.CASCADE'][style~='SWT.SHADOW_ETCHED_IN'][style~='SWT.SHADOW_ETCHED_OUT'][style~='SWT.RESIZE'][style~='SWT.MENU'][style~='SWT.FULL_SELECTION'][style~='SWT.DATE'] > Composite > * > Tree {
font-size: 13;
}
The value of font-size could be set as wish.
If you install other customized theme packages such as the Eclipse Moonrise UI Theme from Eclipse Marketplace, there will be the JAR file under [Eclipse root folder]\plugins
(Example: com.github.eclipseuitheme.themes.moonrise-ui_0.8.9.201404052318.jar)
Modify below the CSS files in this JAR file
\themes\css\moonrise-ui-standalone.css and moonrise-ui-standalone_WIN.css
There is similar code section in these CSS files starting with:
Tree,
RegistryFilteredTree,
Add the "font-size:13;" like the above code snippet and apply via the below steps.
Menu Window → Preferences → General → Appearance → Theme: MoonRise (standalone)
I just found all those answers for changing the tree view font size in Eclipse, tried several and finally got on the CSS class which reads quite more fashionable to me:
The theme I'm using includes the "e4_basestyle.css" in eclipse/opt/plugins/platform/css
. There I added
.MPart Tree {
font-size: 10;
}
which works very fine with me (Eclipse v4.3-SR2 (Kepler) on Ubuntu).
The following solution works on Mac OS with Eclipse v4.4 (Luna).
Choose Mac appearance: menu Window → Preferences → General → Appearances → Theme: Mac.
Add a copy of the following code snippet contained in
plugins/org.eclipse.ui.themes_1.0.1.v20140819-1717/css/dark/e4-dark_globalstyle.css
to the end of the file
plugins/org.eclipse.ui.themes_1.0.1.v20140819-1717/css/e4_default_mac.css.
Tree,
RegistryFilteredTree,
/* The following are required due to Bug 419482 (see <1>): */
Composite > Tree,
TabFolder > Composite > Tree,
TabFolder > Composite > * > Tree,
DocCommentOwnerComposite > Group > Tree,
TabFolder > Composite > ScrolledComposite > Tree,
Shell > Composite > Composite > Tree,
Composite > Composite > Composite > Group > Tree,
Shell > Composite > Composite > Composite > Tree,
ScrolledComposite > Composite > Composite > Composite > Tree,
Shell > Composite > Composite > Composite > Composite > Composite > Tree,
Shell[style~='SWT.RADIO'][style~='SWT.CASCADE'][style~='SWT.SHADOW_ETCHED_IN']
[style~='SWT.SHADOW_ETCHED_OUT'][style~='SWT.RESIZE'][style~='SWT.MENU']
[style~='SWT.FULL_SELECTION'][style~='SWT.DATE'] > Composite > Tree, Shell[style~='SWT.RADIO']
[style~='SWT.CASCADE'][style~='SWT.SHADOW_ETCHED_IN'][style~='SWT.SHADOW_ETCHED_OUT']
[style~='SWT.RESIZE'][style~='SWT.MENU'][style~='SWT.FULL_SELECTION'][style~='SWT.DATE'] > Composite > * > Tree {
font-size: 13;
}
To change fonts in eclipse workspace with ubuntu, I modified system fonts desktop > system > preferences > appearance > fonts also modified eclipse indigo -> windows > preferences > General > Appearances > Colors and fonts. It reflected in eclipse.
I have two screens, a small and a large one. Eclipse is using the size settings from the "main screen". In my case that was a small screen with a scaling of 150%.
Switching the main screen to the large screen resolved the size issues for me.
In Windows 10,
at the left bottom corner click on the Windows symbol, enter "Display settings", then go to "Advanced display settings", then go to "Advanced sizing of text and other items", there You'll find "Change only the text size":
You'll see a list of
Switch at least "Message Boxes" to font size e.g. 13 instead of 9 (for Eclipse Package Explorer Tree).
I would switch "Menus" also to font size 13 (for Eclipse main menu).
Or all of them :-)