refactor(transport): make widgets focusable

This commit is contained in:
🪞👃🪞 2024-09-01 20:29:15 +03:00
parent 2106a7c044
commit b8ac83b019
9 changed files with 204 additions and 132 deletions

View file

@ -15,8 +15,12 @@ pub struct Arranger {
pub mode: ArrangerViewMode,
/// Slot for modal dialog displayed on top of app.
pub modal: Option<Box<dyn ExitableComponent>>,
/// Whether the arranger is currently focused
pub focused: bool
}
focusable!(Arranger (focused));
impl Arranger {
pub fn new (name: &str) -> Self {
Self {
@ -25,7 +29,8 @@ impl Arranger {
selected: ArrangerFocus::Clip(0, 0),
scenes: vec![],
tracks: vec![],
modal: None
modal: None,
focused: false
}
}
pub fn activate (&mut self) {