summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Sander <[email protected]>2015-11-15 22:55:30 +0100
committerAlbert Astals Cid <[email protected]>2015-11-15 22:56:13 +0100
commit1e86855b93d12ba3d677c62ab6ba66364ac1ec14 (patch)
treed30ecead1337339aa79e11c76f94455c19ebad83
parent9a5c82a4110baf35ea387b49e992063e86c1939a (diff)
Make presentation widget tool bar follow the lineedit height
REVIEW: 126050
-rw-r--r--ui/presentationwidget.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/presentationwidget.cpp b/ui/presentationwidget.cpp
index d8895e5..e6ecdc5 100644
--- a/ui/presentationwidget.cpp
+++ b/ui/presentationwidget.cpp
@@ -155,7 +155,6 @@ PresentationWidget::PresentationWidget( QWidget * parent, Okular::Document * doc
// create top toolbar
m_topBar = new PresentationToolBar( this );
m_topBar->setObjectName( QLatin1String( "presentationBar" ) );
- m_topBar->setIconSize( QSize( 32, 32 ) );
m_topBar->setMovable( false );
m_topBar->layout()->setMargin(0);
m_topBar->addAction( KIcon( layoutDirection() == Qt::RightToLeft ? "go-next" : "go-previous" ), i18n( "Previous Page" ), this, SLOT(slotPrevPage()) );
@@ -1297,7 +1296,12 @@ void PresentationWidget::repositionContent()
{
const QRect ourGeom = geometry();
- m_topBar->setGeometry( 0, 0, ourGeom.width(), 32 + 10 );
+ // tool bar height in pixels, make it large enough to hold the text fields with the page numbers
+ const int toolBarHeight = m_pagesEdit->height() * 1.5;
+
+ m_topBar->setGeometry( 0, 0, ourGeom.width(), toolBarHeight );
+ m_topBar->setIconSize( QSize( toolBarHeight * 0.75, toolBarHeight * 0.75 ) );
+
}
void PresentationWidget::requestPixmaps()