From fc96ad7735c1120a9d5f4692e1208581e496c45f Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Wed, 6 Feb 2019 11:52:31 +1100 Subject: [PATCH] use sizehint for viewer sizing, fixes #443 --- ui/viewercontainer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/viewercontainer.cpp b/ui/viewercontainer.cpp index 5ae31db03..8a744f2ec 100644 --- a/ui/viewercontainer.cpp +++ b/ui/viewercontainer.cpp @@ -82,8 +82,8 @@ void ViewerContainer::adjust() { int widget_height = height(); if (!fit) { - widget_width -= vertical_scrollbar->width(); - widget_height -= horizontal_scrollbar->height(); + widget_width -= vertical_scrollbar->sizeHint().width(); + widget_height -= horizontal_scrollbar->sizeHint().height(); } double widget_ar = double(widget_width) / double(widget_height);