How to change the highlight color in autocomplete box in Eclipse

前端 未结 7 1642
萌比男神i
萌比男神i 2020-12-04 12:11

I can\'t find a way to change the color of the highlighted selection in the autocomplete box in Eclipse.

\"enter

相关标签:
7条回答
  • 2020-12-04 12:50

    for Ubuntu 12.04, simply edit the file /usr/share/themes/Ambiance/gtk-2.0/gtkrc search for

      base[ACTIVE]      = shade (0.94, @bg_color)
    

    change the shade percentage from 0.94 to whatever visible like 0.54

      base[ACTIVE]      = shade (0.54, @bg_color)
    

    then it works.

    0 讨论(0)
  • 2020-12-04 12:53

    You do not need to use the command prompt at all.

    Window -> Preferences -> General -> Appearance -> Colors and Fonts -> Basic -> Content Assist background color / Content Assist foreground color

    Everything is customizable via the GUI.

    how to change the content assist color in eclipse

    0 讨论(0)
  • 2020-12-04 12:54

    Alternatively you can update the variables at the top of the gtkrc file. For your particular problem it would be selected_fg_color, not tooltip_fg_color, for example, change it from white to black(#000000). Here are my settings:

    gtk-color-scheme = "base_color:#ffffff\nfg_color:#4c4c4c\ntooltip_fg_color:#000000\n
    selected_bg_color:#f07746\nselected_fg_color:#000000\n
    text_color:#3C3C3C\nbg_color:#F2F1F0\ntooltip_bg_color:#FFFFFF\nlink_color:#DD4814"
    
    0 讨论(0)
  • 2020-12-04 12:54

    This may looks easy seems. That is change the color theme of eclipse. Windows-> Preference -> Appearance -> Color theme.

    0 讨论(0)
  • 2020-12-04 12:57

    How to change it for all Ubuntu themes

    On Ubuntu you can add a fix to the Appearance theme:

    • Open a terminal ( CTRL + ALT + T )
    • Create a new file with: gedit ~/.gtkrc-2.0
    • In that file add these lines:

      style "eclipse_fix" 
      { 
      base[ACTIVE] = shade(0.7, "#F2F1F0") 
      }
      
      class "GtkTreeView" style "eclipse_fix"
      
    • Save file

    • In System Settings > Appearance, switch to an other theme and then switch back to the theme you had. This is done to "refresh" the current theme with the fix. (Alternatively, log out and log in again.)
    • Test in Eclipse, hopefully your content assist will be readable ;)
    0 讨论(0)
  • 2020-12-04 13:02

    This problem can also be fixed from within Eclipse, as is described in the blog post Fix Eclipse colours in ubuntu 12.04.

    1. Go into the Preferences (Window -> Preferences)
    2. Choose General -> Appearance from the left menu
    3. Uncheck the checkbox Use mixed fonts and colours for labels

    Before

    the bad colored code completion window in eclipse

    After

    enter image description here

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