comparison 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
comparison
equal deleted inserted replaced
415:5761b5f03c0c 416:3e2333a11f61
157 157
158 class SymbolButton(ButtonBehavior, Symbol): 158 class SymbolButton(ButtonBehavior, Symbol):
159 pass 159 pass
160 160
161 161
162 class SymbolLabel(ButtonBehavior, BoxLayout): 162 class SymbolLabel(BoxLayout):
163 symbol = properties.StringProperty("") 163 symbol = properties.StringProperty("")
164 text = properties.StringProperty("") 164 text = properties.StringProperty("")
165 color = properties.ListProperty(C.COLOR_SEC) 165 color = properties.ListProperty(C.COLOR_SEC)
166 bold = properties.BooleanProperty(True) 166 bold = properties.BooleanProperty(True)
167 symbol_wid = properties.ObjectProperty() 167 symbol_wid = properties.ObjectProperty()
168 label = properties.ObjectProperty() 168 label = properties.ObjectProperty()
169
170
171 class SymbolButtonLabel(ButtonBehavior, SymbolLabel):
172 pass
173
174
175 class SymbolToggleLabel(ToggleButtonBehavior, SymbolLabel):
176 pass
169 177
170 178
171 class ActionSymbol(Symbol): 179 class ActionSymbol(Symbol):
172 pass 180 pass
173 181