From b9fb2a236e43683942c4bf64c5a79feac4aa355f Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Mon, 8 Mar 2021 07:33:37 +0100 Subject: [PATCH] Keep zoom label width constant (#12186) --- src/frontends/qt/GuiView.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp index 30de824fc3..e7a129b1a2 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());