mercredi 31 décembre 2014

How can I make text in meld readable?


A few months ago, meld started behaving oddly. Common lines are almost unreadable, and shown as dark grey text on a black background.


meld fails


Oddly enough, running it as root is fine (with kdesudo meld), although the theme is less pretty.


root meld works


How can I specify the text's colour options for meld?


I'm using:



  • Arch Linux

  • KDE 4.14.3 (also seen in 4.14.2)

  • meld 3.12.2 (also seen in 3.12.1)

  • gtk3 3.14.6 (also seen in 3.14.5)


Troubleshooting


KDE system settings


meld uses GTK3, so I fiddled with System Settings > Common Appearance and Behaviour > Application Appearance > GTK > Select a GTK3 Theme. This change was reflected in meld, but none of the three options I selected changed the text. (The available options were Default, Emacs, and oxygen-gtk; the latter is used in the screenshot above.)


Manually modifying config files


I looked in ~ for files with gtk in their name.



~/.gtkrc-2.0
~/.gtkrc-2.0-kde4
~/.config/gtk-2.0
~/.config/gtk-3.0
~/.kde4/share/config/gtkrc
~/.kde4/share/config/gtkrc-2.0


Interestingly, there is nothing with gtk in its name in /root. Hence, I tried deleting some of the ~ files, to see if I could get the same effect for my user. I presume all the gtkrc-2.0 files are irrelevant to meld.


Firstly, I deleted ~/.config/gtk-3.0, but this had no effect, and was recreated when I opened meld.


The only other option appeared to be ~/.kde4/share/config/gtkrc, so deleted this and started meld, which was unaffected. However, the file was not recreated, and it contains some possibly pertinent lines (e.g. text[ACTIVE] = { 1.000, 1.000, 1.000 }). I'm unsure if the (missing) file was loaded at all. I tried kbuildsycoca4 ; kquitapp plasma-desktop ; sleep 2 ; kstart plasma-desktop, but this had no effect. Do I need to manually reload the gtkrc? And why is this file not being affected/rewritten by the system settings?


(Also, FWIW, I removed ~/.gtkrc-2.0-kde4, which was actually a symlink to ~/.gtkrc-2.0, and I also removed the target itself, but that didn't help. Again, I didn't reload gtk (I'm not sure if this is necessary, or possible), and the files weren't re-created when I tried running meld again.)


Possibly pertinent environment variables



$ export | grep -i gtk
declare -x GTK2_RC_FILES="/etc/gtk-2.0/gtkrc:/home/sparhawk/.gtkrc-2.0:/home/sparhawk/.kde4/share/config/gtkrc-2.0"
declare -x GTK_IM_MODULE="xim"
declare -x GTK_MODULES="canberra-gtk-module"
declare -x GTK_RC_FILES="/etc/gtk/gtkrc:/home/sparhawk/.gtkrc:/home/sparhawk/.kde4/share/config/gtkrc"




(Disclosure: I've previously asked this question on the KDE forums, but didn't come to a solution.)



Aucun commentaire:

Enregistrer un commentaire