Skip to content

Commit

Permalink
fix zooming text/tree font not being properly enforced like preferenc…
Browse files Browse the repository at this point in the history
…es dialog does (#1568)
  • Loading branch information
giuspen committed Apr 14, 2021
1 parent 03d5558 commit b8552d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ct/ct_main_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -532,8 +532,8 @@ void CtMainWin::_zoom_tree(bool is_increase)
int size = fontDesc.get_size() / Pango::SCALE + (is_increase ? 1 : -1);
if (size < 6) size = 6;
fontDesc.set_size(size * Pango::SCALE);
_uCtTreeview->override_font(fontDesc);
_pCtConfig->treeFont = CtFontUtil::get_font_str(fontDesc);
signal_app_apply_for_each_window([](CtMainWin* win) { win->update_theme(); });
}

void CtMainWin::reset()
Expand Down
2 changes: 1 addition & 1 deletion src/ct/ct_widgets.cc
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,6 @@ void CtTextView::zoom_text(const bool is_increase, const std::string& syntaxHigh
int size = fontDesc.get_size() / Pango::SCALE + (is_increase ? 1 : -1);
if (size < 6) size = 6;
fontDesc.set_size(size * Pango::SCALE);
override_font(fontDesc);

if (syntaxHighlighting == CtConst::RICH_TEXT_ID) {
auto pCtConfig = _pCtMainWin->get_ct_config();
Expand All @@ -761,6 +760,7 @@ void CtTextView::zoom_text(const bool is_increase, const std::string& syntaxHigh
else {
_pCtMainWin->get_ct_config()->codeFont = CtFontUtil::get_font_str(fontDesc);
}
_pCtMainWin->signal_app_apply_for_each_window([](CtMainWin* win) { win->update_theme(); });
}

void CtTextView::set_spell_check(bool allow_on)
Expand Down

0 comments on commit b8552d5

Please sign in to comment.