mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-04-19 19:34:24 +02:00
refactor(popup): rename is_visible
to visible
This commit is contained in:
parent
6b8e8743dd
commit
dedb89bb02
2 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue