Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_graph/graph_edit.c')
-rw-r--r--source/blender/editors/space_graph/graph_edit.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index 03df93e4c8a..2060288bb0e 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -292,13 +292,12 @@ 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 scroll-bar, so prioritize 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;
- }
- BLI_rctf_pad_y(&cur_new, ac.ar->sizey * UI_DPI_FAC, pad_bottom, pad_top);
+ 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);
return OPERATOR_FINISHED;
@@ -384,9 +383,9 @@ static int graphkeys_view_frame_exec(bContext *C, wmOperator *op)
void GRAPH_OT_view_frame(wmOperatorType *ot)
{
/* identifiers */
- ot->name = "View Frame";
+ ot->name = "Go to Current Frame";
ot->idname = "GRAPH_OT_view_frame";
- ot->description = "Reset viewable area to show range around current frame";
+ ot->description = "Move the view to the playhead";
/* api callbacks */
ot->exec = graphkeys_view_frame_exec;