(trunk-1619) Slight change to how the zoomed font is calculated. This just
seems to give a more natural size when zooming over the previous. Can be reverted if people don't like it. Also using this as a sneaky way to close 6 year old bug.
This commit is contained in:
parent
933237adce
commit
2e21276b64
|
@ -1257,11 +1257,10 @@ class Terminal(Gtk.VBox):
|
||||||
dbg('Terminal::zoom_scale: One axis unchanged, not scaling')
|
dbg('Terminal::zoom_scale: One axis unchanged, not scaling')
|
||||||
return
|
return
|
||||||
|
|
||||||
old_area = old_data['old_columns'] * old_data['old_rows']
|
scale_factor = min ( (new_columns / old_data['old_columns'] * 0.97),
|
||||||
new_area = new_columns * new_rows
|
(new_rows / old_data['old_rows'] * 1.05) )
|
||||||
area_factor = (new_area / old_area) / 2
|
|
||||||
|
|
||||||
new_size = int(old_data['old_font'].get_size() * area_factor)
|
new_size = int(old_data['old_font'].get_size() * scale_factor)
|
||||||
if new_size == 0:
|
if new_size == 0:
|
||||||
err('refusing to set a zero sized font')
|
err('refusing to set a zero sized font')
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue