diff options
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 11 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_screen_types.h | 3 |
2 files changed, 9 insertions, 5 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index e5d23457daf..cd5b557f986 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -794,10 +794,15 @@ static void screen_global_area_refresh( } } +static int screen_global_header_size(void) +{ + return (int)ceilf(ED_area_headersize() / UI_DPI_FAC); +} + static void screen_global_topbar_area_refresh(wmWindow *win, bScreen *screen) { - const short size_min = HEADERY; - const short size_max = 2.25 * HEADERY; + const short size_min = screen_global_header_size(); + const short size_max = 2.25 * screen_global_header_size(); const short size = (screen->flag & SCREEN_COLLAPSE_TOPBAR) ? size_min : size_max; rcti rect; @@ -810,7 +815,7 @@ static void screen_global_topbar_area_refresh(wmWindow *win, bScreen *screen) static void screen_global_statusbar_area_refresh(wmWindow *win, bScreen *screen) { const short size_min = 1; - const short size_max = 0.8f * HEADERY; + const short size_max = 0.8f * screen_global_header_size(); const short size = (screen->flag & SCREEN_COLLAPSE_STATUSBAR) ? size_min : size_max; rcti rect; diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index c62aed7402b..6121ff322f9 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -286,8 +286,7 @@ typedef struct ScrGlobalAreaData { * and winx/winy don't) */ short cur_fixed_height; /* For global areas, this is the min and max size they can use depending on - * if they are 'collapsed' or not. Value is set on area creation and not - * touched afterwards. */ + * if they are 'collapsed' or not. */ short size_min, size_max; /** GlobalAreaAlign. */ short align; |