Skip to content

Allow to change the font size from keyboard/mouse

Gaël Bonithon requested to merge Tamaranch/mousepad:change-font-size into master

Closes #46 (closed) and #54 (closed), depends on !46 (merged).

This MR first refactors a bit the code around MousepadView properties:

  • replace "font-name" with "font" ("font-name" is deprecated as GtkFontButton property since 3.22, and quite confusing since it's actually some kind of font description);
  • make properties only writable, since it's the only way they are accessed in the code;
  • clarify the way the font is set, depending on whether the default font is used or not.

Then, a little commit adds the ability to increase/decrease the font size from a keybinding (Ctrl +/- by default), or using Ctrl + mouse wheel.

I chose to make this font size change temporary, and only apply to the active view, a bit like Gedit does (although here, a change of font settings reset this temporary change). If we ever want to change that, it won't be a big job.

Merge request reports