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

List:       kde-commits
Subject:    KDE/kdeplasma-addons/applets/weather
From:       Marco Martin <notmart () gmail ! com>
Date:       2010-04-21 17:52:52
Message-ID: 20100421175252.1AD31AC89E () svn ! kde ! org
[Download RAW message or body]

SVN commit 1117264 by mart:

hints such that scrollbars should be always avoded (will have to be less hardcoded)


 M  +13 -0     weatherview.cpp  
 M  +1 -0      weatherview.h  


--- trunk/KDE/kdeplasma-addons/applets/weather/weatherview.cpp #1117263:1117264
@@ -85,7 +85,20 @@
     emit geometryChanged();
 }
 
+QSizeF WeatherView::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
+{
+    switch (which) {
+    case Qt::PreferredSize:
+        return QSizeF(400, 120);
+    case Qt::MinimumSize:
+        return QSizeF(200, 90);
+    case Qt::MaximumSize:
+    default:
+        return QSizeF(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX);
+    }
 }
 
+}
+
 #include <weatherview.moc>
 
--- trunk/KDE/kdeplasma-addons/applets/weather/weatherview.h #1117263:1117264
@@ -42,6 +42,7 @@
 
 protected:
     void resizeEvent(QGraphicsSceneResizeEvent *event);
+    QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint) const;
 
 Q_SIGNALS:
     void geometryChanged(void);
[prev in list] [next in list] [prev in thread] [next in thread] 

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