diff --git a/source/blender/editors/space_action/space_action.cc b/source/blender/editors/space_action/space_action.cc index 3a3888a5da6..dadaa4a2508 100644 --- a/source/blender/editors/space_action/space_action.cc +++ b/source/blender/editors/space_action/space_action.cc @@ -248,7 +248,9 @@ static void action_main_region_draw_overlay(const bContext *C, ARegion *region) ED_time_scrub_draw_current_frame(region, scene, saction->flag & SACTION_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 */ diff --git a/source/blender/editors/space_clip/space_clip.cc b/source/blender/editors/space_clip/space_clip.cc index a7f8a9bf0e5..350850ead4f 100644 --- a/source/blender/editors/space_clip/space_clip.cc +++ b/source/blender/editors/space_clip/space_clip.cc @@ -873,8 +873,10 @@ static void graph_region_draw(const bContext *C, ARegion *region) ED_time_scrub_draw_current_frame(region, scene, sc->flag & SC_SHOW_SECONDS); /* scrollers */ - const rcti scroller_mask = ED_time_scrub_clamp_scroller_mask(v2d->mask); - UI_view2d_scrollers_draw(v2d, &scroller_mask); + if (region->winy > HEADERY * UI_SCALE_FAC) { + const rcti scroller_mask = ED_time_scrub_clamp_scroller_mask(v2d->mask); + UI_view2d_scrollers_draw(v2d, &scroller_mask); + } /* scale indicators */ { @@ -924,7 +926,9 @@ static void dopesheet_region_draw(const bContext *C, ARegion *region) ED_time_scrub_draw_current_frame(region, scene, sc->flag & SC_SHOW_SECONDS); /* scrollers */ - UI_view2d_scrollers_draw(v2d, nullptr); + if (region->winy > HEADERY * UI_SCALE_FAC) { + UI_view2d_scrollers_draw(v2d, nullptr); + } } static void clip_preview_region_draw(const bContext *C, ARegion *region) diff --git a/source/blender/editors/space_graph/space_graph.cc b/source/blender/editors/space_graph/space_graph.cc index 0b3369f484c..c4b2362f07e 100644 --- a/source/blender/editors/space_graph/space_graph.cc +++ b/source/blender/editors/space_graph/space_graph.cc @@ -333,17 +333,19 @@ static void graph_main_region_draw_overlay(const bContext *C, ARegion *region) ED_time_scrub_draw_current_frame(region, scene, sipo->flag & SIPO_DRAWTIME); } - /* scrollers */ - const rcti scroller_mask = ED_time_scrub_clamp_scroller_mask(v2d->mask); - /* FIXME: args for scrollers depend on the type of data being shown. */ - UI_view2d_scrollers_draw(v2d, &scroller_mask); + if (region->winy > HEADERY * UI_SCALE_FAC) { + /* scrollers */ + const rcti scroller_mask = ED_time_scrub_clamp_scroller_mask(v2d->mask); + /* FIXME: args for scrollers depend on the type of data being shown. */ + UI_view2d_scrollers_draw(v2d, &scroller_mask); - /* scale numbers */ - { - rcti rect; - BLI_rcti_init( - &rect, 0, 15 * UI_SCALE_FAC, 15 * UI_SCALE_FAC, region->winy - UI_TIME_SCRUB_MARGIN_Y); - UI_view2d_draw_scale_y__values(region, v2d, &rect, TH_SCROLL_TEXT); + /* scale numbers */ + { + rcti rect; + BLI_rcti_init( + &rect, 0, 15 * UI_SCALE_FAC, 15 * UI_SCALE_FAC, region->winy - UI_TIME_SCRUB_MARGIN_Y); + UI_view2d_draw_scale_y__values(region, v2d, &rect, TH_SCROLL_TEXT); + } } } diff --git a/source/blender/editors/space_sequencer/sequencer_timeline_draw.cc b/source/blender/editors/space_sequencer/sequencer_timeline_draw.cc index 1eb9afebb97..1bc28bc1b2b 100644 --- a/source/blender/editors/space_sequencer/sequencer_timeline_draw.cc +++ b/source/blender/editors/space_sequencer/sequencer_timeline_draw.cc @@ -1964,8 +1964,10 @@ void draw_timeline_seq_display(const bContext *C, ARegion *region) ED_time_scrub_draw_current_frame(region, scene, !(sseq->flag & SEQ_DRAWFRAMES)); - const ListBase *seqbase = SEQ_active_seqbase_get(SEQ_editing_get(scene)); - SEQ_timeline_boundbox(scene, seqbase, &v2d->tot); - const rcti scroller_mask = ED_time_scrub_clamp_scroller_mask(v2d->mask); - UI_view2d_scrollers_draw(v2d, &scroller_mask); + if (region->winy > HEADERY * UI_SCALE_FAC) { + const ListBase *seqbase = SEQ_active_seqbase_get(SEQ_editing_get(scene)); + SEQ_timeline_boundbox(scene, seqbase, &v2d->tot); + const rcti scroller_mask = ED_time_scrub_clamp_scroller_mask(v2d->mask); + UI_view2d_scrollers_draw(v2d, &scroller_mask); + } }