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