Skip to content

Commit

Permalink
PwProfielRow: Initialize opacity of checkmark to 0.
Browse files Browse the repository at this point in the history
  • Loading branch information
saivert committed May 4, 2024
1 parent 5b8ffe1 commit b8bc770
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions data/resources/ui/profilerow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<child>
<object class="GtkImage" id="checkmark_icon">
<property name="icon-name">object-select-symbolic</property>
<property name="opacity">0</property>
</object>
</child>
</template>
Expand Down
10 changes: 4 additions & 6 deletions src/ui/profilerow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,10 @@ impl PwProfileRow {
}

item.property_expression("item")
.chain_property::<Type>("description")
.bind(&label, "label", gtk::Widget::NONE);
.chain_property::<Type>("description")
.bind(&label, "label", gtk::Widget::NONE);

let icon_closure = closure_local!(|_: Option<glib::Object>, availability: ParamAvailability| {
availability == ParamAvailability::No
});
let icon_closure = closure_local!(|_: Option<glib::Object>, availability: ParamAvailability| { availability == ParamAvailability::No });

item.property_expression("item")
.chain_property::<Type>("availability")
Expand All @@ -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<glib::SignalHandlerId>) {
Expand Down

0 comments on commit b8bc770

Please sign in to comment.