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("1242344".to_string(), 3);
|
||||
containers.insert("1265464".to_string(), 3);
|
||||
containers.insert(
|
||||
"126222222222222222222222222222222222222222233333333333333333333333333333333325464"
|
||||
.to_string(),
|
||||
3,
|
||||
);
|
||||
|
||||
let model = Self {
|
||||
about_dialog,
|
||||
|
||||
@@ -33,14 +33,19 @@ impl FactoryComponent for Container {
|
||||
#[watch]
|
||||
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,
|
||||
set_margin_top: 10,
|
||||
set_margin_bottom: 10,
|
||||
set_css_classes: &["circular"],
|
||||
connect_clicked => ContainerMsg::Start,
|
||||
add_prefix = >k::Box{
|
||||
gtk::AspectFrame{
|
||||
set_ratio: 1.0,
|
||||
#[name(play_button)]
|
||||
gtk::Button {
|
||||
// TODO: make component with state that either is waiting, play or pause
|
||||
set_icon_name: icon_names::PLAY,
|
||||
set_margin_top: 10,
|
||||
set_margin_bottom: 10,
|
||||
set_css_classes: &["circular"],
|
||||
connect_clicked => ContainerMsg::Start,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
add_suffix = >k::Box{
|
||||
|
||||
Reference in New Issue
Block a user