Initial commit for real hidpi support

Note: This commit has only been tested on MacOS

Changes:
- Icons now use the native hidpi support from Gtk (through Icon Theme)
- Icons are now directly generated from scalable file (i.e. SVG file)
- Widget sizes are scaled based on DPI and scale factor
- Font size is scaled based on DPI and scale factor
This commit is contained in:
Pandagrapher
2022-08-19 16:47:28 +02:00
parent 1e2dc30738
commit 89d2bdce5b
108 changed files with 1949 additions and 2032 deletions

View File

@@ -54,7 +54,7 @@ FlatCurveEditorSubGroup::FlatCurveEditorSubGroup (CurveEditorGroup* prt, Glib::u
CPointsCurve = Gtk::manage (new MyFlatCurve ());
CPointsCurve->setType (FCT_MinMaxCPoints);
Gtk::Grid* CPointsCurveBox = Gtk::manage (new Gtk::Grid ());
CPointsCurveBox->get_style_context()->add_class("curve-curvebox");
CPointsCurveBox->add(*CPointsCurve);
@@ -81,17 +81,17 @@ FlatCurveEditorSubGroup::FlatCurveEditorSubGroup (CurveEditorGroup* prt, Glib::u
}
editCPoints = Gtk::manage (new Gtk::ToggleButton());
initButton(*editCPoints, Glib::ustring("crosshair-node-curve.png"), Gtk::ALIGN_START, false, "EDIT_PIPETTE_TOOLTIP");
initButton(*editCPoints, Glib::ustring("crosshair-node-curve"), Gtk::ALIGN_START, false, "EDIT_PIPETTE_TOOLTIP");
editPointCPoints = Gtk::manage (new Gtk::ToggleButton ());
initButton(*editPointCPoints, Glib::ustring("edit-point.png"), Gtk::ALIGN_START, false, "CURVEEDITOR_EDITPOINT_HINT");
initButton(*editPointCPoints, Glib::ustring("edit-point"), Gtk::ALIGN_START, false, "CURVEEDITOR_EDITPOINT_HINT");
copyCPoints = Gtk::manage (new Gtk::Button ());
initButton(*copyCPoints, Glib::ustring("copy.png"), Gtk::ALIGN_END, true);
initButton(*copyCPoints, Glib::ustring("copy"), Gtk::ALIGN_END, true);
pasteCPoints = Gtk::manage (new Gtk::Button ());
initButton(*pasteCPoints, Glib::ustring("paste.png"), Gtk::ALIGN_END, false);
initButton(*pasteCPoints, Glib::ustring("paste"), Gtk::ALIGN_END, false);
loadCPoints = Gtk::manage (new Gtk::Button ());
initButton(*loadCPoints, Glib::ustring("folder-open.png"), Gtk::ALIGN_END, false);
initButton(*loadCPoints, Glib::ustring("folder-open"), Gtk::ALIGN_END, false);
saveCPoints = Gtk::manage (new Gtk::Button ());
initButton(*saveCPoints, Glib::ustring("save.png"), Gtk::ALIGN_END, false);
initButton(*saveCPoints, Glib::ustring("save"), Gtk::ALIGN_END, false);
CPointsbbox->attach_next_to(*editPointCPoints, sideStart, 1, 1);
CPointsbbox->attach_next_to(*editCPoints, sideStart, 1, 1);