MCPcopy Create free account
hub / github.com/alpha2phi/python-apps / showcase_stacklayout

Method showcase_stacklayout

gui-apps/app_kivy.py:172–191  ·  view source on GitHub ↗
(self, layout)

Source from the content-addressed store, hash-verified

170 Clock.schedule_once(add_button)
171
172 def showcase_stacklayout(self, layout):
173 orientations = ('lr-tb', 'tb-lr',
174 'rl-tb', 'tb-rl',
175 'lr-bt', 'bt-lr',
176 'rl-bt', 'bt-rl')
177
178 def add_button(*t):
179 if not layout.get_parent_window():
180 return
181 if len(layout.children) > 11:
182 layout.clear_widgets()
183 cur_orientation = orientations.index(layout.orientation)
184 layout.orientation = orientations[cur_orientation - 1]
185 layout.add_widget(Builder.load_string('''
186Button:
187 text: self.parent.orientation if self.parent else ''
188 size_hint: .2, .2
189'''))
190 Clock.schedule_once(add_button, 1)
191 Clock.schedule_once(add_button)
192
193 def showcase_anchorlayout(self, layout):
194

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected