[Github-comments] [geany/geany] Show zoom level in status bar. (#1697)
Colomban Wendling
notifications at xxxxx
Fri Oct 4 12:03:15 UTC 2019
b4n commented on this pull request.
> @@ -304,6 +305,21 @@ static gchar *create_statusbar_statistics(GeanyDocument *doc,
g_string_append_printf(stats_str, "%d",
sci_get_style_at(doc->editor->sci, pos));
break;
+ case 'z':
+ zoom = sci_get_zoom(doc->editor->sci);
+ if (zoom != 0)
+ {
+ gint size, percent;
+
+ size = sci_get_fontsize(doc->editor->sci, STYLE_DEFAULT);
+ if (size > 0)
+ {
+ percent = (size + zoom) * 100 / size;
Just FTR, this does not ask for any changes:
This will result in "0%" when zooming out 10 times on a 10pt font, but the font will actually still be visible because [Scintilla never shrinks fonts under 2pt](https://scintilla.org/ScintillaDoc.html#Zooming). However, the user will still have to zoom in 10 times to go back to 100%.
So, this comment is merely an "FTR", I think the behavior is good enough, and if we want to do something about it we should rather prevent actually getting the zoom factor under the minimal displayed value.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1697#pullrequestreview-297428392
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20191004/85171a75/attachment.html>
More information about the Github-comments
mailing list