GuiDelimiter: properly calculate widget width

This commit is contained in:
Juergen Spitzmueller 2021-02-07 17:24:59 +01:00
parent 0afae1f97d
commit 233cfed333

View File

@ -233,8 +233,13 @@ GuiDelimiter::GuiDelimiter(GuiView & lv)
QSize icon_size(32, 32);
leftLW->setMinimumWidth(5 * icon_size.width());
rightLW->setMinimumWidth(5 * icon_size.width());
// we calculate the appropriate width to fit 4 icons in a row
leftLW->setMinimumWidth((4 * (icon_size.width() + (2 * leftLW->spacing())))
+ (leftLW->frameWidth() * 2)
+ leftLW->verticalScrollBar()->height());
rightLW->setMinimumWidth((4 * (icon_size.width() + (2 * rightLW->spacing())))
+ (rightLW->frameWidth() * 2)
+ rightLW->verticalScrollBar()->height());
leftLW->setIconSize(icon_size);
rightLW->setIconSize(icon_size);