mirror of
https://github.com/an-anime-team/sleepy-launcher.git
synced 2024-11-22 21:02:44 +03:00
feat(ui): added backgrounds to main window buttons
Before they were transparent and e.g. settings button was nearly invisible
This commit is contained in:
parent
6ab0423579
commit
9d98f2890d
2 changed files with 144 additions and 128 deletions
|
@ -148,6 +148,10 @@ fn main() {
|
|||
transition-duration: 0.5s;
|
||||
transition-timing-function: linear;
|
||||
}}
|
||||
|
||||
.round-bin {{
|
||||
border-radius: 8px;
|
||||
}}
|
||||
", BACKGROUND_FILE.to_string_lossy()));
|
||||
|
||||
// Set UI language
|
||||
|
|
|
@ -259,6 +259,9 @@ impl SimpleComponent for App {
|
|||
|
||||
// TODO: add tooltips
|
||||
|
||||
adw::Bin {
|
||||
set_css_classes: &["background", "round-bin"],
|
||||
|
||||
gtk::Button {
|
||||
#[watch]
|
||||
set_width_request: match model.style {
|
||||
|
@ -331,8 +334,12 @@ impl SimpleComponent for App {
|
|||
set_hexpand: false,
|
||||
|
||||
connect_clicked => AppMsg::PredownloadUpdate
|
||||
}
|
||||
},
|
||||
|
||||
adw::Bin {
|
||||
set_css_classes: &["background", "round-bin"],
|
||||
|
||||
gtk::Button {
|
||||
#[watch]
|
||||
set_label: &match model.state {
|
||||
|
@ -413,8 +420,12 @@ impl SimpleComponent for App {
|
|||
set_width_request: 200,
|
||||
|
||||
connect_clicked => AppMsg::PerformAction
|
||||
}
|
||||
},
|
||||
|
||||
adw::Bin {
|
||||
set_css_classes: &["background", "round-bin"],
|
||||
|
||||
gtk::Button {
|
||||
#[watch]
|
||||
set_width_request: match model.style {
|
||||
|
@ -433,6 +444,7 @@ impl SimpleComponent for App {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
connect_close_request[sender] => move |_| {
|
||||
|
|
Loading…
Reference in a new issue