Mercurial > libervia-desktop-kivy
comparison cagou/core/widgets_handler.py @ 248:b6e33b35538b
core, widgets handler: visible_widgets now keep all CagouWidgets, not only QuickWidgets. visible_quick_widgets can be used if only QuickWidgets are desired.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 26 Jan 2019 20:24:48 +0100 |
parents | 9835cafbd909 |
children | 145c29b5f2b5 |
comparison
equal
deleted
inserted
replaced
247:cf61a011f731 | 248:b6e33b35538b |
---|---|
321 self.carousel.add_widget(new_widget) | 321 self.carousel.add_widget(new_widget) |
322 self._slides_update_lock = False | 322 self._slides_update_lock = False |
323 self.updateHiddenSlides() | 323 self.updateHiddenSlides() |
324 | 324 |
325 def onSlideChange(self, handler, new_slide): | 325 def onSlideChange(self, handler, new_slide): |
326 if isinstance(self._former_slide, quick_widgets.QuickWidget): | 326 if self._former_slide is not None: |
327 G.host.removeVisibleWidget(self._former_slide) | 327 G.host._removeVisibleWidget(self._former_slide) |
328 self._former_slide = new_slide | 328 self._former_slide = new_slide |
329 if isinstance(new_slide, quick_widgets.QuickWidget): | 329 if new_slide is not None: |
330 G.host.addVisibleWidget(new_slide) | 330 G.host._addVisibleWidget(new_slide) |
331 self.updateHiddenSlides() | 331 self.updateHiddenSlides() |
332 | 332 |
333 def hiddenList(self, visible_list): | 333 def hiddenList(self, visible_list): |
334 """return widgets of same class as holded one which are hidden | 334 """return widgets of same class as holded one which are hidden |
335 | 335 |