mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Viewer: Fix using a very small font step size not working. Fixes #1888609 [If I reduce font size below 10, then keyboard shortcut to increase font size stops working](https://bugs.launchpad.net/calibre/+bug/1888609)
This commit is contained in:
parent
252d6dacec
commit
22acded7a2
@ -49,6 +49,8 @@ def change_font_size_by(frac):
|
|||||||
sd = get_session_data()
|
sd = get_session_data()
|
||||||
sz = sd.get('base_font_size')
|
sz = sd.get('base_font_size')
|
||||||
amt = sz * frac
|
amt = sz * frac
|
||||||
|
if abs(amt) < 1:
|
||||||
|
amt = -1 if amt < 0 else 1
|
||||||
nsz = int(sz + amt)
|
nsz = int(sz + amt)
|
||||||
nsz = max(MIN_FONT_SIZE, min(nsz, MAX_FONT_SIZE))
|
nsz = max(MIN_FONT_SIZE, min(nsz, MAX_FONT_SIZE))
|
||||||
change_font_size(nsz)
|
change_font_size(nsz)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user