Commit db212c80 authored by Albert Vaca Cintora's avatar Albert Vaca Cintora
Browse files

Make presentation widget tool bar follow the lineedit height

REVIEW: 126050
parent aa2c28bc
......@@ -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()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment