[Qt-interest] QLabel color with dark themes

Jay L. T. Cornwall jay at jcornwall.me.uk
Fri Aug 14 11:55:05 CEST 2009


Hi David,

> Don't know abou tthe style sheet, but my guess as to why the label as
> different views is a function of the parent widget.  QLabel  inherits
> from QWidget, which sets colors according to its QPalette().   So my
> guess is that the StatusBar Area has a different palette then
> QMainWindow.

Ah, that makes sense, then.

I've traced this to a small hack in the theme I was using which, when 
commented out, fixes the color scheme for both QLabels:

# Fix label in Nautilus (rename text is invisible). This must be at the 
end of  gtkrc to work
style "moomex-label-fix"
{
   fg[NORMAL]   = @text_color
}
class "GtkWidget"  style "moomex-label-fix"

I didn't have any problems in Nautilus without this fix so I've 
commented it out and notified the author. Qt integrates beautifully with 
the QGtkStyle bridge. :)

-- 
Jay L. T. Cornwall
http://www.jcornwall.me.uk/



More information about the Qt-interest-old mailing list