summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Tröscher <fritz_van_tom@hotmail.com>2011-08-02 19:20:11 +0200
committerJohannes Tröscher <fritz_van_tom@hotmail.com>2011-08-02 19:20:11 +0200
commit93aab79febb7cc082b8b5a95df34ba1cded4d4b2 (patch)
tree8e089c5faccf5614587733fd29fbd8bac460a17d
parentRevert vi-like shortcuts implementation (diff)
downloadrekonq-93aab79febb7cc082b8b5a95df34ba1cded4d4b2.tar.xz
detect srollbar extent in notifyMessage REVIEW:102182
-rw-r--r--src/mainwindow.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 09e2ae1a..9d2f0ff4 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -1226,9 +1226,9 @@ void MainWindow::notifyMessage(const QString &msg, Rekonq::Notify status)
bool horizontalScrollbarIsVisible = tab->page()->currentFrame()->scrollBarMaximum(Qt::Horizontal);
bool verticalScrollbarIsVisible = tab->page()->currentFrame()->scrollBarMaximum(Qt::Vertical);
- //TODO: detect QStyle sizeHint, instead of fixed 17
- int hScrollbarSize = horizontalScrollbarIsVisible ? 17 : 0;
- int vScrollbarSize = verticalScrollbarIsVisible ? 17 : 0;
+ const int scrollbarExtent = style()->pixelMetric(QStyle::PM_ScrollBarExtent);
+ const int hScrollbarSize = horizontalScrollbarIsVisible ? scrollbarExtent : 0;
+ const int vScrollbarSize = verticalScrollbarIsVisible ? scrollbarExtent : 0;
QPoint webViewOrigin = tab->view()->mapToGlobal(QPoint(0, 0));
QPoint mousePos = tab->mapToGlobal(tab->view()->mousePos());