Skip to content

Commit

Permalink
#1301 Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
helgoboss committed Nov 4, 2024
1 parent 6226f22 commit fce4f9b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/src/persistence/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ pub enum StreamDeckButtonForeground {
FadingColor(StreamDeckButtonFadingColorForeground),
FadingImage(StreamDeckButtonFadingImageForeground),
FullBar(StreamDeckButtonFullBarForeground),
Arc(StreamDeckButtonKnobForeground),
Knob(StreamDeckButtonKnobForeground),
}

impl Default for StreamDeckButtonForeground {
Expand Down
4 changes: 2 additions & 2 deletions main/src/application/source_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ impl SourceModel {
StreamDeckButtonForeground::FullBar(Default::default())
}
StreamDeckButtonForegroundType::Knob => {
StreamDeckButtonForeground::Arc(Default::default())
StreamDeckButtonForeground::Knob(Default::default())
}
},
}
Expand Down Expand Up @@ -1382,7 +1382,7 @@ impl From<&StreamDeckButtonForeground> for StreamDeckButtonForegroundType {
match value {
StreamDeckButtonForeground::FadingColor(_) => Self::FadingColor,
StreamDeckButtonForeground::FadingImage(_) => Self::FadingImage,
StreamDeckButtonForeground::Arc(_) => Self::Knob,
StreamDeckButtonForeground::Knob(_) => Self::Knob,
StreamDeckButtonForeground::FullBar(_) => Self::FullBar,
}
}
Expand Down
2 changes: 1 addition & 1 deletion main/src/domain/backbone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ impl Backbone {
}
}
}
StreamDeckButtonForeground::Arc(_) => {
StreamDeckButtonForeground::Knob(_) => {
draw_knob(&mut img, width, height, fb_value);
}
}
Expand Down
2 changes: 1 addition & 1 deletion main/src/infrastructure/data/source_model_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ impl SourceModelData {
model.change(P::SetButtonForegroundImagePath(b.path.clone().into()));
}
StreamDeckButtonForeground::FullBar(_) => {}
StreamDeckButtonForeground::Arc(_) => {}
StreamDeckButtonForeground::Knob(_) => {}
}
model.change(P::SetButtonForegroundType(
(&self.button_design.foreground).into(),
Expand Down

0 comments on commit fce4f9b

Please sign in to comment.