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:
Observer KRypt0n_ 2023-03-01 19:48:02 +02:00
parent 6ab0423579
commit 9d98f2890d
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2
2 changed files with 144 additions and 128 deletions

View file

@ -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

View file

@ -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 |_| {