Add incremental margin collapse for grid<->HUD
@@ -1247,8 +1247,9 @@ void ged_update_internal_geometry(Ged* a) {
int softmargin_y = a->softmargin_y;
bool show_hud = win_h > Hud_height + 1;
int grid_h = show_hud ? win_h - 2 : win_h;
- if (grid_h > softmargin_y + 1 && grid_h > a->field.height + softmargin_y) {
- grid_h -= softmargin_y;
+ if (grid_h > a->field.height) {
+ int halfy = (grid_h - a->field.height) / 2;
+ grid_h -= halfy < softmargin_y ? halfy : softmargin_y;
}
a->grid_h = grid_h;
a->is_draw_dirty = true;
