From be570b90b7322c3e332c1a6f28b9d14d69da84ac Mon Sep 17 00:00:00 2001 From: ChristianCelora Date: Fri, 25 Feb 2022 09:59:34 +0100 Subject: [PATCH] fix issue #1747 --- guake/guake_app.py | 5 +++++ guake/terminal.py | 2 +- releasenotes/notes/bugfix-9eef9bb673862b57.yaml | 6 ++++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/bugfix-9eef9bb673862b57.yaml diff --git a/guake/guake_app.py b/guake/guake_app.py index 6a9be59bc..423e4d638 100644 --- a/guake/guake_app.py +++ b/guake/guake_app.py @@ -203,6 +203,9 @@ def load_schema(): self.notebook_manager.set_workspace(0) self.set_tab_position() + # store the font scale index + self.scale_index = 0 + # check and set ARGB for real transparency self.update_visual() self.window.get_screen().connect("composited-changed", self.update_visual) @@ -934,11 +937,13 @@ def accel_reset_terminal(self, *args): def accel_zoom_in(self, *args): """Callback to zoom in.""" + self.scale_index += 1 for term in self.get_notebook().iter_terminals(): term.increase_font_size() return True def accel_zoom_out(self, *args): + self.scale_index -= 1 """Callback to zoom out.""" for term in self.get_notebook().iter_terminals(): term.decrease_font_size() diff --git a/guake/terminal.py b/guake/terminal.py index 2a6b559b7..0baa98dad 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.guake.scale_index) def set_font_scale_index(self, scale_index): self.font_scale_index = clamp(scale_index, -6, 12) diff --git a/releasenotes/notes/bugfix-9eef9bb673862b57.yaml b/releasenotes/notes/bugfix-9eef9bb673862b57.yaml new file mode 100644 index 000000000..fdebcbd39 --- /dev/null +++ b/releasenotes/notes/bugfix-9eef9bb673862b57.yaml @@ -0,0 +1,6 @@ +release_summary: > + Bugfix issue #1747. Splitting terminal should not reset font size + +fixes: + - | + broken feature has been fixed #1747