commit a9bc0ac27d96f6c057c27a656d048cc9533d798c
Author: Scott Kostyshak <skost...@lyx.org>
Date:   Sat Jun 7 12:36:45 2025 +0200

    Restore non-standard escape for macOS issue
    
    See #12301 for a potential macOS issue where this non-standard
    escape might be needed.
    
    Amends 64789ba4.
    
    Thanks to Pavel.
---
 src/frontends/qt/GuiView.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index 5f48309416..43130323c7 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -730,9 +730,12 @@ GuiView::GuiView(int id)
        zoom_value_->setForegroundRole(statusBar()->foregroundRole());
        zoom_value_->setFixedHeight(fm.height());
 #if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0))
-       zoom_value_->setMinimumWidth(fm.horizontalAdvance("444%"));
+       // The escape is intended (see commit 59b8c209 and #12301),
+       // although it leads to the following Clang warning:
+       //   warning: use of non-standard escape character '\%' [-Wpedantic]
+       zoom_value_->setMinimumWidth(fm.horizontalAdvance("444\%"));
 #else
-       zoom_value_->setMinimumWidth(fm.width("444%"));
+       zoom_value_->setMinimumWidth(fm.width("444\%"));
 #endif
        zoom_value_->setAlignment(Qt::AlignCenter);
        zoom_value_->setText(toqstr(bformat(_("[[ZOOM]]%1$d%"), zoom)));
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to