[prev in list] [next in list] [prev in thread] [next in thread] 

List:       atlantik-devel
Subject:    [atlantik-cvs] CVS: kdegames/atlantik/libatlantikui
From:       kde () office ! kde ! org
Date:       2003-11-25 1:25:35
[Download RAW message or body]

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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic