Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #59

Merged
merged 60 commits into from
Jan 15, 2023
Merged

Dev #59

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
60 commits
Select commit Hold shift click to select a range
5982ee5
ui clean slate
Oct 3, 2022
96db5d3
implement initial top menu bar
Oct 4, 2022
c2fce68
styling of top bar
Oct 4, 2022
c7b89d4
work on top and bottom bar
Oct 4, 2022
bed1128
start remaking UI in Vizia
Oct 15, 2022
088175d
fix some styling
Oct 15, 2022
00ab941
new styling
Nov 14, 2022
ecbfe50
change styling of top bar text
Nov 14, 2022
010a371
work on browser
Nov 15, 2022
f5bb54d
work on browser panel
Nov 15, 2022
6d29b05
file browser now functional
Nov 16, 2022
4777409
playback samples in the browser
Nov 16, 2022
eddad09
always playback sample when invoked by play button
Nov 16, 2022
21e2bbb
update meadowlark-core-types dependency
Nov 25, 2022
7e8d405
work on timeline panel
Nov 26, 2022
d560417
work on track headers panel
Nov 26, 2022
e73f5d4
refactor state system
Nov 28, 2022
329b849
make track headers selectable
Nov 29, 2022
a3bbb05
work on custom knob widget
Nov 29, 2022
ce93c28
fix virtual slider value jumping when modifiers change
Nov 30, 2022
4cdae4a
add knobs to track headers
Dec 1, 2022
cb0d1dc
begin work on timeline view
Dec 3, 2022
c1b4ba4
work on timeline view
Dec 6, 2022
e266409
work on timeline view
Dec 7, 2022
f3d55bd
work on timeline grid
Dec 7, 2022
1a463c3
adjust drag zoom constants
Dec 7, 2022
5bc06a4
tweak timeline view colors
Dec 7, 2022
9df5bac
fix hidpi issues
Dec 8, 2022
397f668
refactor state system
Dec 13, 2022
d9cb8f0
work on timeline state
Dec 14, 2022
b3fdfba
work on timeline state
Dec 14, 2022
bdae43f
work on timeline view state
Dec 14, 2022
a3e5b43
work on timeline view clips
Dec 15, 2022
c04db70
add border radius to clips
Dec 15, 2022
b13053f
work on timeline view loop markers
Dec 15, 2022
765951a
only round parts of clip tops
Dec 15, 2022
aadfa2b
draw labels on clips
Dec 16, 2022
6b07d9f
fix text clipping on clips
Dec 16, 2022
df6974d
work on new audio clip renderer
Dec 20, 2022
c5d3b76
Fix clipping in sample browser plugin
Dec 20, 2022
b2f3fa5
use crossfading in sample browser plugin
Dec 20, 2022
ee198c2
work on audio clip renderer
Dec 21, 2022
7961f00
work on audio clip renderer
Dec 21, 2022
d80355d
work on timeline track plugin
Dec 23, 2022
d646a59
work on timeline track plugin
Dec 27, 2022
f3e32c9
work on audio clip renderer
Dec 28, 2022
72ad30f
audio clips are making sound!
Dec 28, 2022
2e56234
bump dropseed dep
Dec 29, 2022
b9ced12
refactoring
Dec 31, 2022
51e0703
update design doc
Dec 31, 2022
0ff2027
refactor timeline view
Jan 4, 2023
5ea5e0f
refactor state system
Jan 4, 2023
66c94d3
work on ui
Jan 5, 2023
0f7f09f
declick audio clips on timeline
Jan 6, 2023
8483d58
bump dropseed dependency
Jan 7, 2023
d6e2eca
ability to select single clips
Jan 9, 2023
09e2906
movable clips in UI
Jan 13, 2023
900400f
order rendering of clips
Jan 13, 2023
eceb0b9
move dropseed engine into meadowlark repo
Jan 14, 2023
a9c19d2
Merge pull request #57 from MeadowlarkDAW/integrate-dropseed
Jan 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
work on browser panel
  • Loading branch information
Billy Messenger authored and Billy Messenger committed Nov 15, 2022
commit f5bb54d3d7026a6d4d469f6d6850b4e5ace5907b
21 changes: 21 additions & 0 deletions src/state_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 6,8 @@ pub mod bound_ui_state;
pub use actions::AppAction;
pub use bound_ui_state::{BoundUiState, BrowserPanelTab};

use crate::state_system::bound_ui_state::BrowserListEntryType;

#[derive(Lens)]
pub struct StateSystem {
pub bound_ui_state: BoundUiState,
Expand Down Expand Up @@ -41,6 43,25 @@ impl Model for StateSystem {
AppAction::SetBrowserVolumeNormalized(volume_normalized) => {
self.bound_ui_state.browser_panel_volume_normalized = *volume_normalized;
}
AppAction::BrowserItemSelected(index) => {
if let Some(old_entry_i) = self.bound_ui_state.selected_browser_entry.take() {
if let Some(old_entry) =
&mut self.bound_ui_state.browser_list_entries.get_mut(old_entry_i)
{
old_entry.selected = false;
}
}

if let Some(entry) = self.bound_ui_state.browser_list_entries.get_mut(*index) {
match entry.type_ {
BrowserListEntryType::AudioFile => {
self.bound_ui_state.selected_browser_entry = Some(*index);
entry.selected = true;
}
BrowserListEntryType::Folder => {}
}
}
}
});
}
}
1 change: 1 addition & 0 deletions src/state_system/actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 8,5 @@ pub enum AppAction {
SetBrowserPanelWidth(f32),
SetBrowserPanelSearchText(String),
SetBrowserVolumeNormalized(f32),
BrowserItemSelected(usize),
}
68 changes: 67 additions & 1 deletion src/state_system/bound_ui_state.rs
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
use vizia::prelude::*;

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Data)]
pub enum BrowserPanelTab {
Samples,
Multisamples,
Expand All @@ -12,13 12,29 @@ pub enum BrowserPanelTab {
Files,
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum BrowserListEntryType {
AudioFile,
Folder,
}

#[derive(Debug, Lens, Clone)]
pub struct BrowserListEntry {
pub type_: BrowserListEntryType,
pub text: String,
pub selected: bool,
}

#[derive(Debug, Lens, Clone)]
pub struct BoundUiState {
pub browser_panel_shown: bool,
pub browser_panel_tab: BrowserPanelTab,
pub browser_panel_width: f32,
pub browser_panel_search_text: String,
pub browser_panel_volume_normalized: f32,
pub browser_current_directory: String,
pub browser_list_entries: Vec<BrowserListEntry>,
pub selected_browser_entry: Option<usize>,
}

impl BoundUiState {
Expand All @@ -29,6 45,56 @@ impl BoundUiState {
browser_panel_width: 200.0,
browser_panel_search_text: String::new(),
browser_panel_volume_normalized: 0.75,
browser_current_directory: "../testtesttest".into(),
selected_browser_entry: None,

browser_list_entries: vec![
BrowserListEntry {
type_: BrowserListEntryType::Folder,
text: "test_folder_1".into(),
selected: false,
},
BrowserListEntry {
type_: BrowserListEntryType::Folder,
text: "test_folder_2".into(),
selected: false,
},
BrowserListEntry {
type_: BrowserListEntryType::Folder,
text: "test_folder_3".into(),
selected: false,
},
BrowserListEntry {
type_: BrowserListEntryType::AudioFile,
text: "test_file_1.wav".into(),
selected: false,
},
BrowserListEntry {
type_: BrowserListEntryType::AudioFile,
text: "test_file_2.wav".into(),
selected: false,
},
BrowserListEntry {
type_: BrowserListEntryType::AudioFile,
text: "test_file_3.wav".into(),
selected: false,
},
BrowserListEntry {
type_: BrowserListEntryType::AudioFile,
text: "test_file_4.wav".into(),
selected: false,
},
BrowserListEntry {
type_: BrowserListEntryType::AudioFile,
text: "test_file_5.wav".into(),
selected: false,
},
BrowserListEntry {
type_: BrowserListEntryType::AudioFile,
text: "test_file_6.wav".into(),
selected: false,
},
],
}
}
}
Expand Down
1 change: 0 additions & 1 deletion src/ui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 12,6 @@ use crate::state_system::{AppAction, StateSystem};

use self::panels::{bottom_bar, browser_panel, side_tab_bar, top_bar};

pub mod icon;
pub mod panels;
pub mod views;

Expand Down
7 changes: 4 additions & 3 deletions src/ui/panels/bottom_bar.rs
Original file line number Diff line number Diff line change
@@ -1,14 1,15 @@
use vizia::prelude::*;

use crate::ui::icon::{Icon, IconCode};
use crate::ui::views::{Icon, IconCode};

pub fn bottom_bar(cx: &mut Context) {
HStack::new(cx, |cx| {
Button::new(cx, |_| {}, |cx| Icon::new(cx, IconCode::Home, 28.0, 20.0)).class("icon_btn");
Button::new(cx, |_| {}, |cx| Icon::new(cx, IconCode::Home, 22.0, 20.0)).class("icon_btn");

Button::new(cx, |_| {}, |cx| Icon::new(cx, IconCode::Terminal, 28.0, 20.0))
Button::new(cx, |_| {}, |cx| Icon::new(cx, IconCode::Terminal, 22.0, 20.0))
.class("icon_btn")
.left(Stretch(1.0));
})
.height(Pixels(26.0))
.class("bottom_bar");
}
Loading