@b4n requested changes on this pull request.
Looks good apart from the comments below
> @@ -82,6 +82,7 @@ gchar sci_get_char_at (ScintillaObject *sci, gint pos); void sci_scroll_caret (ScintillaObject *sci); gint sci_find_text (ScintillaObject *sci, gint flags, struct Sci_TextToFind *ttf); void sci_set_font (ScintillaObject *sci, gint style, const gchar *font, gint size); +gint sci_get_fontsize (ScintillaObject *sci, gint style);
this should be in the #ifdef GEANY_PRIVATE
section as it's not part of the API
In src/ui_utils.c:
> @@ -305,6 +306,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; + g_string_append_c(stats_str, ' ');
this should probably use sp
like other similar replacements above.
It also probably should be after the actual contents (see for %r
and %m
). %Y
seems to be a little off, and given it's not targeted to the average user and always displays something it's not a good example :)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.