[LyX/master] GuiDelimiter: properly calculate widget width
Juergen Spitzmueller
spitz at lyx.org
Sun Feb 7 16:22:26 UTC 2021
commit 233cfed3331e2a8fef39e2dff483dadbf011b772
Author: Juergen Spitzmueller <spitz at lyx.org>
Date: Sun Feb 7 17:24:59 2021 +0100
GuiDelimiter: properly calculate widget width
---
src/frontends/qt/GuiDelimiter.cpp | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/frontends/qt/GuiDelimiter.cpp b/src/frontends/qt/GuiDelimiter.cpp
index 5b23804..ca5911e 100644
--- a/src/frontends/qt/GuiDelimiter.cpp
+++ b/src/frontends/qt/GuiDelimiter.cpp
@@ -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);
More information about the lyx-cvs
mailing list