mirror of
https://github.com/13hannes11/toolbx-tuner.git
synced 2024-09-03 23:21:00 +02:00
add some more icons
This commit is contained in:
@@ -3,5 +3,5 @@ app_id = "org.kuchelmeister.ToolboxTuner"
|
|||||||
|
|
||||||
# List of icon names you found (shipped with this crate)
|
# List of icon names you found (shipped with this crate)
|
||||||
# Note: the file ending `-symbolic.svg` isn't part of the icon name.
|
# Note: the file ending `-symbolic.svg` isn't part of the icon name.
|
||||||
icons = ["issue"]
|
icons = ["issue", "play", "pause", "terminal"]
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ use relm4::adw::prelude::ActionRowExt;
|
|||||||
use relm4::adw::prelude::PreferencesRowExt;
|
use relm4::adw::prelude::PreferencesRowExt;
|
||||||
use relm4::factory::{FactoryComponent, FactorySender};
|
use relm4::factory::{FactoryComponent, FactorySender};
|
||||||
use relm4::gtk;
|
use relm4::gtk;
|
||||||
|
use relm4_icons::icon_names;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Container {
|
pub struct Container {
|
||||||
@@ -29,12 +30,18 @@ impl FactoryComponent for Container {
|
|||||||
view! {
|
view! {
|
||||||
root = adw::ActionRow {
|
root = adw::ActionRow {
|
||||||
#[watch]
|
#[watch]
|
||||||
set_title: &self.hash,
|
set_title: format!{"{}: {}", self.hash, self.value.to_string()}.as_str(),
|
||||||
|
|
||||||
|
#[name(play_button)]
|
||||||
|
add_prefix = >k::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)]
|
#[name(add_button)]
|
||||||
add_suffix = >k::Button {
|
add_suffix = >k::Button {
|
||||||
#[watch]
|
set_icon_name: icon_names::TERMINAL,
|
||||||
set_label: &self.value.to_string(),
|
|
||||||
connect_clicked => ContainerMsg::Start,
|
connect_clicked => ContainerMsg::Start,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user