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:
authorVincent Blankfield <vvv>2020-12-18 16:04:58 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-12-18 16:13:52 +0300
commit95afc53604de148c0ed7cfbee88906ae09f6b807 (patch)
treeefecdebb41875682cc4933d6fca1e859ad7087e9 /source/blender/editors/animation/anim_channels_defines.c
parente5764013b073018b3148f4fca9a0b039792466ee (diff)
Fix T83716: Dope Sheet, incorrect scaling of channel UI elements
Change the top coordinate of the animation channel list UI elements to `rect->ymin` so they correctly span from `rect->ymin` to `channel_height`. Some buttons in the dope sheet channels didn't scale properly with the `Keyframe Scale Factor` preferences setting. This was caused by using the `ymid` value (`ymid = BLI_rctf_cent_y(rect) - 0.5f * ICON_WIDTH`) to position the buttons that supposed to fill all vertical space in the channel (with `channel_height` height). The `ymid` value is only appropriate for the UI elements that with `ICON_WIDTH` height. Maniphest Tasks: T83716 Reviewed by: sybren Differential Revision: https://developer.blender.org/D9841
Diffstat (limited to 'source/blender/editors/animation/anim_channels_defines.c')
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index c70a86eab1d..6cb829d3a23 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -5353,7 +5353,7 @@ void ANIM_channel_draw_widgets(const bContext *C,
"",
ICON_NONE,
offset,
- ymid,
+ rect->ymin,
SLIDER_WIDTH,
channel_height);
UI_but_func_set(but, achannel_setting_slider_nla_curve_cb, ale->id, ale->data);
@@ -5411,7 +5411,7 @@ void ANIM_channel_draw_widgets(const bContext *C,
"",
icon,
offset,
- ymid,
+ rect->ymin,
ICON_WIDTH,
channel_height);
}
@@ -5437,7 +5437,7 @@ void ANIM_channel_draw_widgets(const bContext *C,
"",
icon,
offset,
- ymid,
+ rect->ymin,
ICON_WIDTH,
channel_height);
}
@@ -5457,7 +5457,7 @@ void ANIM_channel_draw_widgets(const bContext *C,
"",
ICON_NONE,
offset,
- ymid,
+ rect->ymin,
width,
channel_height);
}
@@ -5483,7 +5483,7 @@ void ANIM_channel_draw_widgets(const bContext *C,
"",
ICON_NONE,
offset,
- ymid,
+ rect->ymin,
SLIDER_WIDTH,
channel_height);