From: Flavio Tordini Date: Fri, 4 Sep 2009 09:23:02 +0000 (+0200) Subject: Layout refinements X-Git-Tag: 0.6~6 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=267610cdddd7de2e5982848d82a9e7ca51232e9d;p=minitube Layout refinements --- diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 5225425..41ec0fa 100755 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -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 diff --git a/src/SearchView.cpp b/src/SearchView.cpp index 762f3e1..6d95d96 100644 --- a/src/SearchView.cpp +++ b/src/SearchView.cpp @@ -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);