summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorHaoyu Qiu <timothyqiu32@gmail.com>2022-03-31 18:39:04 +0800
committerHaoyu Qiu <timothyqiu32@gmail.com>2022-03-31 18:39:04 +0800
commitc7e06e2202c97dbd75933fe1b587d668a717c5f2 (patch)
tree90a1a21eec1525e75f4e8ab073e67c24c62c9715 /editor
parentfc4e9d6299593794489a0271bebf2c528aadcc74 (diff)
Clip animation track keyframe rects
Diffstat (limited to 'editor')
-rw-r--r--editor/animation_track_editor_plugins.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/editor/animation_track_editor_plugins.cpp b/editor/animation_track_editor_plugins.cpp
index 2ad8b2d2a4..d07881e28e 100644
--- a/editor/animation_track_editor_plugins.cpp
+++ b/editor/animation_track_editor_plugins.cpp
@@ -339,11 +339,11 @@ void AnimationTrackEditAudio::draw_key(int p_index, float p_pixels_sec, int p_x,
Rect2 rect(Vector2(p_x, int(get_size().height - fh) / 2), Size2(fh, fh));
Color color = get_theme_color(SNAME("font_color"), SNAME("Label"));
- draw_rect(rect, color);
+ draw_rect_clipped(rect, color);
if (p_selected) {
Color accent = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
- draw_rect(rect, accent, false);
+ draw_rect_clipped(rect, accent, false);
}
}
}
@@ -712,11 +712,11 @@ void AnimationTrackEditSubAnim::draw_key(int p_index, float p_pixels_sec, int p_
Rect2 rect(Vector2(p_x, int(get_size().height - fh) / 2), Size2(fh, fh));
Color color = get_theme_color(SNAME("font_color"), SNAME("Label"));
- draw_rect(rect, color);
+ draw_rect_clipped(rect, color);
if (p_selected) {
Color accent = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
- draw_rect(rect, accent, false);
+ draw_rect_clipped(rect, accent, false);
}
}
}
@@ -1287,11 +1287,11 @@ void AnimationTrackEditTypeAnimation::draw_key(int p_index, float p_pixels_sec,
Rect2 rect(Vector2(p_x, int(get_size().height - fh) / 2), Size2(fh, fh));
Color color = get_theme_color(SNAME("font_color"), SNAME("Label"));
- draw_rect(rect, color);
+ draw_rect_clipped(rect, color);
if (p_selected) {
Color accent = get_theme_color(SNAME("accent_color"), SNAME("Editor"));
- draw_rect(rect, accent, false);
+ draw_rect_clipped(rect, accent, false);
}
}
}