diff --git a/app/fullscreencontent.h b/app/fullscreencontent.h --- a/app/fullscreencontent.h +++ b/app/fullscreencontent.h @@ -92,6 +92,7 @@ void setFullScreenBarHeight(int value); void slotShowThumbnailsToggled(bool value); void slotViewModeActionToggled(bool value); + void adjustSize(); private: KActionCollection* mActionCollection; diff --git a/app/fullscreencontent.cpp b/app/fullscreencontent.cpp --- a/app/fullscreencontent.cpp +++ b/app/fullscreencontent.cpp @@ -120,6 +120,8 @@ layout->setMargin(0); layout->setSpacing(0); + EventWatcher::install(autoHideParentWidget, QEvent::Resize, this, SLOT(adjustSize())); + // mContent mContent = new QWidget; mContent->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); @@ -349,6 +351,12 @@ mAutoHideContainer->setActivated(true); } +void FullScreenContent::adjustSize() +{ + if (mFullScreenMode && mViewPageVisible) { + mAutoHideContainer->adjustSize(); + } +} void FullScreenContent::createOptionsAction() { diff --git a/lib/fullscreenbar.cpp b/lib/fullscreenbar.cpp --- a/lib/fullscreenbar.cpp +++ b/lib/fullscreenbar.cpp @@ -147,8 +147,7 @@ } if (layout()->expandingDirections() & Qt::Horizontal) { - int width = QApplication::desktop()->screenGeometry(window()).width(); - sh.setWidth(width); + sh.setWidth(parentWidget()->width()); } return sh; }