Skip to content

Commit

Permalink
Refactored back to saving not-terminal dependend zoom always
Browse files Browse the repository at this point in the history
  • Loading branch information
ldrahnik committed Oct 30, 2023
1 parent 2574910 commit 2cebd34
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -1204,17 +1204,17 @@ namespace Terminal {

private void action_zoom_in_font () {
current_terminal.increment_size ();
save_opened_terminal_zoom (current_terminal);
save_opened_terminals_zoom ();
}

private void action_zoom_out_font () {
current_terminal.decrement_size ();
save_opened_terminal_zoom (current_terminal);
save_opened_terminals_zoom ();
}

private void action_zoom_default_font () {
current_terminal.set_default_font_size ();
save_opened_terminal_zoom (current_terminal);
save_opened_terminals_zoom ();
}

private void action_next_tab () {
Expand Down Expand Up @@ -1351,12 +1351,10 @@ namespace Terminal {
save_opened_terminals ();
}

private void save_opened_terminal_zoom (TerminalWidget terminal_widget) {
private void save_opened_terminals_zoom () {
string[] zooms = {};

if (terminal_widget == current_terminal) {
Application.saved_state.set_double ("zoom", current_terminal.font_scale);
}
Application.saved_state.set_double ("zoom", current_terminal.font_scale);

if (Granite.Services.System.history_is_enabled () &&
Application.settings.get_boolean ("remember-tabs")) {
Expand Down Expand Up @@ -1411,7 +1409,7 @@ namespace Terminal {

private void save_opened_terminals_with_zooms () {
save_opened_terminals ();
save_opened_terminal_zoom (current_terminal);
save_opened_terminals_zoom ();
}

/** Return enough of @path to distinguish it from @conflict_path **/
Expand Down

0 comments on commit 2cebd34

Please sign in to comment.