Technitribe

interesting problems (and a few solutions, too)

Technitribe
  • About the Authors
  • Log In
  • Log Out
  • Lost Password
  • Register
  • Reset Password
    • 9 Jul 2015

      Eclipse Content Assist Colors

      Written by Alex Wood

      When I write Java, I use Eclipse.  It does what I need it to do, but there are a few things about it that bother me.  One of them is that Eclipse allows very limited control over the color scheme.  Most of the color settings are inherited from the desktop theme that you’re using.  I recently upgraded to Fedora 22 and with the Adwaita theme under XFCE, this is what the Eclipse content assist dropdown looks like:

      Can you read the top selection?

      Can you read the top selection?

      Notice how close the foreground and background colors are for the selected item.  I find that intolerable.  I’m not sure exactly why Eclipse is picking that color combination, because the content assist object is a GtkTreeView which has the selected item background color set to cerulean blue in Adwaita.  In any case, to fix it create ~/.config/gtk-3.0/gtk.css with the following contents:

      
      GtkTreeView:selected {
          background-color: @theme_selected_bg_color;
      }
      

      That snippet will override whatever weirdness is going on with the content assist dropdown and set the background color back to the theme’s default background color for selected items. You can also just set it to a hex value. Note that this setting will apply to any GTK3 application, but that should be all right since you’re just asking the theme to do what it is already doing.

      • Tags »
      • css eclipse fedora 22 gtk3

    4 Comment on “Eclipse Content Assist Colors”

    • Eclipse Graphene | Technitribe

      24 Aug 2015 09:08 am

      […] I noted in an earlier post, Eclipse on Fedora 22 has some usability problems with the colors it uses. Eclipse uses GTK 3 for a […]

    • Druedain

      18 Oct 2015 09:10 am

      Aaaaah! Thank you so much! Searched for this for hours until I found this post :->

      This problem drove me nuts in Plasma 5 with breeze.

    • andrej

      13 Apr 2016 05:04 pm

      does not work with eclipse 4.5 on fedora 23 xfce

    • Alex Wood

      14 Apr 2016 08:04 am

      Andrej,

      Instead of this fix, I would recommend taking a look at this later post. I’ve had the best results with setting Eclipse to use its dark theme and then changing the desktop file to run Eclipse under the Adwaita:dark GTK theme. I’m currently using that solution on Fedora 23 with Eclipse 4.5.1.

    Leave a Reply Cancel reply

    Your email address will not be published. Required fields are marked *

    • The Authors
    • Virtual Disk Guide

      Interested in virtualization? Do QCOWs rule your filesystem? Are you a libvirt or KVM+QEMU wizard? I wrote a book about virtual disk management. Check out the The Linux Sysadmin's Guide to Virtual Disks online for free at ScribesGuides.com.


      Consider supporting the author by purchasing a hard copy of the first edition for just $10.00 on Lulu.com.

    • bitmath

      bitmath is a Python library for dealing with file size units (GiB's, kB's, etc) in a sane way. bitmath supports arithmetic, rich comparison, conversion, automatic best human-readable representation, and many other utility functions. Read some examples on the docs site or check out the source on GitHub.

    • latest posts

      • Querying block device sizes in Python on Linux and Mac OS X February 4, 2023
      • Using jq to filter an array of objects from JSON September 9, 2019
      • Two Year Break — And we’re back! November 16, 2018
    • tags

      bitmath blog conference css dblatex DNS DocBook eclipse Emacs Erlang Fedora fedora 22 filter GNU Screen Haiku Introduction java jboss LCSEE Linux locale locales fix slicehost ubuntu Macports module nist nXML-Mode opengl open source OS X package packaging pki prefix units presentation project pypi Python scholarship si summit Tutorial ubuntu xcode XML XMPP
    • h4ck teh world

      tbielawatbielawa
      • Issue Comment
        bitmath
        February 6, 2023 - 12:55 am UTC
      • Issue Comment
        bitmath
        February 6, 2023 - 12:54 am UTC
      • Push
        bitmath
        February 6, 2023 - 12:51 am UTC
      • Issue Comment
        bitmath
        February 6, 2023 - 12:36 am UTC
      • Push
        bitmath
        February 6, 2023 - 12:30 am UTC

Creative Commons License
Technitribe by Tim Bielawa is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.