[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/libs/plasma/widgets
From: Aaron J. Seigo <aseigo () kde ! org>
Date: 2008-01-11 18:17:50
Message-ID: 1200075470.589435.19461.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 760002 by aseigo:
give some shape to the icon
M +9 -0 icon.cpp
M +5 -0 icon.h
--- trunk/KDE/kdebase/workspace/libs/plasma/widgets/icon.cpp #760001:760002
@@ -354,6 +354,15 @@
return d->drawBg;
}
+QPainterPath Icon::shape() const
+{
+ if (d->currentSize.width() < 1) {
+ return QGraphicsItem::shape();
+ }
+
+ return roundedRectangle(QRectF(QPointF(0.0, 0.0), d->currentSize).adjusted(-2, -2, 2, 2), 10.0);
+}
+
QSizeF Icon::Private::displaySizeHint(const QStyleOptionGraphicsItem *option, const qreal width) const
{
if (text.isEmpty() && infoText.isEmpty()) {
--- trunk/KDE/kdebase/workspace/libs/plasma/widgets/icon.h #760001:760002
@@ -191,6 +191,11 @@
*/
bool drawBackground() const;
+ /**
+ * reimplemented from QGraphicsItem
+ */
+ QPainterPath shape() const;
+
public Q_SLOTS:
/**
* Sets the appearance of the icon to pressed or restores the appearance
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic