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);