feat: add master volume slider

This commit is contained in:
2026-01-24 23:45:33 +03:00
parent 5afe3dd45b
commit 4d54443593
5 changed files with 91 additions and 17 deletions
+9
View File
@@ -12,8 +12,10 @@ use std::{
pub struct TrackUiState {
pub position_slider_value: f32,
pub volume_slider_value: f32,
pub position_dragged: bool,
pub volume_dragged: bool,
pub ignore_position_update_until: Option<Instant>,
pub ignore_volume_update_until: Option<Instant>,
}
@@ -25,6 +27,11 @@ pub struct AppState {
pub track_ui_states: HashMap<u32, TrackUiState>,
pub show_settings: bool,
pub volume_dragged: bool,
pub volume_slider_value: f32,
pub ignore_volume_update_until: Option<Instant>,
pub current_dir: Option<PathBuf>,
pub dirs: HashSet<PathBuf>,
@@ -43,6 +50,8 @@ pub struct AudioPlayerState {
pub tracks: Vec<TrackInfo>,
pub volume: f32, // Master volume
pub current_input: String,
pub all_inputs: HashMap<String, String>,
}