]> git.sur5r.net Git - minitube/commitdiff
Really fixed search view
authorFlavio Tordini <flavio.tordini@gmail.com>
Thu, 3 Sep 2009 14:09:43 +0000 (16:09 +0200)
committerFlavio Tordini <flavio.tordini@gmail.com>
Thu, 3 Sep 2009 14:09:43 +0000 (16:09 +0200)
src/SearchView.cpp

index 4837f5fd34f052820386723ba931a33693348ec6..762f3e12c8db12f7905a9a52c288f6959b407c5c 100644 (file)
@@ -19,23 +19,29 @@ SearchView::SearchView(QWidget *parent) : QWidget(parent) {
     smallerFont.setPointSize(smallerFont.pointSize()*.85);
     smallerFont.setBold(true);
 
-    QBoxLayout *mainLayout = new QHBoxLayout();
-    mainLayout->setAlignment(Qt::AlignCenter);
-    mainLayout->setMargin(PADDING);
-
-    QLabel *logo = new QLabel(this);
-    logo->setPixmap(QPixmap(":/images/app.png"));
-    mainLayout->addWidget(logo, 0, Qt::AlignTop);
-    mainLayout->addSpacing(PADDING);
+    QBoxLayout *mainLayout = new QVBoxLayout();
+    mainLayout->setMargin(0);
+    mainLayout->setSpacing(0);
 
     // hidden message widget
     message = new QLabel(this);
     message->hide();
     mainLayout->addWidget(message);
 
+    mainLayout->addStretch();
+
+    QBoxLayout *hLayout = new QHBoxLayout();
+    hLayout->setAlignment(Qt::AlignCenter);
+    mainLayout->addLayout(hLayout);
+
+    QLabel *logo = new QLabel(this);
+    logo->setPixmap(QPixmap(":/images/app.png"));
+    hLayout->addWidget(logo, 0, Qt::AlignTop);
+    hLayout->addSpacing(PADDING);
+
     QVBoxLayout *layout = new QVBoxLayout();
     layout->setAlignment(Qt::AlignCenter);
-    mainLayout->addLayout(layout);
+    hLayout->addLayout(layout);
 
     QLabel *welcomeLabel =
             new QLabel("<h1>" +
@@ -74,7 +80,6 @@ SearchView::SearchView(QWidget *parent) : QWidget(parent) {
     connect(watchButton, SIGNAL(clicked()), this, SLOT(watch()));
     searchLayout->addWidget(watchButton);
 
-
     layout->addItem(searchLayout);
 
     layout->addSpacing(PADDING);
@@ -82,7 +87,8 @@ SearchView::SearchView(QWidget *parent) : QWidget(parent) {
     QHBoxLayout *otherLayout = new QHBoxLayout();
 
     recentKeywordsLayout = new QVBoxLayout();
-    recentKeywordsLayout->setAlignment(Qt::AlignTop | Qt::AlignLeft);
+    recentKeywordsLayout->setSpacing(5);
+    recentKeywordsLayout->setAlignment(Qt::AlignVCenter | Qt::AlignLeft);
     recentKeywordsLabel = new QLabel(tr("Recent keywords").toUpper(), this);
     recentKeywordsLabel->hide();
     recentKeywordsLabel->setForegroundRole(QPalette::Dark);
@@ -93,6 +99,8 @@ SearchView::SearchView(QWidget *parent) : QWidget(parent) {
 
     layout->addLayout(otherLayout);
 
+    mainLayout->addStretch();
+
     setLayout(mainLayout);
 
     updateChecker = 0;