use sizehint for viewer sizing, fixes #443

This commit is contained in:
itsmattkc
2019-02-06 11:52:31 +11:00
parent 4812a45cf4
commit fc96ad7735
+2 -2
View File
@@ -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);