[gui] Where does Slider's default background come from?

Long story short, I’m switching my Ubuntu Studio 22.04 desktop away from KDE Plasma and back to the Xfce4 desktop that they used to ship (in hopes that it will be more stable on this machine).

One strange thing, though.

I use a dark theme. In Plasma, SC’s Slider appears with a dark-colored background by default. But in Xfce4, it’s much lighter, for no reason that I can determine.

z = Slider(nil, Rect(800, 200, 100, 20)).front;
z.background;
-> Color(0.78039215686275, 0.78039215686275, 0.78039215686275)

z.background.red * 255
-> 199

199, or c7c7c7, is very much on the light end of the spectrum. Compare to the window color QtGUI.palette.color(\window) = Color(0.29803921568627, 0.29803921568627, 0.29803921568627).

In my performance GUI, I can handle it by specifying a background rather than relying on the default. But it also leaves me wondering… where is the color coming from? If I query QtGUI.palette, there is no color that’s even close to this.

p = QtGUI.palette;

#[window, windowText, button, buttonText, brightText, base, baseText, alternateBase, toolTipBase, toolTipText, highlight, highlightText, link, linkVisited].do { |role|
	[role, p.color(role)].postln;
}; ""

[ window, Color(0.29803921568627, 0.29803921568627, 0.29803921568627) ]
[ windowText, Color(1.0, 1.0, 1.0) ]
[ button, Color(0.42745098039216, 0.42745098039216, 0.42745098039216) ]
[ buttonText, Color(1.0, 1.0, 1.0) ]
[ brightText, Color(1.0, 1.0, 1.0) ]
[ base, Color(0.17647058823529, 0.17647058823529, 0.17647058823529) ]
[ baseText, Color(1.0, 1.0, 1.0) ]
[ alternateBase, Color(0.21176470588235, 0.21176470588235, 0.21176470588235) ]
[ toolTipBase, Color(1.0, 1.0, 0.86274509803922) ]
[ toolTipText, Color() ]
[ highlight, Color(0.24705882352941, 0.36862745098039, 0.56862745098039) ]
[ highlightText, Color(1.0, 1.0, 1.0) ]
[ link, Color(0.0, 0.0, 1.0) ]
[ linkVisited, Color(1.0, 0.0, 1.0) ]

I also searched the gtk theme css – no mention of 199 or c7.

It must be defined somewhere… which I would really like to know, so I can fix it.

hjh

This is a shot in the dark, but is it possible this is related to Trolltech.conf?

See 3.4 here:
https://wiki.archlinux.org/title/Uniform_look_for_Qt_and_GTK_applications

Hm, ~/.config/Trolltech.conf does exist, but doesn’t contain any c7c7c7 colors.

That wiki post is a pretty deep dive… not sure that I have time for it in the immediate future, but it’s a good reference, thanks!

hjh