]> git.sur5r.net Git - minitube/commitdiff
Layout refinements
authorFlavio Tordini <flavio.tordini@gmail.com>
Fri, 4 Sep 2009 09:23:02 +0000 (11:23 +0200)
committerFlavio Tordini <flavio.tordini@gmail.com>
Fri, 4 Sep 2009 09:23:02 +0000 (11:23 +0200)
src/MainWindow.cpp
src/SearchView.cpp

index 5225425be16d45f1918702b2b263b20ce4758d84..41ec0fabd0ee5e34ebf56ede277706ad8dbfc7e1 100755 (executable)
@@ -27,6 +27,7 @@ MainWindow::MainWindow() {
 
     toolbarSearch = new SearchLineEdit(this);
     toolbarSearch->setFont(qApp->font());
+    toolbarSearch->setMinimumWidth(toolbarSearch->fontInfo().pixelSize()*15);
     connect(toolbarSearch, SIGNAL(search(const QString&)), searchView, SLOT(watch(const QString&)));
 
     // build ui
index 762f3e12c8db12f7905a9a52c288f6959b407c5c..6d95d9664f8ec45c0f4506f744c9295dd6e4777d 100644 (file)
@@ -58,15 +58,16 @@ SearchView::SearchView(QWidget *parent) : QWidget(parent) {
     tipLabel->setFont(biggerFont);
     layout->addWidget(tipLabel);
 
+    layout->addSpacing(10);
+
     QHBoxLayout *searchLayout = new QHBoxLayout();
     searchLayout->setAlignment(Qt::AlignVCenter);
 
     queryEdit = new SearchLineEdit(this);
     queryEdit->setFont(biggerFont);
-    queryEdit->setMinimumWidth(300);
+    queryEdit->setMinimumWidth(queryEdit->fontInfo().pixelSize()*15);
     queryEdit->sizeHint();
     queryEdit->setFocus(Qt::OtherFocusReason);
-    // connect(queryEdit, SIGNAL(returnPressed()), this, SLOT(watch()));
     connect(queryEdit, SIGNAL(search(const QString&)), this, SLOT(watch(const QString&)));
     connect(queryEdit, SIGNAL(textChanged(const QString &)), this, SLOT(textChanged(const QString &)));
     searchLayout->addWidget(queryEdit);