Currently, we only have 'enlarge font' and 'reduce font' options in 'Settings > Configure Shortcuts'. A keyboard shortcut to reset the default font size would be useful to quickly recover when one accidentally changes the font size (sometimes I accidentally press ctrl while scrolling). This could be bound by default to 'ctrl+0', since people are probably used to that from web browsers.
Konsole now has this, added with https://cgit.kde.org/konsole.git/commit/?id=f6e432ab0c04226bd772019911b97298070d1264
Maybe you could work on a patch, copying how it was done for Konsole?
There was in the past a nice feature where one wheel tick was ignored when the font has the default size. But since some weeks is it gone. No idea why that was "fixed".
(In reply to Nate Graham from comment #1)
> Konsole now has this, added with
> Maybe you could work on a patch, copying how it was done for Konsole?
I have a working patch now, in the sense that the action appears in the shortcuts manager and if one manually assigns a shortcut to it, one can reset the font sizes. However, I still haven't figured out how to get it to show in the 'Edit' menu, or how to correctly assign a default shortcut for it.
> I still haven't figured out how to get it to show in the 'Edit' menu,
On top of these ui/xml is a version number you need to increase
You have to add an entry into the KTextEditor ui.rc file:
Note: you have to increase the version number from 82 to 83, otherwise it will not update caches.
Could you post your patch on phabricator.jde.orf?
I've posted it here: https://phabricator.kde.org/D21412
Git commit 968af10fd4b64cccf6a858f105ac6cfad9fce78e by Christoph Cullmann, on behalf of Kishore Gopalakrishnan.
Committed on 26/05/2019 at 11:51.
Pushed by cullmann into branch 'master'.
Add action to reset font size
Summary: Add an action to reset the font size to the default and set the default shortcut to Ctrl+0
Zoom out the text. Press Ctrl+0 to go back to default zoom.
Do the same with the 'Reset font size' item in the 'View' menu.
Try to reassign the keyboard shortcut in the shortcuts manager and check that it works.
Reviewers: #ktexteditor, cullmann
Reviewed By: #ktexteditor, cullmann
Subscribers: cullmann, kwrite-devel, kde-frameworks-devel
Tags: #kate, #frameworks
Differential Revision: https://phabricator.kde.org/D21412
M +6 -3 src/data/katepart5ui.rc
M +6 -0 src/render/katerenderer.cpp
M +1 -0 src/render/katerenderer.h
M +7 -0 src/view/kateview.cpp
M +5 -0 src/view/kateviewinternal.cpp
M +1 -0 src/view/kateviewinternal.h