Changeset View
Changeset View
Standalone View
Standalone View
lib/fullscreenbar.cpp
Show First 20 Lines • Show All 141 Lines • ▼ Show 20 Line(s) | |||||
142 | QSize FullScreenBar::sizeHint() const | 142 | QSize FullScreenBar::sizeHint() const | ||
143 | { | 143 | { | ||
144 | QSize sh = QFrame::sizeHint(); | 144 | QSize sh = QFrame::sizeHint(); | ||
145 | if (!layout()) { | 145 | if (!layout()) { | ||
146 | return sh; | 146 | return sh; | ||
147 | } | 147 | } | ||
148 | 148 | | |||
149 | if (layout()->expandingDirections() & Qt::Horizontal) { | 149 | if (layout()->expandingDirections() & Qt::Horizontal) { | ||
150 | int width = QApplication::desktop()->screenGeometry(window()).width(); | 150 | sh.setWidth(parentWidget()->width()); | ||
151 | sh.setWidth(width); | | |||
152 | } | 151 | } | ||
rkflx: How about this:
sh.setWidth(parentWidget()->width()); | |||||
muhlenpfordt: Oh no. I could have bet that I tried this. :( | |||||
153 | return sh; | 152 | return sh; | ||
154 | } | 153 | } | ||
155 | 154 | | |||
156 | void FullScreenBar::moveBar(qreal value) | 155 | void FullScreenBar::moveBar(qreal value) | ||
157 | { | 156 | { | ||
158 | move(0, -height() + int(value * height())); | 157 | move(0, -height() + int(value * height())); | ||
159 | 158 | | |||
160 | // For some reason, if Gwenview is started with command line options to | 159 | // For some reason, if Gwenview is started with command line options to | ||
▲ Show 20 Lines • Show All 113 Lines • Show Last 20 Lines |
How about this: