[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Using the selected text color in the date picker
From: Reinhold Kainhofer <reinhold () kainhofer ! com>
Date: 2004-03-25 11:17:06
Message-ID: 200403251217.09475.reinhold () kainhofer ! com
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Attached is a patch that fixes the KDateTable to use the correct text color
for the selected text. So far, it always used white (hardcoded) for the
selected day, even if the system-wide color setting used a light selection
color and a dark selected text color. This was reported as bug 78162 for
korganizer, but is a general date picker bug.
Okay to apply the patch and close the report?
The other problem in the date table is the hardcoded gray color for days
outside the current month. Any ideas how to determine that value
automaticallly from the system-wide color settings? Using inactiveTextColor
doesn't work, as that would be white text on white background here...
Reinhold
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAYr+1TqjEwhXvPN0RAsrmAJwI8ECBubZwN0AXbJd5BaqjfbOPzgCfaeZo
qjWNzAHhhTOXmsjamM3btsg=
=+YfB
-----END PGP SIGNATURE-----
["2004-03-25_KDateTable_UseSystemColors_Bug78162.patch" (text/x-diff)]
? 2004-03-25_KDateTable_UseSystemColors_Bug78162.patch
Index: kdatetbl.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdeui/kdatetbl.cpp,v
retrieving revision 1.76
diff -u -p -3 -r1.76 kdatetbl.cpp
--- kdatetbl.cpp 20 Oct 2003 11:22:06 -0000 1.76
+++ kdatetbl.cpp 25 Mar 2004 11:13:11 -0000
@@ -218,6 +218,8 @@ KDateTable::paintCell(QPainter *painter,
{ // we are either
// ° painting a day of the previous month or
// ° painting a day of the following month
+ // TODO: don't hardcode gray here! Use a color with less contrast to the \
background than normal text. +// painter->setPen( \
KGlobalSettings::inactiveTextColor() ); painter->setPen(gray);
} else { // paint a day of the current month
if ( d->useCustomColors )
@@ -259,11 +261,11 @@ KDateTable::paintCell(QPainter *painter,
{ // draw the currently selected date
painter->setPen(KGlobalSettings::highlightColor());
painter->setBrush(KGlobalSettings::highlightColor());
- pen=white;
+ pen=KGlobalSettings::highlightedTextColor();
} else {
painter->setPen(KGlobalSettings::calculateAlternateBackgroundColor(KGlobalSettings::highlightColor()));
painter->setBrush(KGlobalSettings::calculateAlternateBackgroundColor(KGlobalSettings::highlightColor()));
- pen=white;
+ pen=KGlobalSettings::highlightedTextColor();
}
} else {
painter->setBrush(KGlobalSettings::baseColor());
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic