[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: kickoff highlight -- please help
From: Marco Martin <notmart () gmail ! com>
Date: 2008-02-28 13:45:14
Message-ID: 200802281445.15229.notmart () gmail ! com
[Download RAW message or body]
On Thursday 28 February 2008, Celeste Lyn Paul wrote:
> Hello Artists!
>
> Panel-devel need your help. We've been trying to come up with ways to make
> full-width hover on the kickoff menu look nice. It would be awesome if you
> could help us out and come up with some ideas and sample mockups.
>
> These messages have screenshots or links to screenshots with sample ideas
> of the full-width hover:
>
> http://mail.kde.org/pipermail/panel-devel/2007-November/002888.html
> http://mail.kde.org/pipermail/panel-devel/2008-February/007819.html
> http://mail.kde.org/pipermail/panel-devel/2008-February/007822.html
created a little patch of my proposal (the last one)
it works, but the code to make the highlight without margin it's a little bit
clumsy and buggy, it would require a deeper rework to do it properly (i think
it looks good only if there is absolutely no margin both left and right)
i think it looks a bit better of the default look without coloring too much an
empty space
Cheers,
Marco Martin
>
> Your mission, if you choose to accept it, is to make it look a hella lot
> prettier than we managed to do it. Something shiney and sexy that can
> complement the shiney and sexy that oxygen is bringing to KDE everywhere
> else.
>
> Cheers,
>
> ~ Celeste
["kickoff_fulllightgradient.diff" (text/x-diff)]
Index: flipscrollview.cpp
===================================================================
--- flipscrollview.cpp (revision 779902)
+++ flipscrollview.cpp (working copy)
@@ -479,7 +479,16 @@
} else {
const QModelIndex itemUnderMouse = indexAt(event->pos());
if (itemUnderMouse != d->hoveredIndex && itemUnderMouse.isValid()) {
+ QRect updateRect(visualRect(itemUnderMouse));
+ updateRect.setLeft(rect().x());
+ updateRect.setRight(rect().right());
+ setDirtyRegion(updateRect);
update(itemUnderMouse);
+
+ updateRect = visualRect(d->hoveredIndex);
+ updateRect.setLeft(rect().x());
+ updateRect.setRight(rect().right());
+ setDirtyRegion(updateRect);
update(d->hoveredIndex);
d->hoveredIndex = itemUnderMouse;
Index: itemdelegate.cpp
===================================================================
--- itemdelegate.cpp (revision 779902)
+++ itemdelegate.cpp (working copy)
@@ -102,6 +102,12 @@
if (hover) {
painter->save();
painter->setPen(Qt::NoPen);
+
+ QLinearGradient backGradient(contentRect.topLeft(), contentRect.bottomLeft());
+ backGradient.setColorAt(0, option.palette.color(QPalette::Base).darker(102));
+ backGradient.setColorAt(1, option.palette.color(QPalette::Base).darker(110));
+ painter->fillRect(contentRect.adjusted(-ITEM_LEFT_MARGIN,0,ITEM_RIGHT_MARGIN,1), backGradient);
+
QColor backgroundColor = option.palette.color(QPalette::Highlight);
QFontMetrics titleMetrics(titleFont);
QFontMetrics subTitleMetrics(subTitleFont);
@@ -114,7 +120,9 @@
// use a slightly translucent version of the palette's highlight color
// for the background
backgroundColor.setAlphaF(0.5);
- painter->setBrush(QBrush(backgroundColor));
+ backGradient.setColorAt(0, backgroundColor.lighter(104));
+ backGradient.setColorAt(1, backgroundColor.darker(104));
+ painter->setBrush(QBrush(backGradient));
painter->drawPath(Plasma::roundedRectangle(textAreaRect, 5));
painter->restore();
}
_______________________________________________
Panel-devel mailing list
Panel-devel@kde.org
https://mail.kde.org/mailman/listinfo/panel-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic