Updates font management for hidpi

Improvements:
- Cleanup of default options files to use OS font by default
- Comments updates
- Simplify font size management as Pango/Gtk directly manage pt/px conversions

Bug fix:
- If Preference panel is closed by "cancel", font size was not reinitialized to previously saved one
- Font size was specified in "RawTherapee.css" theme and so user choice could be ignored
This commit is contained in:
Pandagrapher
2023-08-23 13:43:07 +02:00
parent 58b7d41694
commit bf988ad274
14 changed files with 99 additions and 197 deletions

View File

@@ -376,7 +376,7 @@ void ThumbBrowserEntryBase::updateBackBuffer ()
// draw file name
Glib::RefPtr<Pango::Context> context = w->get_pango_context () ;
Pango::FontDescription fontd = context->get_font_description ();
Pango::FontDescription fontd = w->get_style_context()->get_font();
fontd.set_weight (Pango::WEIGHT_BOLD);
if (italicstyle) {
@@ -442,7 +442,7 @@ void ThumbBrowserEntryBase::getTextSizes (int& infow, int& infoh)
// filename:
Pango::FontDescription fontd = context->get_font_description ();
Pango::FontDescription fontd = w->get_style_context()->get_font();
fontd.set_weight (Pango::WEIGHT_BOLD);
context->set_font_description (fontd);
Glib::RefPtr<Pango::Layout> fn = w->create_pango_layout(dispname);