Add reset font size shortcut
ClosedPublic

Authored by lbergdoll on Sep 9 2018, 4:22 PM.

Details

Summary

Whenever I change the font size doing so is usually temporary and I usually go back to the default font size in after a short time. Currently I do so by changing to a different profile and discarding the change, which resets the font size to the default. I feel like there should be a shortcut for resetting the size.

I could not find an appropriate icon, so I left it without icon.
The default shortcut ctrl+r seemed reasonable and easy to type, 'r' reset.

Test Plan

Manual.

Diff Detail

Repository
R319 Konsole
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
lbergdoll created this revision.Sep 9 2018, 4:22 PM
Restricted Application added a project: Konsole. · View Herald TranscriptSep 9 2018, 4:22 PM
Restricted Application added a subscriber: konsole-devel. · View Herald Transcript
lbergdoll requested review of this revision.Sep 9 2018, 4:22 PM
lbergdoll edited the summary of this revision. (Show Details)Sep 9 2018, 4:29 PM
lbergdoll edited the test plan for this revision. (Show Details)

I like that idea, and I belive that's userfull as I'm usually messing with the size of the fonts when I use the touchpad on the laptop.
but let's wait for what @hindenburg has to say.

ngraham edited reviewers, added: VDG; removed: ngraham.Sep 9 2018, 5:41 PM
ngraham requested changes to this revision.Sep 9 2018, 5:48 PM
ngraham added a subscriber: ngraham.

Two issues here:

  1. This breaks using ctrl+r for reverse searching in your shell. It can't be ctrl++r either since that's forward search. ctrl+alt+r, maybe?
  2. This needs a visible menu item in the user interface. I would expect it to show up in the View menu by the other font-size-related items.
This revision now requires changes to proceed.Sep 9 2018, 5:48 PM
z3ntu added a subscriber: z3ntu.EditedSep 9 2018, 6:35 PM

What about Ctrl+0? Web browsers use it and doesn't seem used in Konsole/shells yet.

Hmm, that might work.

lbergdoll edited the summary of this revision. (Show Details)Sep 9 2018, 6:55 PM
lbergdoll updated this revision to Diff 41292.Sep 9 2018, 8:27 PM
  • Replace font size reset default shortcut with ctrl+0
  • Add reset font size option to docbook
  • Add reset font size option to view menu
  • Add icon to reset font size option
Restricted Application added a project: Documentation. · View Herald TranscriptSep 9 2018, 8:27 PM
Restricted Application added a subscriber: kde-doc-english. · View Herald Transcript

To me, Ctral+0 would be the correct choice. So +1 from my side.

desktop/sessionui.rc
3

Afaik, you have to increase the version number to avoid old caching.

Much better! One more request: can we disable the menu item when the current font size matches the profile's default font size?

Also, for the icon, I'm not sure character-set is the right choice; that will put two identical flag icons in the menu, but for items that do different things. I couldn't find a better icon, so maybe for the time being we should leave this menu item icon-less.

desktop/sessionui.rc
3

Correct. Please bump the version anytime you change anything in an rc file.

Much better! One more request: can we disable the menu item when the current font size matches the profile's default font size?

How would I do this?

lbergdoll updated this revision to Diff 41426.Sep 11 2018, 5:23 PM
lbergdoll marked an inline comment as done.
  • Bump sessionui.rc version number
  • Remove reset font size icon
ngraham accepted this revision.Sep 11 2018, 5:24 PM
This revision is now accepted and ready to land.Sep 11 2018, 5:24 PM

nate, lukas doesn't have permission to post. but he works with me, would
you vote +1 together with me so he gets permission?

ach added a subscriber: ach.Sep 11 2018, 6:30 PM

Hi I think ctrl-<anything> is not a good idea in konsole. One never knows which app runs inside konsole and with shortcuts it uses. E.g. ctrl-0 in vim and bash emacs mode goes to the first char in the line.

Because Ctrl-shift or just Control were treated the same in the old non-gui world AFAIR, Ctrl-shift is historically unused. Konsole has already lots of Ctrl-Shift-<whatever> shortcuts. So e.g. Ctrl-Shift-R, if still available, would fit nicely into the schema.

-1 for just Ctrl-r

ngraham requested changes to this revision.Sep 11 2018, 6:51 PM

Oh darn, you're right.

Yeah, we should use ctrl++<something> here.

This revision now requires changes to proceed.Sep 11 2018, 6:51 PM

ctrl + shift + r then? or ctrl + shift + 0, because that would mimic the way that ctrl + something in 'modern' desktop application usually is ctrl + shift + something in konsole. Example browsers ctrl + c -> ctrl + shift + c, ctrl + t -> ctrl + shift + t. My vote is for ctrl + shift + 0, because that mimics the current scheme.

Also:

It can't be ctrl + shift + r either since that's forward search.

Ctrl+shift+0 is much better than the +r variants. +r typically is used for reloading/refreshing. If we cannot find a better solution, then having no default shortcut would also be an option.

lbergdoll updated this revision to Diff 41437.Sep 11 2018, 9:36 PM
  • Rebase on master
  • Change default reset font size shortcut to ctrl + alt + 0
ach added a comment.Sep 11 2018, 9:37 PM

+ 1 for Ctrl-Shift-0

Sidenote for non-konsole aka no-shift-modifier apps:
If someone feels like making Ctrl-0 for apps that know about ctrl-+/- more popular: it used is chrome and firefox, kmail and akregator. But kate okular and gwenview miss this shortcut
Consistency rules ;-)

Thanks for all the work and care you spend for KDE

Achim - a happy KDE

Unfortunately ctrl + shift + 0 does not seem to work because, shift changes 0 to a different character, we'd have to guess what it turns into or cover a range of options. So I opted for ctrl + alt + 0, imo a little less coherent, but still ok.

z3ntu added a comment.Sep 11 2018, 9:43 PM

Funnily enough Ctrl+Shift+0 is Ctrl+= on the German keyboard which is set by default to "Enlarge Font"

In D15380#324312, @ach wrote:

+ 1 for Ctrl-Shift-0

Sidenote for non-konsole aka no-shift-modifier apps:
If someone feels like making Ctrl-0 for apps that know about ctrl-+/- more popular: it used is chrome and firefox, kmail and akregator. But kate okular and gwenview miss this shortcut
Consistency rules ;-)

Already added by @muhlenpfordt via kStandardActions in f651a817ab004b64e8fcd5b4b8fa5141de10995f, which made it in Frameworks 5.50. :)

Gwenview got it for free, but it looks like Okular and Kate need patches to adopt the kStandardAction. Good Junior job/entry point opportunity for anyone reading along at home!

ngraham accepted this revision.Sep 11 2018, 11:10 PM

Would still be nice to get ctrl++0 to work somehow, but ctrl+alt+0 is okay too in my book.

This revision is now accepted and ready to land.Sep 11 2018, 11:10 PM
This revision was automatically updated to reflect the committed changes.