1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-04-19 11:24:24 +02:00

refactor(popup): rename is_visible to visible

This commit is contained in:
Jake Stanger 2024-05-18 16:21:42 +01:00
parent 6b8e8743dd
commit dedb89bb02
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
2 changed files with 3 additions and 3 deletions

View file

@ -382,7 +382,7 @@ impl ModuleFactory for BarModuleFactory {
}
ModuleUpdateEvent::TogglePopup(button_id) if !disable_popup => {
debug!("Toggling popup for {} [#{}] (button id: {button_id})", name, id);
if popup.is_visible() && popup.current_widget().unwrap_or_default() == id {
if popup.visible() && popup.current_widget().unwrap_or_default() == id {
popup.hide();
} else {
popup.show(id, button_id);
@ -455,7 +455,7 @@ impl ModuleFactory for PopupModuleFactory {
}
ModuleUpdateEvent::TogglePopup(_) if !disable_popup => {
debug!("Toggling popup for {} [#{}] (button id: {button_id})", name, id);
if popup.is_visible() && popup.current_widget().unwrap_or_default() == id {
if popup.visible() && popup.current_widget().unwrap_or_default() == id {
popup.hide();
} else {
popup.show(id, button_id);

View file

@ -229,7 +229,7 @@ impl Popup {
}
/// Checks if the popup is currently visible
pub fn is_visible(&self) -> bool {
pub fn visible(&self) -> bool {
self.window.is_visible()
}