Re: Display magnification factor in status bar

Neil Hodgson <[email protected]> Mon, 10 Jul 2023 18:51:31 -0700 (PDT)
Newsgroups gmane.editors.scite.general
Message-ID <[email protected]>
Georger Araújo:
 

I would like to suggest that SciTE allows displaying the current 
magnification factor in the status bar, like what Windows Notepad does in 
the attached screenshot.


   The zoom factor for SciTE and Scintilla is an integer added to the font 
size, not a magnification percentage. It is an integer in the range -10..20.

   Here is a rough implementation which then requires the user to add 
$(ZoomFactor) somewhere in the statusbar.text.1 property.

diff -r 2dd07921b4c3 src/SciTEBase.cxx
--- a/src/SciTEBase.cxx Mon Jul 10 21:37:11 2023 +1000
+++ b/src/SciTEBase.cxx Tue Jul 11 09:10:16 2023 +1000
@@ -2359,6 +2359,7 @@
  propsStatus.Set("LineNumber", std::to_string(GetCurrentLineNumber() + 1));
  propsStatus.Set("ColumnNumber", std::to_string(GetCurrentColumnNumber() + 
1));
  propsStatus.Set("OverType", wEditor.Overtype() ? "OVR" : "INS");
+ propsStatus.Set("ZoomFactor", std::to_string(wEditor.Zoom()));
 
  const std::string sbKey = "statusbar.text." + std::to_string(sbNum);
  std::string msg = propsStatus.GetExpandedString(sbKey);
@@ -4143,6 +4144,7 @@
 
  case SA::Notification::Zoom:
  SetLineNumberWidth();
+ UpdateStatusBar(false);
  break;
 
  case SA::Notification::ModifyAttemptRO:

   Neil

-- 
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/scite-interest/92bc44c6-1262-458a-b582-333500c5bf04n%40googlegroups.com.