From b8bc770ebee1136b7feba3c901547866fb051b5f Mon Sep 17 00:00:00 2001 From: Nicolai Syvertsen Date: Sat, 4 May 2024 13:12:01 +0200 Subject: [PATCH] PwProfielRow: Initialize opacity of checkmark to 0. --- data/resources/ui/profilerow.ui | 1 + src/ui/profilerow.rs | 10 ++++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/data/resources/ui/profilerow.ui b/data/resources/ui/profilerow.ui index 06dc86c..5b540d1 100644 --- a/data/resources/ui/profilerow.ui +++ b/data/resources/ui/profilerow.ui @@ -17,6 +17,7 @@ object-select-symbolic + 0 diff --git a/src/ui/profilerow.rs b/src/ui/profilerow.rs index a8433ab..e0e4607 100644 --- a/src/ui/profilerow.rs +++ b/src/ui/profilerow.rs @@ -64,12 +64,10 @@ impl PwProfileRow { } item.property_expression("item") - .chain_property::("description") - .bind(&label, "label", gtk::Widget::NONE); + .chain_property::("description") + .bind(&label, "label", gtk::Widget::NONE); - let icon_closure = closure_local!(|_: Option, availability: ParamAvailability| { - availability == ParamAvailability::No - }); + let icon_closure = closure_local!(|_: Option, availability: ParamAvailability| { availability == ParamAvailability::No }); item.property_expression("item") .chain_property::("availability") @@ -78,7 +76,7 @@ impl PwProfileRow { } pub fn set_selected(&self, selected: bool) { - self.imp().checkmark_icon.set_opacity(if selected {1.0} else {0.0}); + self.imp().checkmark_icon.set_opacity(if selected { 1.0 } else { 0.0 }); } pub fn set_handlerid(&self, id: Option) {