diff options
| author | Manolo Gouy <Manolo> | 2018-08-08 20:08:10 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2018-08-08 20:08:10 +0000 |
| commit | cd399d989897e650cc7928c4ebd9bf89892d7995 (patch) | |
| tree | d0e6d7f02a53a9ead62c88c34cb84580a24a3fc2 /src/Fl_cocoa.mm | |
| parent | fb0f940c517d4f0f0f2f22f92acc54c9f5b37242 (diff) | |
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
Diffstat (limited to 'src/Fl_cocoa.mm')
| -rw-r--r-- | src/Fl_cocoa.mm | 2 |
1 files changed, 1 insertions, 1 deletions
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, |
