[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/plasma/applets/kickoff/ui
From: Robert Knight <robertknight () gmail ! com>
Date: 2007-10-23 21:39:04
Message-ID: 1193175544.432856.24826.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 728664 by knight:
Revert back to the previous hover/selected indicator for items: Draw the item \
background using the palette's highlight color and the text using the palette's \
highlighted text color. The use of bold made it difficult for me to spot which item \
was selected, particular when manipulating items with the context menu.
M +8 -1 itemdelegate.cpp
--- trunk/KDE/kdebase/workspace/plasma/applets/kickoff/ui/itemdelegate.cpp \
#728663:728664 @@ -72,6 +72,11 @@
QRect subTitleRect = titleRect;
subTitleRect.translate(0,subTitleRect.height());
+ // draw selected background when hovered
+ if (hover) {
+ painter->fillRect(option.rect,option.palette.highlight());
+ }
+
// draw icon
QIcon decorationIcon = index.data(Qt::DecorationRole).value<QIcon>();
decorationIcon.paint(painter, decorationRect, option.decorationAlignment);
@@ -79,7 +84,9 @@
// draw title and sub-title
QFont titleFont(option.font);
if (hover) {
- titleFont.setBold(true);
+ painter->setPen(QPen(option.palette.highlightedText(),0));
+ } else {
+ painter->setPen(QPen(option.palette.text(),0));
}
painter->save();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic