summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-11-20 23:30:07 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-11-20 23:30:07 (GMT)
commit94d7b0822e041740232f9d4b0f1e0f9f3dee1dd4 (patch)
treeaf20d1b6d3e402bef82260d35b4c8313faa3a749 /Swift
parentce4b7dc190c609520850a94d0a38d87002ff9f12 (diff)
downloadswift-94d7b0822e041740232f9d4b0f1e0f9f3dee1dd4.zip
swift-94d7b0822e041740232f9d4b0f1e0f9f3dee1dd4.tar.bz2
Logo should stay in the centre when login window is resized.
Resolves: #675 Release-Notes: The Swift logo will now remain in the centre when the login window is resized.
Diffstat (limited to 'Swift')
-rw-r--r--Swift/QtUI/QtLoginWindow.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/Swift/QtUI/QtLoginWindow.cpp b/Swift/QtUI/QtLoginWindow.cpp
index 3d508cf..4bf5691 100644
--- a/Swift/QtUI/QtLoginWindow.cpp
+++ b/Swift/QtUI/QtLoginWindow.cpp
@@ -19,6 +19,7 @@
#include <QToolButton>
#include <QLabel>
#include <QMenuBar>
+#include <QHBoxLayout>
#include <qdebug.h>
#include "Swift/Controllers/UIEvents/UIEventStream.h"
@@ -60,7 +61,16 @@ QtLoginWindow::QtLoginWindow(UIEventStream* uiEventStream) : QMainWindow() {
logo->setPixmap(QPixmap(":/logo-shaded-text.256.png"));
logo->setScaledContents(true);
logo->setFixedSize(192,192);
- layout->addWidget(logo);
+
+ QWidget *logoWidget = new QWidget(this);
+ QHBoxLayout *logoLayout = new QHBoxLayout();
+ logoLayout->setMargin(0);
+ logoLayout->addStretch(0);
+ logoLayout->addWidget(logo);
+ logoLayout->addStretch(0);
+ logoWidget->setLayout(logoLayout);
+ layout->addWidget(logoWidget);
+
layout->addStretch(2);
QLabel* jidLabel = new QLabel(this);