mirror of
https://github.com/markqvist/Sideband.git
synced 2025-09-19 20:34:41 -04:00
Updated kivymd
This commit is contained in:
parent
c6df8b851b
commit
abcf173cc8
160 changed files with 11617 additions and 6545 deletions
|
@ -1,7 +1,7 @@
|
|||
<_Triangle>:
|
||||
canvas:
|
||||
Color:
|
||||
rgba: root.theme_cls.text_color
|
||||
rgba: app.theme_cls.text_color
|
||||
Triangle:
|
||||
points:
|
||||
[ \
|
||||
|
@ -13,7 +13,8 @@
|
|||
|
||||
<MDDropDownItem>
|
||||
orientation: "vertical"
|
||||
adaptive_size: True
|
||||
size_hint: None, None
|
||||
size: self.minimum_size
|
||||
spacing: "5dp"
|
||||
padding: "5dp", "5dp", "5dp", 0
|
||||
|
||||
|
|
|
@ -15,13 +15,13 @@ Usage
|
|||
from kivymd.app import MDApp
|
||||
|
||||
KV = '''
|
||||
Screen
|
||||
MDScreen
|
||||
|
||||
MDDropDownItem:
|
||||
id: drop_item
|
||||
pos_hint: {'center_x': .5, 'center_y': .5}
|
||||
text: 'Item'
|
||||
on_release: self.set_item("New Item")
|
||||
on_release: print("Press item")
|
||||
'''
|
||||
|
||||
|
||||
|
@ -48,12 +48,12 @@ import os
|
|||
from kivy.lang import Builder
|
||||
from kivy.properties import NumericProperty, StringProperty
|
||||
from kivy.uix.behaviors import ButtonBehavior
|
||||
from kivy.uix.boxlayout import BoxLayout
|
||||
from kivy.uix.widget import Widget
|
||||
|
||||
from kivymd import uix_path
|
||||
from kivymd.theming import ThemableBehavior
|
||||
from kivymd.uix.behaviors import FakeRectangularElevationBehavior
|
||||
from kivymd.uix.boxlayout import MDBoxLayout
|
||||
from kivymd.uix.behaviors import DeclarativeBehavior
|
||||
|
||||
with open(
|
||||
os.path.join(uix_path, "dropdownitem", "dropdownitem.kv"), encoding="utf-8"
|
||||
|
@ -61,15 +61,12 @@ with open(
|
|||
Builder.load_string(kv_file.read())
|
||||
|
||||
|
||||
class _Triangle(ThemableBehavior, Widget):
|
||||
class _Triangle(Widget):
|
||||
pass
|
||||
|
||||
|
||||
class MDDropDownItem(
|
||||
ThemableBehavior,
|
||||
FakeRectangularElevationBehavior,
|
||||
ButtonBehavior,
|
||||
MDBoxLayout,
|
||||
DeclarativeBehavior, ThemableBehavior, ButtonBehavior, BoxLayout
|
||||
):
|
||||
text = StringProperty()
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue