Skip to content

Commit

Permalink
fix issue Guake#1747
Browse files Browse the repository at this point in the history
improved solution after pr review

comment indented due to PEP-08
  • Loading branch information
ChristianCelora committed Mar 21, 2022
1 parent 076e92c commit 8cac1c5
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 @@ -492,7 +492,7 @@ def browse_link_under_cursor(self):

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 8cac1c5

Please sign in to comment.