Feature: Automatic UI and font zoom levels when supported by the OS.

This commit is contained in:
Michael Lutz
2021-01-08 22:15:06 +01:00
parent a2c3197f42
commit 22f5aeab07
8 changed files with 72 additions and 16 deletions

View File

@@ -15,6 +15,8 @@
static uint const ZOOM_LVL_SHIFT = 2;
static uint const ZOOM_LVL_BASE = 1 << ZOOM_LVL_SHIFT;
static const int8 ZOOM_LVL_CFG_AUTO = -1;
/** All zoom levels we know. */
enum ZoomLevel : byte {
/* Our possible zoom-levels */
@@ -48,6 +50,9 @@ enum ZoomLevel : byte {
};
DECLARE_POSTFIX_INCREMENT(ZoomLevel)
extern int8 _gui_zoom_cfg;
extern int8 _font_zoom_cfg;
extern ZoomLevel _gui_zoom;
extern ZoomLevel _font_zoom;
#define ZOOM_LVL_GUI (_gui_zoom)