Skip to content

Commit 040eec8

Browse files
committed
tweak tone note y offset
1 parent c2bfa18 commit 040eec8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

crates/notation_bevy/src/tone/tone_note.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,18 @@ impl ShapeOp<NotationTheme, OutlineRectangle> for ToneNoteData {
5050
} else {
5151
let x = self.value.bar_size / self.bar_props.bar_units.0
5252
* self.entry_props.in_bar_pos.0;
53-
let y = if self.value.mode.is_melody() {
53+
let mut y = if self.value.mode.is_melody() {
5454
theme
5555
.sizes.melody
5656
.calc_note_y(self.value.note)
5757
} else {
5858
0.0
5959
};
60+
if self.value.playing_state.is_current() {
61+
let outline = self.calc_outline(theme);
62+
y -= outline / 2.0;
63+
}
64+
6065
let (_width, height) = self.calc_width_height(theme);
6166
let extra_z = if self.value.playing_state.is_current() {
6267
1.0

0 commit comments

Comments
 (0)