Skip to content

Commit

Permalink
Fix split terminal.
Browse files Browse the repository at this point in the history
Now it preverse the font scale during a vertical / horizontal split.
Resolve issue #1747.
  • Loading branch information
ChristianCelora authored and Davidy22 committed Apr 9, 2022
1 parent 38dfd0e commit 08f32aa
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions guake/boxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,10 @@ def split(self, orientation):
dual_terminal_box.set_child_second(terminal_box)
terminal_box.show()
dual_terminal_box.show()
if self.terminal is not None:
# preserve font and font_scale in the new terminal
terminal.set_font(self.terminal.font)
terminal.font_scale = self.terminal.font_scale
notebook.terminal_attached(terminal)

return dual_terminal_box
Expand Down
2 changes: 1 addition & 1 deletion guake/terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ def browse_link_under_cursor(self, url=None):

def set_font(self, font):
self.font = font
self.set_font_scale_index(0)
self.set_font_scale_index(self.font_scale)

def set_font_scale_index(self, scale_index):
self.font_scale_index = clamp(scale_index, -6, 12)
Expand Down
7 changes: 7 additions & 0 deletions releasenotes/notes/bugfix-bfcece2fed005b98.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
release_summary: >
Fix issue #1747 - Splitting terminal should not reset font size
fixes:
- |
fixed issue #1747. Now font size is not reset after a terminal split

0 comments on commit 08f32aa

Please sign in to comment.