From 5b4569933c22f85835a7605bd1d59df849b4f36a Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 31 Mar 2010 09:41:10 +0200 Subject: This patch solves some problems of clipped text I cannot value this is completely safe, but sizeAndPosition() slot is surely something to take care.. Courtesy patch from Peter Hedlund. Thanks :) CCMAIL:peter@peterandlinda.com CCMAIL:rekonq@kde.org --- src/urlbar/completionwidget.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') 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( 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); -- cgit v1.2.1