From c9927eb6d7b7fcc82ef72a1ea86f3fe8d01853ea Mon Sep 17 00:00:00 2001 From: ChristianCelora Date: Fri, 25 Feb 2022 10:08:28 +0100 Subject: [PATCH] fix issue #1747 improved solution after pr review comment indented due to PEP-08 --- guake/boxes.py | 4 ++++ guake/terminal.py | 2 +- releasenotes/notes/bugfix-bfcece2fed005b98.yaml | 7 +++++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/bugfix-bfcece2fed005b98.yaml diff --git a/guake/boxes.py b/guake/boxes.py index 2d9653781..1f94b0d60 100644 --- a/guake/boxes.py +++ b/guake/boxes.py @@ -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 diff --git a/guake/terminal.py b/guake/terminal.py index 2a6b559b7..c2b0b0352 100644 --- a/guake/terminal.py +++ b/guake/terminal.py @@ -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) diff --git a/releasenotes/notes/bugfix-bfcece2fed005b98.yaml b/releasenotes/notes/bugfix-bfcece2fed005b98.yaml new file mode 100644 index 000000000..620846ec6 --- /dev/null +++ b/releasenotes/notes/bugfix-bfcece2fed005b98.yaml @@ -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 +