mirror of
https://github.com/uowuo/abaddon.git
synced 2026-08-15 05:19:58 +00:00
add gui.font_scale setting
This commit is contained in:
1 parent
483b547a64
commit
e68a086bca
4 files changed
+20
-1
No files matched your search
@@ -263,6 +263,13 @@ int Abaddon::StartGTK() {
|
||||
}
|
||||
#endif
|
||||
|
||||
if (m_settings.GetSettings().FontScale > 0.0) {
|
||||
auto dpi = Gdk::Screen::get_default()->get_resolution();
|
||||
if (dpi < 0.0) dpi = 96.0;
|
||||
auto newdpi = dpi * 1024.0 * m_settings.GetSettings().FontScale;
|
||||
Gtk::Settings::get_default()->set_property("gtk-xft-dpi", newdpi);
|
||||
}
|
||||
|
||||
// store must be checked before this can be called
|
||||
m_main_window->UpdateComponents();
|
||||
|
||||
|
||||
Reference in new issue
Block a user