0

I am running Eclipse version 4.22. I can change the font size of Project Explorer by selecting Window->Preferences->General->Appearance->Colors and Fonts and then selecting a font size for Tree and Table font for views.

I have an Eclipse RCP application built with 4.22, but I cannot do the same thing within my application. Changing the font size for Tree and Table font for views has no effect. How do you change the Tree and Table font size for RCP applications?

mcam11
  • 37
  • 3
  • For a 3.x compatability mode RCP that is all done using the CSS in the `org.eclipse.ui.themes` plug-in. You will have to look at the CSS and work out how to get it to apply to your controls. – greg-449 Oct 03 '22 at 21:05
  • Just testing here with the current Eclipse 2022-09 (4.25) the "Tree and Table font for views" setting just works for some simple test views. How exactly are you creating the tree/table? Are these tree/tables in a view or editor? – greg-449 Oct 04 '22 at 06:41
  • @greg-449 In looking at the code (I inherited this application), it looks like it is adding several predefined views: addView(IPageLayout.ID_PROJECT_EXPLORER), addView(IPageLayout.ID_PROBLEM_VIEW), addView(IPageLayout.ID_TASK_LIST), addView(IPageLayout.ID_PROGRESS_VIEW). If I change the Part title font, it changes the title of all these. But unable to change the body font of these. – mcam11 Oct 04 '22 at 16:50
  • @greg-449 I tried modifying the 28 .css files within the /plugins/org.eclipse.ui.themes*/css directory of my installed application, adding Tree { font-size: 18px } to the end of each (as per this link https://stackoverflow.com/questions/47731327/change-project-explorer-tree-view-font-size-in-eclipse-oxygen) but had no effect when I restarted my application. – mcam11 Oct 04 '22 at 16:58
  • I think the `.MPartStack Tree, .MPartStack Table` style in `common/e4_globalstyle.css` is what sets the style for tree/table in views. – greg-449 Oct 05 '22 at 10:45
  • @greg-449 Thank you for looking into this. Unfortunately, those changes are not having any effect. – mcam11 Oct 07 '22 at 19:41

0 Answers0