File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -50,15 +50,16 @@ impl GuitarStringData {
5050 }
5151 fn width ( & self , theme : & NotationTheme ) -> f32 {
5252 let width = theme. guitar . get_string_width ( self . string ) ;
53- if !self . upper && self . state . is_current ( ) {
53+ let width_with_extra = if !self . upper && self . state . is_current ( ) {
5454 width + theme. guitar . current_extra_width
5555 } else {
5656 width
57- }
57+ } ;
58+ width_with_extra * self . guitar_size . width / theme. guitar . guitar_width
5859 }
5960 fn outline ( & self , theme : & NotationTheme ) -> f32 {
6061 if !self . upper && self . hit {
61- theme. guitar . hit_outline
62+ theme. guitar . hit_outline * self . guitar_size . width / theme . guitar . guitar_width
6263 } else {
6364 0.0
6465 }
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ pub struct GuitarTheme {
1818 pub fret_y_factors : [ f32 ; 23 ] ,
1919 pub capo_width_factor : f32 ,
2020 pub capo_height_factor : f32 ,
21+ pub guitar_width : f32 ,
2122}
2223
2324impl Default for GuitarTheme {
@@ -39,6 +40,7 @@ impl Default for GuitarTheme {
3940 ] ,
4041 capo_width_factor : 0.78 ,
4142 capo_height_factor : 0.02 ,
43+ guitar_width : 128.0 ,
4244 }
4345 }
4446}
You can’t perform that action at this time.
0 commit comments