mirror of
https://github.com/libratbag/piper.git
synced 2026-04-22 15:28:13 -04:00
MousePerspective: do not show "Add profile" button
Previously, we would just make it insensitive (i.e., not clickable). But why show it at all if it cannot be used anyway?
This commit is contained in:
committed by
Peter Hutterer
parent
a9f4e80f2e
commit
b76b2fc362
@@ -100,7 +100,7 @@ class MousePerspective(Gtk.Overlay):
|
||||
# Find the first profile that is enabled. If there is none, disable the
|
||||
# add button.
|
||||
left = next((p for p in device.profiles if not p.enabled), None)
|
||||
self.add_profile_button.set_sensitive(left is not None)
|
||||
self.add_profile_button.set_visible(left is not None)
|
||||
|
||||
self.listbox_profiles.foreach(Gtk.Widget.destroy)
|
||||
for profile in device.profiles:
|
||||
|
||||
Reference in New Issue
Block a user