Mercurial > libervia-desktop-kivy
comparison cagou/core/menu.py @ 365:9c6fe392d623
core (widgets_handler): use a StencilView + BoxLayout instead of ScrollView as wrapper:
The default wrapping when no Carousel or ScreenManager was used was a ScrollView. This was
causing bugs as the touch event is not propagated correctly when a ScrollView is in
children of ScrollView (notably causing trouble with ModernMenu on ContactList and
FileSharing widgets).
To avoid that, a simple StencilView with BoxLayout is now used instead. If a ScrollView is
needed, it can be added inside the widget (this is the case for WidgetSelector).
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 27 Jan 2020 21:17:08 +0100 |
parents | b77792cc6d12 |
children | 5d994be1161b |
comparison
equal
deleted
inserted
replaced
364:a1f3af7c0b67 | 365:9c6fe392d623 |
---|---|
446 pos = self.to_widget(*touch.pos) | 446 pos = self.to_widget(*touch.pos) |
447 choices = item.getMenuChoices() | 447 choices = item.getMenuChoices() |
448 if not choices: | 448 if not choices: |
449 return | 449 return |
450 self.menu = TouchMenu(choices=choices, | 450 self.menu = TouchMenu(choices=choices, |
451 center=pos, | 451 center=pos, |
452 size_hint=(None, None)) | 452 size_hint=(None, None)) |
453 self.float_layout.add_widget(self.menu) | 453 self.float_layout.add_widget(self.menu) |
454 self.menu.start_display(touch) | 454 self.menu.start_display(touch) |
455 self.menu_item = item | 455 self.menu_item = item |
456 | 456 |
457 def on_float_layout(self, wid, float_layout): | 457 def on_float_layout(self, wid, float_layout): |