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

@@ -174,12 +174,12 @@ Crop::Crop():
selectCrop = Gtk::manage (new Gtk::Button (M("TP_CROP_SELECTCROP")));
setExpandAlignProperties(selectCrop, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
selectCrop->get_style_context()->add_class("independent");
selectCrop->set_image (*Gtk::manage (new RTImage ("crop-small.png")));
selectCrop->set_image (*Gtk::manage (new RTImage ("crop-small", Gtk::ICON_SIZE_BUTTON)));
resetCrop = Gtk::manage (new Gtk::Button (M("TP_CROP_RESETCROP")));
setExpandAlignProperties(resetCrop, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
resetCrop->get_style_context()->add_class("independent");
resetCrop->set_image (*Gtk::manage (new RTImage ("undo-small.png")));
resetCrop->set_image (*Gtk::manage (new RTImage ("undo-small", Gtk::ICON_SIZE_BUTTON)));
methodgrid->attach (*xlab, 0, 0, 1, 1);
methodgrid->attach (*x, 1, 0, 1, 1);
@@ -592,11 +592,11 @@ void Crop::doresetCrop ()
yDirty = true;
wDirty = true;
hDirty = true;
// Reset ratio, ratio lock and orientation as well
ratio->set_active(0);
orientation->set_active(2);
fixr->set_active(true);
fixr->set_active(true);
int X = 0;
int Y = 0;