summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Vaca <albertvaka@gmail.com>2016-02-22 10:56:17 (GMT)
committerAlbert Vaca <albertvaka@gmail.com>2016-02-22 10:56:17 (GMT)
commitdb212c805fd5f8363806f24c0a33aecab6353dd3 (patch)
tree842ea61d30119ad960d8b1ce8f691e1447b24140
parentaa2c28bc51b715433a6ad18fe08b748ba55d9a4c (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 a6a94ff..2976bf6 100644
--- a/ui/presentationwidget.cpp
+++ b/ui/presentationwidget.cpp
@@ -157,7 +157,6 @@ PresentationWidget::PresentationWidget( QWidget * parent, Okular::Document * doc
// create top toolbar
m_topBar = new PresentationToolBar( this );
m_topBar->setObjectName( QStringLiteral( "presentationBar" ) );
- m_topBar->setIconSize( QSize( 32, 32 ) );
m_topBar->setMovable( false );
m_topBar->layout()->setMargin(0);
m_topBar->addAction( QIcon::fromTheme( layoutDirection() == Qt::RightToLeft ? "go-next" : "go-previous" ), i18n( "Previous Page" ), this, SLOT(slotPrevPage()) );
@@ -1322,7 +1321,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()