From 82dc3f25a766e9aefbb113b4424e51836275450b Mon Sep 17 00:00:00 2001 From: Jonas Holzman Date: Tue, 8 Jul 2025 21:55:52 +0200 Subject: [PATCH] Fix #137750: Low timeline height when restoring area layout using different DPI This commit fixes a bug where the timeline area height was clamped to its minimum value when restoring an area layout saved on a non-HiDPI screen on a HiDPI screen. In particular, this caused the default Blender startup file timeline area to be wrongly clamped dwon on macOS when using a HiDPI/Retina screen. This was due to the `screen_geom_vertices_scale_pass` function using raw `area->winy` value in the `facy > 1` case, which ensures the timeline does not get expanded when resizing the window if its already at its minimum height. When restoring the area layout, these `winy` values were not yet refreshed, and still used the DPI scale of the screen the layout was saved on. Which in case of macOS HiDPI screens caused them to be two times smaller then the screen / other size values used in the function. This was fixed by using the `screen_geom_area_height()` instead, which computes the area height from its screen geometry coordinates, and was previously used in this function before being replaced by `winy`. The comparaison now also uses a fixed value instead of `facy` which was also subject to DPI differencies, see PR thread for more details Pull Request: https://projects.blender.org/blender/blender/pulls/141154 --- source/blender/editors/screen/screen_geometry.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/editors/screen/screen_geometry.cc b/source/blender/editors/screen/screen_geometry.cc index a749c3beace..3696afcc738 100644 --- a/source/blender/editors/screen/screen_geometry.cc +++ b/source/blender/editors/screen/screen_geometry.cc @@ -179,7 +179,7 @@ static bool screen_geom_vertices_scale_pass(const wmWindow *win, min += border_width; } if (area->spacetype == SPACE_ACTION && area->v1->vec.y == screen_rect->ymin && - area->winy <= min * facy) + screen_geom_area_height(area) <= int(min * 1.5f)) { ScrEdge *se = BKE_screen_find_edge(screen, area->v2, area->v3); if (se) {