summaryrefslogtreecommitdiff
path: root/editor/animation_track_editor.cpp
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2019-08-23 23:00:38 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2019-08-23 23:00:38 +0200
commitbd05d0e71bff67e14309db604824b047d17d62f4 (patch)
treebf9d6df713291f2c6dcbaf5c17500149120d90eb /editor/animation_track_editor.cpp
parent791d7f78b52f5b828aa5541897e12c6a1861ef6f (diff)
Change mouse cursor when hovering a resize area in the animation editor
This also scales the default width of the track name column on hiDPI displays.
Diffstat (limited to 'editor/animation_track_editor.cpp')
-rw-r--r--editor/animation_track_editor.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index c93dc2b340..a163490cfb 100644
--- a/editor/animation_track_editor.cpp
+++ b/editor/animation_track_editor.cpp
@@ -1799,6 +1799,13 @@ void AnimationTimelineEdit::_gui_input(const Ref<InputEvent> &p_event) {
if (mm.is_valid()) {
+ if (hsize_rect.has_point(mm->get_position())) {
+ // Change the cursor to indicate that the track name column's width can be adjusted
+ set_default_cursor_shape(Control::CURSOR_HSIZE);
+ } else {
+ set_default_cursor_shape(Control::CURSOR_ARROW);
+ }
+
if (dragging_hsize) {
int ofs = mm->get_position().x - dragging_hsize_from;
name_limit = dragging_hsize_at + ofs;
@@ -1857,7 +1864,7 @@ AnimationTimelineEdit::AnimationTimelineEdit() {
use_fps = false;
editing = false;
- name_limit = 150;
+ name_limit = 150 * EDSCALE;
zoom = NULL;
play_position_pos = 0;