diff options
-rw-r--r-- | source/blender/editors/space_graph/graph_edit.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 98fe8c71454..0dfd4a925aa 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -292,12 +292,11 @@ static int graphkeys_viewall(bContext *C, /* Give some more space at the borders. */ BLI_rctf_scale(&cur_new, 1.1f); - /* Take regions into account, that could block the view. */ + /* Take regions into account, that could block the view. Marker region is supposed to be larger + * than the scrollbar, so priorize it.*/ float pad_top = UI_TIME_SCRUB_MARGIN_Y; - float pad_bottom = 0; - if (!BLI_listbase_is_empty(ED_context_get_markers(C))) { - pad_bottom = UI_MARKER_MARGIN_Y; - } + float pad_bottom = BLI_listbase_is_empty(ED_context_get_markers(C)) ? V2D_SCROLL_HANDLE_HEIGHT : + UI_MARKER_MARGIN_Y; BLI_rctf_pad_y(&cur_new, ac.ar->winy, pad_bottom, pad_top); UI_view2d_smooth_view(C, ac.ar, &cur_new, smooth_viewtx); |