mirror of
https://github.com/13hannes11/toolbx-tuner.git
synced 2024-09-03 23:21:00 +02:00
wrap play button in aspecframe to keep from weirdly resizing when parent size increases
This commit is contained in:
@@ -139,6 +139,11 @@ impl Component for App {
|
|||||||
containers.insert("5344".to_string(), 3);
|
containers.insert("5344".to_string(), 3);
|
||||||
containers.insert("1242344".to_string(), 3);
|
containers.insert("1242344".to_string(), 3);
|
||||||
containers.insert("1265464".to_string(), 3);
|
containers.insert("1265464".to_string(), 3);
|
||||||
|
containers.insert(
|
||||||
|
"126222222222222222222222222222222222222222233333333333333333333333333333333325464"
|
||||||
|
.to_string(),
|
||||||
|
3,
|
||||||
|
);
|
||||||
|
|
||||||
let model = Self {
|
let model = Self {
|
||||||
about_dialog,
|
about_dialog,
|
||||||
|
|||||||
@@ -33,14 +33,19 @@ impl FactoryComponent for Container {
|
|||||||
#[watch]
|
#[watch]
|
||||||
set_title: format!{"{}: {}", self.hash, self.value.to_string()}.as_str(),
|
set_title: format!{"{}: {}", self.hash, self.value.to_string()}.as_str(),
|
||||||
|
|
||||||
#[name(play_button)]
|
add_prefix = >k::Box{
|
||||||
add_prefix = >k::Button {
|
gtk::AspectFrame{
|
||||||
// TODO: make component with state that either is waiting, play or pause
|
set_ratio: 1.0,
|
||||||
set_icon_name: icon_names::PLAY,
|
#[name(play_button)]
|
||||||
set_margin_top: 10,
|
gtk::Button {
|
||||||
set_margin_bottom: 10,
|
// TODO: make component with state that either is waiting, play or pause
|
||||||
set_css_classes: &["circular"],
|
set_icon_name: icon_names::PLAY,
|
||||||
connect_clicked => ContainerMsg::Start,
|
set_margin_top: 10,
|
||||||
|
set_margin_bottom: 10,
|
||||||
|
set_css_classes: &["circular"],
|
||||||
|
connect_clicked => ContainerMsg::Start,
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
add_suffix = >k::Box{
|
add_suffix = >k::Box{
|
||||||
|
|||||||
Reference in New Issue
Block a user