Change Project Explorer tree view font size in Eclipse Oxygen

前端 未结 12 1227
难免孤独
难免孤独 2020-12-24 08:04

I am using Eclipse Version: Oxygen.1a Release (4.7.1a) and I want to enlarge the Project Explorer tree view font size because I have some sight issues and thus I searched ma

相关标签:
12条回答
  • 2020-12-24 08:54

    In my case using a MacBook 13", I had to edit the following file /Users/myuser/.p2/pool/plugins/org.eclipse.ui.themes_1.2.800.v20191030-0746/css/e4-dark_mac1013.css

    Then I searched for this existing item and added the font-size and font-size-adjust. Doing that prevents the tree line to be cropped:

    CTabFolder Tree, CTabFolder Canvas {
        background-color: #2F2F2F;
        color: #CCC;
        font-size-adjust: none;
        font-size: 14px;
    }
    
    0 讨论(0)
  • 2020-12-24 08:55

    ECLIPSE FONT CHANGE - Change below to 2 css files.

    eclipse/plugins/org.eclipse.ui.themes_x.x.x.vxxxxx/css/e4_basesetyle.css eclipse/plugins/org.eclipse.ui.themes_x.x.x.vxxxxx/css/dark/e4-dark_globalstyle.css

    #org-eclipse-jdt-ui-PackageExplorer Tree,
    #org-eclipse-ui-navigator-ProjectExplorer Tree {
        font-size: 10px; /* <-- Desired font size */
        font: Consolas;  /* <-- Font you want to have */
    }
    

    and change preference -> General > Appearance > Colors and Fonts > Basic > Text Font : Consolas 12px

    0 讨论(0)
  • 2020-12-24 08:56

    I'm using eclipse-neon on Ubuntu on Windows-10. The graphical interface is not supported by Microsoft at this time, but I have been using Eclipse Neon and it works decently enough. I added the following to the end of one file: eclipse/plugins/org.eclipse.ui.themes_1.1.300.v20161107-1827/css/e4_default_gtk.css:

    .MPart Tree {
    font-family: Sans Regular;
    font-size: 8;
    }
    

    My intent was to make the font smaller, and it worked successfully.

    0 讨论(0)
  • 2020-12-24 08:56

    I have been searching this for every version of Eclipse and finally I got something which helped me to increase the font size and font type of of the project explorer.

    1.go to below path on your local environment

    .p2 -> pool -> plugins -> org.eclipse.ui.themes_(version) -> css -> e4_basestyle

    2.paste below lines at the end of the file.

    Tree {
         font-size: 14px; /* <-- Desired font size */
         font: Consolas;  /* <-- Font you want to have */
    }
    
    1. Restart the eclipse
    2. You will get the new defined size and font in your project explorer of eclipse.

    NOTE : I tried this on latest version of the eclipse on windows 10 and it worked for me. I did not tried on the previous version.

    0 讨论(0)
  • 2020-12-24 09:00

    There is now (Eclipse 4.17, July 2020) an official setting:

    The font used for tree and table views can now be customized with a font preference. This preference is called "Tree and Table font for views" and can be found in Window > Preferences > General > Appearance > Colors and Fonts under the "View and Editor Folders" category.

    The Project Explorer is an example of a view that gets affected by this font preference.

    0 讨论(0)
  • 2020-12-24 09:03

    Thanks so much! I can finally see the Eclipse Project Explorer clearly! I was able to change the project explorer tree font size by making the css file addition shown above in Windows 7 with Eclipse 2018-9 (4.9.0).

    The specific folder location I found was at:

    C:\Users\myUserName\.p2\pool\plugins\org.eclipse.ui.themes_1.2.200.v20180828-1350\css
    

    Apparently, from my investigation of solving this problem the specific folder location varies based on different factors like Eclipse Version and OS.
    So I searched on the css file names to find the latest folder.

    I had 7 eclipse themes folders on my workstation, I used the most recent one, corresponding to the specific install/update of Eclipse being currently used.

    0 讨论(0)
提交回复
热议问题