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

List:       kde-commits
Subject:    KDE/kdebase/workspace/plasma/applets/quicklaunch
From:       Aaron J. Seigo <aseigo () kde ! org>
Date:       2009-06-12 23:38:59
Message-ID: 1244849939.103279.24357.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 981239 by aseigo:

set the preferred size of the widget
BUG:196205


 M  +9 -7      quicklaunchApplet.cpp  


--- trunk/KDE/kdebase/workspace/plasma/applets/quicklaunch/quicklaunchApplet.cpp \
#981238:981239 @@ -65,7 +65,7 @@
     setHasConfigurationInterface(true);
     setAcceptDrops(true);
     setAspectRatioMode(Plasma::IgnoreAspectRatio);
-    connect(m_timer,SIGNAL(timeout()), this, SLOT(performUiRefactor()));
+    connect(m_timer, SIGNAL(timeout()), this, SLOT(performUiRefactor()));
     m_timer->setSingleShot(true);
 
     qreal left, top, right, bottom;
@@ -190,6 +190,7 @@
         clearLayout(m_dialogLayout);
         m_dialogLayout->setRowCount((int)(size().height() / qMin(m_dialogIconSize, \
m_dialog->size().height())));  }
+
     int rowCount;
     if (formFactor() == Plasma::Vertical) {
         rowCount = contentsRect().width() / m_iconSize;
@@ -237,6 +238,8 @@
         m_arrow->hide();
     }
 
+    setPreferredSize(m_layout->preferredSize() + QSize(4, 4));
+
     if (m_dialog) {
         m_dialog->close();
         m_dialogLayout->updateGeometry();
@@ -387,17 +390,16 @@
         if (pos >= m_icons.size()) {
            pos = m_icons.size() - 1;
         }
-    
     } else {
         QPointF point = event->pos();
         for(int i = 0; i < m_dialogLayout->count(); i++) {
            QGraphicsLayoutItem *item = m_dialogLayout->itemAt(i);
            if (item->geometry().contains(point)) {
-	      //m_dialogLayout->insertItem(dropedItem, i + 1);
-	      pos = i+1+m_visibleIcons;
-              kDebug() << "The position of Droped Item in dialog is = " << pos;
-              break;
-	   }
+               //m_dialogLayout->insertItem(dropedItem, i + 1);
+               pos = i + 1 + m_visibleIcons;
+               kDebug() << "The position of Droped Item in dialog is = " << pos;
+               break;
+           }
         }
     }
     if (dropHandler(pos, event->mimeData())) {


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

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