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

@@ -34,7 +34,7 @@ ThumbBrowserBase::ThumbBrowserBase ()
{
inW = -1;
inH = -1;
hscroll.set_orientation(Gtk::ORIENTATION_HORIZONTAL);
vscroll.set_orientation(Gtk::ORIENTATION_VERTICAL);
@@ -1026,14 +1026,14 @@ Gtk::SizeRequestMode ThumbBrowserBase::Internal::get_request_mode_vfunc () const
void ThumbBrowserBase::Internal::get_preferred_height_vfunc (int &minimum_height, int &natural_height) const
{
minimum_height = 20 * RTScalable::getScale();
natural_height = 80 * RTScalable::getScale();
minimum_height = RTScalable::scalePixelSize(20);
natural_height = RTScalable::scalePixelSize(80);
}
void ThumbBrowserBase::Internal::get_preferred_width_vfunc (int &minimum_width, int &natural_width) const
{
minimum_width = 200 * RTScalable::getScale();
natural_width = 1000 * RTScalable::getScale();
minimum_width = RTScalable::scalePixelSize(200);
natural_width = RTScalable::scalePixelSize(1000);
}
void ThumbBrowserBase::Internal::get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const