Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a weird problem here using gEdit. It's gEdit 3.2 in Ubuntu 11.10.

When I select some piece of text, this should be white text on orange background (Unity 11.10 default).

Suddenly it started acting different: When I select text, it is white text on actual background color (white on black, for instance).

I don't know if it's related to gEdit or Unity, but sice Ubuntu 11.10 I can change only default font and theme in "Edit -> Preferences -> Fonts & Colors". No other "tweakable" option is available. The problem occurs no matter what theme I chose.

I have no idea why this happens and how to solve this. Has anyone seen something similar?

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

Find the solution myself:

It was a style (theme) problem. Checked again using the default theme and this behave as expected. So I inspected carefully the other themes and found that not all those themes had this problem.

The solution was to edit the theme's code (twilight.xml) to insert the following lines:

<style name="selection" background="orange" />
<style name="selection-unfocused" foreground="white" background="gray" />

By the way, the location of the themes in gEdit 3 differ from gEdit 2. Here it is:

~/.local/share/gtksourceview-3.0/styles/

You can create the directory yourself if it doesn't exist. Further info on style paths here: http://live.gnome.org/GtkSourceView/StyleSchemes

share|improve this answer
    
I have the exact same problem with the WomVamp theme, but editing both the system's or my own file had no effect. –  Ezequiel Muns Aug 17 '12 at 5:13
    
Actually, you must edither define <color> elements, or use hex colors in the arguments. –  Ezequiel Muns Aug 17 '12 at 5:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.