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,9 +25,9 @@
bool BatchQueueButtonSet::iconsLoaded = false;
Cairo::RefPtr<RTSurface> BatchQueueButtonSet::cancelIcon;
Cairo::RefPtr<RTSurface> BatchQueueButtonSet::headIcon;
Cairo::RefPtr<RTSurface> BatchQueueButtonSet::tailIcon;
std::shared_ptr<RTSurface> BatchQueueButtonSet::cancelIcon = std::shared_ptr<RTSurface>(nullptr);
std::shared_ptr<RTSurface> BatchQueueButtonSet::headIcon = std::shared_ptr<RTSurface>(nullptr);
std::shared_ptr<RTSurface> BatchQueueButtonSet::tailIcon = std::shared_ptr<RTSurface>(nullptr);
Glib::ustring BatchQueueButtonSet::moveHeadToolTip;
Glib::ustring BatchQueueButtonSet::moveEndToolTip;
@@ -37,9 +37,9 @@ BatchQueueButtonSet::BatchQueueButtonSet (BatchQueueEntry* myEntry)
{
if (!iconsLoaded) {
cancelIcon = Cairo::RefPtr<RTSurface>(new RTSurface("cancel-small.png"));
headIcon = Cairo::RefPtr<RTSurface>(new RTSurface("goto-start-small.png"));
tailIcon = Cairo::RefPtr<RTSurface>(new RTSurface("goto-end-small.png"));
cancelIcon = std::shared_ptr<RTSurface>(new RTSurface("cancel-small", Gtk::ICON_SIZE_BUTTON));
headIcon = std::shared_ptr<RTSurface>(new RTSurface("goto-start-small", Gtk::ICON_SIZE_BUTTON));
tailIcon = std::shared_ptr<RTSurface>(new RTSurface("goto-end-small", Gtk::ICON_SIZE_BUTTON));
moveHeadToolTip = M("FILEBROWSER_POPUPMOVEHEAD");
moveEndToolTip = M("FILEBROWSER_POPUPMOVEEND");
cancelJobToolTip = M("FILEBROWSER_POPUPCANCELJOB");