commit be6dc7dd5dc10f79efaaaa2525b2ba77d0b02c46
Author: Juergen Spitzmueller <[email protected]>
Date: Sun Mar 7 17:21:52 2021 +0100
Show zoom value in statusbar
---
src/frontends/qt/GuiView.cpp | 7 +++++--
src/frontends/qt/GuiView.h | 2 ++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index e542dc9..f8929a2 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -654,6 +654,10 @@ GuiView::GuiView(int id)
connect(zoomslider, SIGNAL(valueChanged(int)), this,
SLOT(zoomValueChanged(int)));
connect(this, SIGNAL(currentZoomChanged(int)), zoomslider,
SLOT(setValue(int)));
+ zoom_value_ = new QLabel(statusBar());
+ zoom_value_->setText(toqstr(bformat(_("[[ZOOM]]%1$d%"), zoom)));
+ statusBar()->addPermanentWidget(zoom_value_);
+
int const iconheight = max(int(d.normalIconSize), fm.height());
QSize const iconsize(iconheight, iconheight);
@@ -758,8 +762,7 @@ void GuiView::zoomSliderMoved(int value)
DispatchResult dr;
dispatch(FuncRequest(LFUN_BUFFER_ZOOM, convert<string>(value)), dr);
currentWorkArea()->scheduleRedraw(true);
- message(bformat(_("Zoom level is now %1$d% (default value: %2$d%)"),
- value, lyxrc.defaultZoom));
+ zoom_value_->setText(toqstr(bformat(_("[[ZOOM]]%1$d%"), value)));
}
diff --git a/src/frontends/qt/GuiView.h b/src/frontends/qt/GuiView.h
index 0b2650f..6109460 100644
--- a/src/frontends/qt/GuiView.h
+++ b/src/frontends/qt/GuiView.h
@@ -493,6 +493,8 @@ private:
QLabel * read_only_;
/// Statusbar widget that shows version control status
QLabel * version_control_;
+ /// Statusbar widget that shows zoom value
+ QLabel * zoom_value_;
/// The rate from which the actual zoom value is calculated
/// from the default zoom pref
--
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs