commit b9fb2a236e43683942c4bf64c5a79feac4aa355f
Author: Juergen Spitzmueller <[email protected]>
Date: Mon Mar 8 07:33:37 2021 +0100
Keep zoom label width constant (#12186)
---
src/frontends/qt/GuiView.cpp | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index 30de824..e7a129b 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -657,6 +657,11 @@ GuiView::GuiView(int id)
zoom_value_ = new QLabel(statusBar());
zoom_value_->setText(toqstr(bformat(_("[[ZOOM]]%1$d%"), zoom)));
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0))
+ zoom_value_->setMinimumWidth(fm.horizontalAdvance("000%"));
+#else
+ zoom_value_->setMinimumWidth(fm.width("000%"));
+#endif
statusBar()->addPermanentWidget(zoom_value_);
zoom_value_->setEnabled(currentBufferView());
--
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs