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:
@@ -156,7 +156,7 @@ bool PreviewWindow::on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr)
|
||||
int x, y, w, h;
|
||||
getObservedFrameArea (x, y, w, h);
|
||||
if (x>imgX || y>imgY || w < imgW || h < imgH) {
|
||||
double s = RTScalable::getScale();
|
||||
const double s = RTScalable::scalePixelSize(1.);
|
||||
double rectX = x + 0.5;
|
||||
double rectY = y + 0.5;
|
||||
double rectW = std::min(w, (int)(imgW - (x - imgX) - 1));
|
||||
@@ -307,14 +307,14 @@ Gtk::SizeRequestMode PreviewWindow::get_request_mode_vfunc () const
|
||||
|
||||
void PreviewWindow::get_preferred_height_vfunc (int &minimum_height, int &natural_height) const
|
||||
{
|
||||
minimum_height= 50 * RTScalable::getScale();
|
||||
natural_height = 100 * RTScalable::getScale();
|
||||
minimum_height= RTScalable::scalePixelSize(50);
|
||||
natural_height = RTScalable::scalePixelSize(100);
|
||||
}
|
||||
|
||||
void PreviewWindow::get_preferred_width_vfunc (int &minimum_width, int &natural_width) const
|
||||
{
|
||||
minimum_width = 80 * RTScalable::getScale();
|
||||
natural_width = 120 * RTScalable::getScale();
|
||||
minimum_width = RTScalable::scalePixelSize(80);
|
||||
natural_width = RTScalable::scalePixelSize(120);
|
||||
}
|
||||
|
||||
void PreviewWindow::get_preferred_height_for_width_vfunc (int width, int &minimum_height, int &natural_height) const
|
||||
|
Reference in New Issue
Block a user