add some more icons

This commit is contained in:
2024-03-17 18:15:16 +01:00
parent b52232a4cb
commit 5f2819f0b8
2 changed files with 11 additions and 4 deletions

View File

@@ -3,5 +3,5 @@ app_id = "org.kuchelmeister.ToolboxTuner"
# List of icon names you found (shipped with this crate)
# Note: the file ending `-symbolic.svg` isn't part of the icon name.
icons = ["issue"]
icons = ["issue", "play", "pause", "terminal"]

View File

@@ -4,6 +4,7 @@ use relm4::adw::prelude::ActionRowExt;
use relm4::adw::prelude::PreferencesRowExt;
use relm4::factory::{FactoryComponent, FactorySender};
use relm4::gtk;
use relm4_icons::icon_names;
#[derive(Debug)]
pub struct Container {
@@ -29,12 +30,18 @@ impl FactoryComponent for Container {
view! {
root = adw::ActionRow {
#[watch]
set_title: &self.hash,
set_title: format!{"{}: {}", self.hash, self.value.to_string()}.as_str(),
#[name(play_button)]
add_prefix = &gtk::Button {
// TODO: make component with state that either is waiting, play or pause
set_icon_name: icon_names::PLAY,
connect_clicked => ContainerMsg::Start,
},
#[name(add_button)]
add_suffix = &gtk::Button {
#[watch]
set_label: &self.value.to_string(),
set_icon_name: icon_names::TERMINAL,
connect_clicked => ContainerMsg::Start,
},
}