From 6a4d023fc9f74c000debd442ec0089d677dbe957 Mon Sep 17 00:00:00 2001 From: csoler Date: Sun, 25 Jan 2009 12:18:16 +0000 Subject: [PATCH] added a layout to hasing info widget to get it left-aligned git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@943 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/MainWindow.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/retroshare-gui/src/gui/MainWindow.cpp b/retroshare-gui/src/gui/MainWindow.cpp index 698e98776..7b54c0f32 100644 --- a/retroshare-gui/src/gui/MainWindow.cpp +++ b/retroshare-gui/src/gui/MainWindow.cpp @@ -312,8 +312,23 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags) peerstatus = new PeerStatus(); statusBar()->addWidget(peerstatus); - _hashing_info_label = new QLabel("") ; - statusBar()->addPermanentWidget(_hashing_info_label); + QWidget *widget = new QWidget(); + QSizePolicy sizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); + sizePolicy.setHorizontalStretch(0); + sizePolicy.setVerticalStretch(0); + sizePolicy.setHeightForWidth(widget->sizePolicy().hasHeightForWidth()); + widget->setSizePolicy(sizePolicy); + QHBoxLayout *horizontalLayout = new QHBoxLayout(widget); + horizontalLayout->setContentsMargins(0, 0, 0, 0); + horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + _hashing_info_label = new QLabel(widget) ; + _hashing_info_label->setObjectName(QString::fromUtf8("label")); + + horizontalLayout->addWidget(_hashing_info_label); + QSpacerItem *horizontalSpacer = new QSpacerItem(1000, 0, QSizePolicy::Expanding, QSizePolicy::Minimum); + horizontalLayout->addItem(horizontalSpacer); + + statusBar()->addPermanentWidget(widget); _hashing_info_label->hide() ; statusBar()->addPermanentWidget(statusRates = new QLabel(tr("Down: 0.00 (kB/s) | Up: 0.00 (kB/s) ")));