]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Use the Qt layout facilities correctly to align widgets in the information side bar...
authorRobert Knight <robertknight@gmail.com>
Wed, 4 Apr 2007 18:23:29 +0000 (18:23 +0000)
committerRobert Knight <robertknight@gmail.com>
Wed, 4 Apr 2007 18:23:29 +0000 (18:23 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=650506

src/infosidebarpage.cpp

index 889fd21f15ce0def661abbfdd015c7759d7b07dd..19da30c230612d419bb507682f62c19c2e8ffe14 100644 (file)
@@ -103,10 +103,6 @@ InfoSidebarPage::InfoSidebarPage(QWidget* parent) :
     m_actionBox = new KVBox(this);
     m_actionBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
 
-    // Add a dummy widget with no restriction regarding a vertical resizing.
-    // This assures that information is always top aligned.
-    QWidget* dummy = new QWidget(this);
-
     layout->addItem(new QSpacerItem(spacing, spacing, QSizePolicy::Preferred, QSizePolicy::Fixed));
     layout->addWidget(m_preview);
     layout->addWidget(m_name);
@@ -118,7 +114,8 @@ InfoSidebarPage::InfoSidebarPage(QWidget* parent) :
         layout->addWidget( new KSeparator( this ) );
     }
     layout->addWidget(m_actionBox);
-    layout->addWidget(dummy);
+    // ensure that widgets in the information side bar are aligned towards the top
+    layout->addStretch(1);
     setLayout(layout);
 }