Color settings only affect LXAppearance window (temporarily)

The standard theme switcher of LXDE - http://wiki.lxde.org/en/LXAppearance
Locked
evilgnome
Posts: 1
Joined: Sun Sep 26, 2010 12:48 am

Color settings only affect LXAppearance window (temporarily)

Post by evilgnome »

Hi, I have lxappearance-2 installed from git (20100925). I update all the time hoping this problem will be fixed. Since it hasn't, I'm wondering if this is something particular to my setup.

1) open lxappearance
2) click "Color" tab
3) check "Use customized color scheme"
4) change colors
5) click apply
6) note that although the lxappearance window itself respects the new settings, no other gtk program does

7) click close
8) open lxappearance
9) click "Color" tab
10) note that none of the color choices are saved, and "Use customized color scheme" is unchecked

I don't run lxde as a desktop environment, does this functionality require other components?
I'm on arch linux.

Thanks for any help,
Andy
ShadowKyogre
Posts: 1
Joined: Thu Sep 30, 2010 8:59 pm

Re: Color settings only affect LXAppearance window (temporarily)

Post by ShadowKyogre »

I get the same error, but it doesn't seem to need any other components as far as I can tell. Get the source code and look at src/lxappearance.c lines 186-193

Code: Select all

    if(app.color_scheme)
    {
        char* escaped = g_strescape(app.color_scheme, NULL);
        g_string_append_printf(content,
            "gtk-color-scheme=\"\"\n",
            escaped);
        g_free(escaped);
    }
It should read that, explaining why it only writes the gtk-color-scheme="" when compared to 151-163

Code: Select all

    if(app.widget_theme)
        g_string_append_printf(content,
            "gtk-theme-name=\"%s\"\n", app.widget_theme);
    if(app.icon_theme)
        g_string_append_printf(content,
            "gtk-icon-theme-name=\"%s\"\n", app.icon_theme);
    if(app.default_font)
        g_string_append_printf(content,
            "gtk-font-name=\"%s\"\n", app.default_font);
    if(app.cursor_theme)
        g_string_append_printf(content,
            "gtk-cursor-theme-name=\"%s\"\n", app.cursor_theme);
    save_cursor_theme_name();
The corresponding lxappearance.h shows that the color is stored as a string, meaning that it's getting stored, but it's not printing out on file because nothing is telling it to. I'm currently fixing this right now, and the fix is almost done. The only thing I need to do is to fix the output, since it's now outputting the colors on my fix.

Output:

Code: Select all

gtk_color_scheme="tooltip_fg_color:#FF0000
selected_bg_color:#ff0000
tooltip_bg_color:#400000
base_color:#400000
fg_color:#ff0000
text_color:#ff0000
selected_fg_color:#f00
bg_color:#19002E
"
*edit* https://sourceforge.net/tracker/?func=d ... tid=894869 filed bug
lodger
Posts: 33
Joined: Fri Mar 21, 2014 7:01 pm

Re: Color settings only affect LXAppearance window (temporar

Post by lodger »

In what file does LXDE saves the color scheme?
drooly
Posts: 791
Joined: Mon Apr 08, 2013 6:45 am

Re: Color settings only affect LXAppearance window (temporar

Post by drooly »

why would you use a git version of lxappearance from 2010?
i'm using arch, and my version is:
community/lxappearance 0.5.5-1
the color-scheme gets written to ~/.gtkrc-2.0 when i press apply,
BUT:
my version of gtk2 does not support color schemes.
Locked