mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-02-05 07:54:14 +00:00
update pin toggle action
This commit is contained in:
parent
4e3ba05195
commit
02715ea8aa
@ -34,10 +34,17 @@ impl Label {
|
||||
|
||||
// Actions
|
||||
pub fn pin(&self) -> bool {
|
||||
self.pin
|
||||
.widget()
|
||||
.set_visible(!self.pin.widget().is_visible());
|
||||
self.pin.widget().is_visible()
|
||||
// Toggle status
|
||||
let is_pinned = !self.pin.widget().is_visible();
|
||||
|
||||
// Update pin widget
|
||||
self.pin.widget().set_visible(is_pinned);
|
||||
|
||||
// Update label widget
|
||||
self.title.widget().set_visible(!is_pinned);
|
||||
|
||||
// Result
|
||||
is_pinned
|
||||
}
|
||||
|
||||
// Getters
|
||||
|
Loading…
x
Reference in New Issue
Block a user