Compare commits

..

No commits in common. "d46e1f48e227e3327ab8de79dccfa1c5ff8e3fdf" and "4f58c1eece579c4219ce74742facfe44291be0dd" have entirely different histories.

2 changed files with 25 additions and 28 deletions

0
deploy.sh Executable file → Normal file
View File

View File

@ -55,33 +55,12 @@ fn build_ui(application: &gtk::Application) {
window.set_title("lull");
window.set_border_width(SPACING as u32);
window.set_position(gtk::WindowPosition::Center);
window.set_default_size(256, 128);
window.set_default_size(256, 256);
let button_manage_sounds = gtk::Button::with_label("manage sounds");
let vertical = gtk::Box::new(Orientation::Vertical, SPACING);
vertical.set_homogeneous(true);
button_manage_sounds.connect_clicked(|_| {
let mut file_manager = Command::new(file_manager());
file_manager.arg(get_data_dir());
file_manager.output().unwrap();
});
let sounds_manage = gtk::Box::new(Orientation::Vertical, SPACING);
let columns = gtk::Box::new(Orientation::Horizontal, SPACING);
let column_labels = gtk::Box::new(Orientation::Vertical, SPACING);
let column_sliders = gtk::Box::new(Orientation::Vertical, SPACING);
columns.set_homogeneous(false);
column_labels.set_homogeneous(true);
column_sliders.set_homogeneous(true);
column_labels.set_property_expand(false);
column_sliders.set_property_expand(true);
column_sliders.set_property_width_request(128);
window.add(&sounds_manage);
sounds_manage.add(&columns);
sounds_manage.add(&button_manage_sounds);
columns.add(&column_labels);
columns.add(&column_sliders);
window.add(&vertical);
let device = rodio::default_output_device().unwrap();
@ -118,9 +97,11 @@ fn build_ui(application: &gtk::Application) {
sink.append(source);
sink.pause();
let row = gtk::Box::new(Orientation::Horizontal, SPACING);
row.set_homogeneous(true);
let label = gtk::Label::new(Some(name));
label.set_halign(gtk::Align::End);
column_labels.add(&label);
row.add(&label);
let adjustment = gtk::Adjustment::new(
0.0,
@ -149,9 +130,25 @@ fn build_ui(application: &gtk::Application) {
}
});
column_sliders.add(&slider);
row.add(&slider);
vertical.add(&row);
}
let row_add = gtk::Box::new(Orientation::Horizontal, SPACING);
row_add.set_homogeneous(true);
let button_manage_sounds = gtk::Button::with_label("manage sounds");
button_manage_sounds.connect_clicked(|_| {
let mut file_manager = Command::new(file_manager());
file_manager.arg(get_data_dir());
file_manager.output().unwrap();
});
row_add.add(&button_manage_sounds);
vertical.add(&row_add);
window.show_all();
}