diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2020-11-07 12:44:06 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2020-11-07 12:44:06 +0100 |
| commit | b35010595a1f33f92a996b8ec6fed5c1b51be03f (patch) | |
| tree | 0c884c4e111291b35d230506708ad45f540192d6 /src | |
| parent | 0d594319c1f423679c7e7cd712003921da103c70 (diff) | |
Simpler code and doc of Fl::screen_scale(int n, float factor)
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl.cxx | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx index d034f91fb..225038bff 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -2133,17 +2133,12 @@ float Fl::screen_scale(int n) { return Fl::screen_driver()->scale(n); } -/** Set the value of the GUI scaling factor for screen number \p n. -When this function is called before the first window is show()'n it sets the - application's initial scaling factor value. Otherwise, it sets the scale factor value of all windows mapped to screen number \p n */ +/** Sets the value of the GUI scaling factor for screen number \p n. + Also sets the scale factor value of all windows mapped to screen number \p n, if any. + */ void Fl::screen_scale(int n, float factor) { if (!Fl::screen_scaling_supported() || n < 0 || n >= Fl::screen_count()) return; - if (Fl::first_window()) { - Fl::screen_driver()->rescale_all_windows_from_screen(n, factor); - } else { - Fl::screen_driver()->scale(n, factor); - Fl_Graphics_Driver::default_driver().scale(factor); - } + Fl::screen_driver()->rescale_all_windows_from_screen(n, factor); } /** |
