From atlantik-devel Tue Nov 25 01:25:35 2003 From: kde () office ! kde ! org Date: Tue, 25 Nov 2003 01:25:35 +0000 To: atlantik-devel Subject: [atlantik-cvs] CVS: kdegames/atlantik/libatlantikui X-MARC-Message: https://marc.info/?l=atlantik-devel&m=106972362315292 Update of /home/kde/kdegames/atlantik/libatlantikui In directory office:/tmp/cvs-serv31606/libatlantikui Modified Files: Tag: atlantik_3_3_branch estatedetails.cpp Log Message: color buttons again, and make sure the text is readable (#52935) Index: estatedetails.cpp =================================================================== RCS file: /home/kde/kdegames/atlantik/libatlantikui/estatedetails.cpp,v retrieving revision 1.25 retrieving revision 1.25.2.1 diff -u -d -r1.25 -r1.25.2.1 --- estatedetails.cpp 12 Nov 2003 18:08:54 -0000 1.25 +++ estatedetails.cpp 25 Nov 2003 01:25:31 -0000 1.25.2.1 @@ -215,6 +215,15 @@ m_buttonCommandMap[(QObject *)button] = command; m_buttonBox->addWidget(button); + if (m_estate) + { + QColor bgColor, fgColor; + bgColor = m_estate->bgColor().light(110); + fgColor = ( bgColor.red() + bgColor.green() + bgColor.blue() < 255 ) ? Qt::white : Qt::black; + + button->setPaletteForegroundColor( fgColor ); + button->setPaletteBackgroundColor( bgColor ); + } button->setEnabled(enabled); button->show(); _______________________________________________ atlantik-cvs mailing list atlantik-cvs@kde.org https://mail.kde.org/mailman/listinfo/atlantik-cvs