From 9084cd8e54cad27c3cf339f7389083cb0321f458 Mon Sep 17 00:00:00 2001 From: John Maguire Date: Sat, 9 Oct 2010 16:14:33 +0000 Subject: [PATCH] Fix pretty image window sizing. --- src/widgets/prettyimage.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/widgets/prettyimage.cpp b/src/widgets/prettyimage.cpp index 5d4610398..5bed3d9f3 100644 --- a/src/widgets/prettyimage.cpp +++ b/src/widgets/prettyimage.cpp @@ -168,8 +168,8 @@ void PrettyImage::contextMenuEvent(QContextMenuEvent* e) { void PrettyImage::ShowFullsize() { // Work out how large to make the window, based on the size of the screen QRect desktop_rect(QApplication::desktop()->availableGeometry(this)); - QSize window_size(qMin(desktop_rect.width() - 20, image_.width() + 2), - qMin(desktop_rect.height() - 20, image_.height() + 2)); + QSize window_size(qMin(desktop_rect.width() - 20, image_.width()), + qMin(desktop_rect.height() - 20, image_.height())); // Create the window QScrollArea* window = new QScrollArea; @@ -183,6 +183,7 @@ void PrettyImage::ShowFullsize() { // Show the label in the window window->setWidget(label); + window->setFrameShape(QFrame::NoFrame); window->show(); }