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

List:       kde-commits
Subject:    KDE/kdebase/workspace/plasma/applets/devicenotifier
From:       Sebastian Kügler <sebas () kde ! nl>
Date:       2007-11-30 20:48:49
Message-ID: 1196455729.854416.7001.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 743393 by sebas:

Make devicenotifier less space-greedy in the panel

 M  +16 -0     devicenotifier.cpp  
 M  +1 -0      devicenotifier.h  


--- trunk/KDE/kdebase/workspace/plasma/applets/devicenotifier/devicenotifier.cpp \
#743392:743393 @@ -155,7 +155,23 @@
     return Qt::Vertical;
 }
 
+QSizeF DeviceNotifier::contentSizeHint() const
+{
+    QSizeF sizeHint = contentSize();
+    switch (formFactor()) {
+        case Plasma::Vertical:
+            sizeHint.setHeight(sizeHint.width());
+            break;
+        case Plasma::Horizontal:
+            sizeHint.setWidth(sizeHint.height());
+            break;
+        default:
+            break;
+    }
 
+    return sizeHint;
+}
+
 void DeviceNotifier::paintInterface(QPainter *p, const QStyleOptionGraphicsItem \
*option, const QRect &rect)  {
     Q_UNUSED(option)
--- trunk/KDE/kdebase/workspace/plasma/applets/devicenotifier/devicenotifier.h \
#743392:743393 @@ -55,6 +55,7 @@
 
 	void init();
 	Qt::Orientations expandingDirections() const;
+    QSizeF contentSizeHint() const;
         void mousePressEvent(QGraphicsSceneMouseEvent *event);
 	void hoverEnterEvent ( QGraphicsSceneHoverEvent  *event);
 	void paintInterface(QPainter *p, const QStyleOptionGraphicsItem *option, const \
QRect &rect);


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

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