mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-31 19:45:31 +01:00
Fix pretty image window sizing.
This commit is contained in:
parent
fb2accea1a
commit
9084cd8e54
@ -168,8 +168,8 @@ void PrettyImage::contextMenuEvent(QContextMenuEvent* e) {
|
|||||||
void PrettyImage::ShowFullsize() {
|
void PrettyImage::ShowFullsize() {
|
||||||
// Work out how large to make the window, based on the size of the screen
|
// Work out how large to make the window, based on the size of the screen
|
||||||
QRect desktop_rect(QApplication::desktop()->availableGeometry(this));
|
QRect desktop_rect(QApplication::desktop()->availableGeometry(this));
|
||||||
QSize window_size(qMin(desktop_rect.width() - 20, image_.width() + 2),
|
QSize window_size(qMin(desktop_rect.width() - 20, image_.width()),
|
||||||
qMin(desktop_rect.height() - 20, image_.height() + 2));
|
qMin(desktop_rect.height() - 20, image_.height()));
|
||||||
|
|
||||||
// Create the window
|
// Create the window
|
||||||
QScrollArea* window = new QScrollArea;
|
QScrollArea* window = new QScrollArea;
|
||||||
@ -183,6 +183,7 @@ void PrettyImage::ShowFullsize() {
|
|||||||
|
|
||||||
// Show the label in the window
|
// Show the label in the window
|
||||||
window->setWidget(label);
|
window->setWidget(label);
|
||||||
|
window->setFrameShape(QFrame::NoFrame);
|
||||||
window->show();
|
window->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user