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

@@ -25,15 +25,15 @@ ZoomPanel::ZoomPanel (ImageArea* iarea) : iarea(iarea)
{
set_name ("EditorZoomPanel");
Gtk::Image* imageOut = Gtk::manage (new RTImage ("magnifier-minus.png"));
Gtk::Image* imageOut = Gtk::manage (new RTImage ("magnifier-minus", Gtk::ICON_SIZE_LARGE_TOOLBAR));
imageOut->set_padding(0, 0);
Gtk::Image* imageIn = Gtk::manage (new RTImage ("magnifier-plus.png"));
Gtk::Image* imageIn = Gtk::manage (new RTImage ("magnifier-plus", Gtk::ICON_SIZE_LARGE_TOOLBAR));
imageIn->set_padding(0, 0);
Gtk::Image* image11 = Gtk::manage ( new RTImage ("magnifier-1to1.png"));
Gtk::Image* image11 = Gtk::manage ( new RTImage ("magnifier-1to1", Gtk::ICON_SIZE_LARGE_TOOLBAR));
image11->set_padding(0, 0);
Gtk::Image* imageFit = Gtk::manage (new RTImage ("magnifier-fit.png"));
Gtk::Image* imageFit = Gtk::manage (new RTImage ("magnifier-fit", Gtk::ICON_SIZE_LARGE_TOOLBAR));
imageFit->set_padding(0, 0);
Gtk::Image* imageFitCrop = Gtk::manage (new RTImage ("magnifier-crop.png"));
Gtk::Image* imageFitCrop = Gtk::manage (new RTImage ("magnifier-crop", Gtk::ICON_SIZE_LARGE_TOOLBAR));
imageFit->set_padding(0, 0);
zoomOut = Gtk::manage (new Gtk::Button());
@@ -67,7 +67,7 @@ ZoomPanel::ZoomPanel (ImageArea* iarea) : iarea(iarea)
setExpandAlignProperties(zoomLabel, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL);
attach_next_to (*zoomLabel, Gtk::POS_RIGHT, 1, 1);
Gtk::Image* imageCrop = Gtk::manage (new RTImage ("window-add.png"));
Gtk::Image* imageCrop = Gtk::manage (new RTImage ("window-add", Gtk::ICON_SIZE_LARGE_TOOLBAR));
imageCrop->set_padding(0, 0);
newCrop = Gtk::manage (new Gtk::Button());
newCrop->add (*imageCrop);