From cd399d989897e650cc7928c4ebd9bf89892d7995 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Wed, 8 Aug 2018 20:08:10 +0000 Subject: Support for GUI scaling: add API to get/set the scaling factor value. Also, define an FLTK event triggered when the scaling is changed and an option to disable the transient window showing the new scaling factor. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13011 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_cocoa.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Fl_cocoa.mm') diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index e2ad85728..1371d7a67 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -2146,7 +2146,7 @@ static FLTextInputContext* fltextinputcontext_instance = nil; fl_lock_function(); FLWindow *cw = (FLWindow*)[self window]; Fl_Window *window = [cw getFl_Window]; - float scale = fl_graphics_driver->scale(); + float scale = Fl::screen_driver()->scale(0); if ( !window->parent() && window->border() && fabs(rect.size.height - window->h() * scale) > 5. ) { // this happens with tabbed windows window->resize([cw frame].origin.x/scale, (main_screen_height - ([cw frame].origin.y + rect.size.height))/scale, -- cgit v1.2.3