diff options
| author | Andrea Diamantini <adjam7@gmail.com> | 2010-03-31 09:41:10 +0200 | 
|---|---|---|
| committer | Andrea Diamantini <adjam7@gmail.com> | 2010-03-31 09:41:10 +0200 | 
| commit | 5b4569933c22f85835a7605bd1d59df849b4f36a (patch) | |
| tree | 5418539a13f8418a2f3df6637b09b8acd4374cf7 /src | |
| parent | This is just a stupid idea, but it seems working well.. :) (diff) | |
| download | rekonq-5b4569933c22f85835a7605bd1d59df849b4f36a.tar.xz | |
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
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); | 
