Update cargo dependencies, fix icons

This commit is contained in:
2024-05-26 12:01:25 +02:00
parent 011dab8d99
commit fae93ee352
7 changed files with 481 additions and 530 deletions

View File

@@ -1,6 +1,6 @@
use gtk::prelude::*;
use relm4::factory::FactoryVecDeque;
use relm4::factory::{FactoryVecDeque, Position};
use relm4::RelmListBoxExt;
use relm4::{gtk, ComponentParts, ComponentSender, SimpleComponent};
@@ -21,6 +21,7 @@ pub enum SheetListingInput {
Sort,
Shuffle,
ReloadSheets(Vec<Sheet>),
None,
}
#[derive(Debug)]
@@ -54,10 +55,12 @@ impl SimpleComponent for SheetListingModel {
fn init(
init: Self::Init,
root: &Self::Root,
root: Self::Root,
sender: ComponentSender<Self>,
) -> ComponentParts<Self> {
let mut sheets = FactoryVecDeque::new(gtk::ListBox::default(), sender.input_sender());
let mut sheets = FactoryVecDeque::builder()
.launch(gtk::ListBox::default())
.forward(sender.input_sender(), |_| SheetListingInput::None);
for sheet_model_type in init {
sheets.guard().push_back(sheet_model_type);
}
@@ -95,6 +98,7 @@ impl SimpleComponent for SheetListingModel {
}
sender.output(SheetListingOutput::ContentsChanged);
}
SheetListingInput::None => {}
}
}
}