Changeset View
Changeset View
Standalone View
Standalone View
app/fullscreencontent.cpp
Show First 20 Lines • Show All 114 Lines • ▼ Show 20 Line(s) | 110 | { | |||
---|---|---|---|---|---|
115 | 115 | | |||
116 | // mAutoHideContainer | 116 | // mAutoHideContainer | ||
117 | mAutoHideContainer = new FullScreenBar(autoHideParentWidget); | 117 | mAutoHideContainer = new FullScreenBar(autoHideParentWidget); | ||
118 | mAutoHideContainer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); | 118 | mAutoHideContainer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); | ||
119 | QVBoxLayout* layout = new QVBoxLayout(mAutoHideContainer); | 119 | QVBoxLayout* layout = new QVBoxLayout(mAutoHideContainer); | ||
120 | layout->setMargin(0); | 120 | layout->setMargin(0); | ||
121 | layout->setSpacing(0); | 121 | layout->setSpacing(0); | ||
122 | 122 | | |||
123 | EventWatcher::install(autoHideParentWidget, QEvent::Resize, this, SLOT(adjustSize())); | ||||
124 | | ||||
123 | // mContent | 125 | // mContent | ||
124 | mContent = new QWidget; | 126 | mContent = new QWidget; | ||
125 | mContent->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); | 127 | mContent->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); | ||
126 | mContent->setAutoFillBackground(true); | 128 | mContent->setAutoFillBackground(true); | ||
127 | EventWatcher::install(mContent, QEvent::Show, this, SLOT(updateCurrentUrlWidgets())); | 129 | EventWatcher::install(mContent, QEvent::Show, this, SLOT(updateCurrentUrlWidgets())); | ||
128 | EventWatcher::install(mContent, QEvent::PaletteChange, this, SLOT(slotPaletteChanged())); | 130 | EventWatcher::install(mContent, QEvent::PaletteChange, this, SLOT(slotPaletteChanged())); | ||
129 | layout->addWidget(mContent); | 131 | layout->addWidget(mContent); | ||
130 | 132 | | |||
▲ Show 20 Lines • Show All 213 Lines • ▼ Show 20 Line(s) | 344 | if (!mFullScreenMode || !mViewPageVisible) { | |||
344 | return; | 346 | return; | ||
345 | } | 347 | } | ||
346 | 348 | | |||
347 | mThumbnailBar->setVisible(GwenviewConfig::showFullScreenThumbnails()); | 349 | mThumbnailBar->setVisible(GwenviewConfig::showFullScreenThumbnails()); | ||
348 | mAutoHideContainer->adjustSize(); | 350 | mAutoHideContainer->adjustSize(); | ||
349 | mAutoHideContainer->setActivated(true); | 351 | mAutoHideContainer->setActivated(true); | ||
350 | } | 352 | } | ||
351 | 353 | | |||
354 | void FullScreenContent::adjustSize() | ||||
355 | { | ||||
356 | if (mFullScreenMode && mViewPageVisible) { | ||||
357 | mAutoHideContainer->adjustSize(); | ||||
358 | } | ||||
359 | } | ||||
352 | 360 | | |||
353 | void FullScreenContent::createOptionsAction() | 361 | void FullScreenContent::createOptionsAction() | ||
354 | { | 362 | { | ||
355 | // We do not use a KActionMenu because: | 363 | // We do not use a KActionMenu because: | ||
356 | // | 364 | // | ||
357 | // - It causes the button to show a small down arrow on its right, | 365 | // - It causes the button to show a small down arrow on its right, | ||
358 | // which makes it wider | 366 | // which makes it wider | ||
359 | // | 367 | // | ||
▲ Show 20 Lines • Show All 126 Lines • Show Last 20 Lines |