This forum has been archived. All content is frozen. Please use KDE Discuss instead.

[SOLVED] Text in meld and libreoffice is difficult to read

Tags: None
(comma "," separated)
User avatar
sparhawk
Registered Member
Posts
433
Karma
0
OS
A recent update in the past few months makes it very difficult to read some of the text, which is now very dark grey text on a black background.

Image

I opened meld using `kdesudo`, and it looks fine (although the theme wasn't quite so pretty).
Image

I think 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, which is shown in the screenshot above.)

Arch Linux
KDE 4.14.2
meld 3.12.1
gtk3 3.14.5

Last edited by sparhawk on Fri Jan 02, 2015 9:01 am, edited 2 times in total.
User avatar
sparhawk
Registered Member
Posts
433
Karma
0
OS
I also see a dark grey text on a black background when I highlight text in Libreoffice. However, I have `libreoffice-still-kde4` installed, which I think means that it uses qt?

Image
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
The Libreoffice KDE 4 package only provides some theming to Libreoffice - it still uses it's own underlying toolkit which isn't Qt.
Have you tried checking the contents of the various gtk rc files in your ~/?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
sparhawk
Registered Member
Posts
433
Karma
0
OS
bcooksley wrote:The Libreoffice KDE 4 package only provides some theming to Libreoffice - it still uses it's own underlying toolkit which isn't Qt.
Have you tried checking the contents of the various gtk rc files in your ~/?


I had a look around and could find the following files:
Code: Select all
~/.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


I tried `kdesudo meld a b` and the window below was shown. It's not as pretty as meld has been in the past, but it's better than the blackness above.

Image

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 by the system settings?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
The file at ~/.kde4/share/config/gtkrc was probably created by the Gtk KCM at some point in the past - but it is no longer necessary.
Can you try removing ~/.gtkrc-2.0-kde4 as well?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
sparhawk
Registered Member
Posts
433
Karma
0
OS
bcooksley wrote:Can you try removing ~/.gtkrc-2.0-kde4 as well?


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.
User avatar
RGB
Registered Member
Posts
346
Karma
0
OS
I remember several threads on OpenOffice forums about problems with dark themes.

Try uninstalling LibO's KDE4 "integration" package completely: possibly, you'll have better "integration" using the GTK interface (just select an appropriate theme on the GTK module under KDE config settings).


RGB, proud to be a member of KDE forums since 2008-Nov.
And proud to be a kde user since 1.1.2
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Okay, if the usual files are now cleaned we might need to check to see if other files are being considered (through environment variables).
Can you grep the output of "export" for anything related to Gtk?
Code: Select all
export | grep -i gtk


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
sparhawk
Registered Member
Posts
433
Karma
0
OS
RGB wrote:I remember several threads on OpenOffice forums about problems with dark themes.

I had a skim, but couldn't really see anything related.
RGB wrote:Try uninstalling LibO's KDE4 "integration" package completely: possibly, you'll have better "integration" using the GTK interface (just select an appropriate theme on the GTK module under KDE config settings).

I removed `libreoffice-still-kde4`, started Libreoffice Writer again, and the black selection issue had disappeared. However, I decided to test if it really were due to the removal of this package. I reinstalled it, and restarted Writer, and it was still fixed! I'm not sure what might have made the difference.

bcooksley wrote:Can you grep the output of "export" for anything related to Gtk?
Code: Select all
export | grep -i gtk

Code: Select all
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"
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Can you confirm that the two files /home/sparhawk/.gtkrc-2.0 and /home/sparhawk/.kde4/share/config/gtkrc-2.0 have been removed and no longer exist? You will need to restart Gtk applications after doing this.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
sparhawk
Registered Member
Posts
433
Karma
0
OS
bcooksley wrote:Can you confirm that the two files /home/sparhawk/.gtkrc-2.0 and /home/sparhawk/.kde4/share/config/gtkrc-2.0 have been removed and no longer exist? You will need to restart Gtk applications after doing this.


I quit meld, moved these files, restarted meld, and the problems were still present. However, doesn't meld use gtk3, not gtk2? I tested this earlier by changing GTK3 system settings, which were reflected in meld. Also (in Arch), meld depends on gtksourceview3, which depends on gtk3.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
That would explain why removing those files had no effect :)

Then you need to look for and remove the Gtk3 versions of those files in that case.
They should be called gtkrc-3.0 - and found in the same locations.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
sparhawk
Registered Member
Posts
433
Karma
0
OS
bcooksley wrote:That would explain why removing those files had no effect :)

Then you need to look for and remove the Gtk3 versions of those files in that case.
They should be called gtkrc-3.0 - and found in the same locations.


I think I must have been unclear before. I had already found all the files within my home directory with "gtk" in it, as listed in this previous post. These files are as follows.

Code: Select all
~/.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


Previously, I deleted both ~/.config/gtk-3.0 and ~/.kde4/share/config/gtkrc and that made no difference.
User avatar
sparhawk
Registered Member
Posts
433
Karma
0
OS
I'll bump this once, but I get the feeling that we've exhausted all avenues of investigation… :(
User avatar
sparhawk
Registered Member
Posts
433
Karma
0
OS
I discovered that this was a regression introduced in 3.12.1. I emailed the devs, and was told that it was fixed in 3.12.3 (out a few days ago). Arch has since updated to this, and it's all fine now. Apparently there were a few bugs introduced by the GTK+ 3 port. Thanks for all your help!


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, mickae, Sogou [Bot]