Details
-
Bug
-
Resolution: Out of scope
-
P4: Low
-
4.7.0
-
None
-
Ubuntu 10.04 and Suse Linux SLED 10.2
Description
The disabled gui elements like buttons or edit fields look like the active ones, especially the buttons. Looking into the deltas between qapplication_win and qapplication_x11, the disabled Palette is initialised different on both OS's.
This was also on QT 3.3.8 but there the disabled gui elements could be better distinguished.
The issue could be resolved if we do implement the same code from qapplication_win in our code.
<code>
#if PRO_OS_LINUX
QPalette pal = qApp->palette();
const QColor bg = pal.background().color();
const QColor fg = pal.foreground().color(), btn = pal.button().color();
QColor disabled( ( fg.red() + btn.red() ) / 2, ( fg.green() + btn.green() ) / 2,
( fg.blue() + btn.blue() ) / 2 );
pal.setColor( QPalette::Disabled, QPalette::WindowText, disabled );
pal.setColor( QPalette::Disabled, QPalette::Text, disabled );
pal.setColor( QPalette::Disabled, QPalette::ButtonText, disabled );
pal.setColor( QPalette::Disabled, QPalette::Base, bg );
qApp->setPalette( pal );
#endif
</code>