Sideband/sbapp/kivymd/uix/sliverappbar/sliverappbar.kv

42 lines
1.2 KiB
Plaintext
Raw Normal View History

2022-07-07 14:16:10 -06:00
#:import ScrollEffect kivy.effects.scroll.ScrollEffect
#:import get_color_from_hex kivy.utils.get_color_from_hex
<MDSliverAppbar>
FloatLayout:
id: float_box
BoxLayout:
canvas.after:
Color:
rgba:
root.background_color \
if root.background_color else \
2022-10-02 09:16:59 -06:00
root.theme_cls.primary_color
2022-07-07 14:16:10 -06:00
a: root._opacity
Rectangle:
pos: self.pos
size: self.size
id: header
size_hint_y: None
height: root.max_height + root.radius[0]
pos: self.x, root.height - root.max_height - root.radius[0]
ScrollView:
id: scroll
effect_cls: ScrollEffect
on_vbar: root.on_vbar()
on_scroll_start:
if not root._scroll_was_moving: root._scroll_was_moving = True
MDBoxLayout:
id: scroll_box
adaptive_height: True
orientation: "vertical"
BoxLayout:
size_hint_y: None
height: root.max_height