UI: Hide NLA Scrollbars When Very Short

With commit f40cd831fd we are hiding scrollbars when timeline and many
other editors are sized to be very short. This PR just does the same
for NLE.

Pull Request: https://projects.blender.org/blender/blender/pulls/135834
This commit is contained in:
Harley Acheson
2025-03-13 01:27:12 +01:00
committed by Harley Acheson
parent e4baefe0d4
commit 9dbd20b369

View File

@@ -218,7 +218,10 @@ static void nla_track_region_draw(const bContext *C, ARegion *region)
UI_view2d_view_restore(C);
/* scrollers */
UI_view2d_scrollers_draw(v2d, nullptr);
if (region->winy > HEADERY * UI_SCALE_FAC) {
UI_view2d_scrollers_draw(v2d, nullptr);
}
ANIM_animdata_freelist(&anim_data);
}
@@ -298,7 +301,9 @@ static void nla_main_region_draw_overlay(const bContext *C, ARegion *region)
ED_time_scrub_draw_current_frame(region, scene, snla->flag & SNLA_DRAWTIME);
/* scrollers */
UI_view2d_scrollers_draw(v2d, nullptr);
if (region->winy > HEADERY * UI_SCALE_FAC) {
UI_view2d_scrollers_draw(v2d, nullptr);
}
}
/* add handlers, stuff you only do once or on area/region changes */