diff cagou/core/common.py @ 416:3e2333a11f61

common: implemented SymbolToggleLabel: - SymbolLabel doesn't do button behaviour anymore - SymbolButtonLabel does the button behaviour (to use instead of former SymbolLabel) - SymbolToggleLabel does toggle button behaviour
author Goffi <goffi@goffi.org>
date Sun, 23 Feb 2020 17:13:15 +0100
parents 364d2c8eb476
children efee0e0afb78
line wrap: on
line diff
--- a/cagou/core/common.py	Sun Feb 23 15:39:06 2020 +0100
+++ b/cagou/core/common.py	Sun Feb 23 17:13:15 2020 +0100
@@ -159,7 +159,7 @@
     pass
 
 
-class SymbolLabel(ButtonBehavior, BoxLayout):
+class SymbolLabel(BoxLayout):
     symbol = properties.StringProperty("")
     text = properties.StringProperty("")
     color = properties.ListProperty(C.COLOR_SEC)
@@ -168,6 +168,14 @@
     label = properties.ObjectProperty()
 
 
+class SymbolButtonLabel(ButtonBehavior, SymbolLabel):
+    pass
+
+
+class SymbolToggleLabel(ToggleButtonBehavior, SymbolLabel):
+    pass
+
+
 class ActionSymbol(Symbol):
     pass