From a55b00b53baf2e202b88cbea0f61a232ff9843d3 Mon Sep 17 00:00:00 2001 From: Severin Date: Sat, 30 Jun 2018 00:42:19 +0200 Subject: Fix a number of small errors in area coordinate handling For example collapsing the lower part of the topbar with 2x interface scale would hide the top-bar header region. There were also more asserts when changing window size and moving area edges afterwards (same assert as in T55298). Fixes are similar to e626998a262ebe4f. With all the recent fixes I've done, area geometry handling should be stable again. Let's hope I'm right :) --- source/blender/editors/screen/area.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source/blender/editors/screen/area.c') diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 16eeff01e58..e96580855d3 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -2362,6 +2362,16 @@ int ED_area_global_size_y(const ScrArea *area) BLI_assert(ED_area_is_global(area)); return round_fl_to_int(area->global->cur_fixed_height * UI_DPI_FAC); } +int ED_area_global_min_size_y(const ScrArea *area) +{ + BLI_assert(ED_area_is_global(area)); + return round_fl_to_int(area->global->size_min * UI_DPI_FAC); +} +int ED_area_global_max_size_y(const ScrArea *area) +{ + BLI_assert(ED_area_is_global(area)); + return round_fl_to_int(area->global->size_max * UI_DPI_FAC); +} bool ED_area_is_global(const ScrArea *area) { -- cgit v1.2.3