diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/urlbar/completionwidget.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/urlbar/completionwidget.cpp b/src/urlbar/completionwidget.cpp index 3ea35a0b..3a54f890 100644 --- a/src/urlbar/completionwidget.cpp +++ b/src/urlbar/completionwidget.cpp @@ -82,7 +82,14 @@ void CompletionWidget::insertSearchList(const UrlSearchList &list) void CompletionWidget::sizeAndPosition() { // size - setFixedHeight(layout()->count() * 44 ); + int h = 34; + ListItem *widget; + for(int i = 0; i < layout()->count(); ++i) + { + widget = findChild<ListItem *>( QString::number(i) ); + h = qMax(widget->sizeHint().height(), h); + } + setFixedHeight(layout()->count() * (h + 10) ); setFixedWidth( _parent->width() ); // position @@ -206,6 +213,7 @@ bool CompletionWidget::eventFilter( QObject *o, QEvent *e ) } break; + case Qt::Key_Enter: case Qt::Key_Return: hide(); emit chosenUrl(currentUrl().url(), Rekonq::CurrentTab); |