-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfavorites_bar.kv
65 lines (56 loc) · 1.88 KB
/
favorites_bar.kv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#: import FavoritesBar favorites_bar.FavoritesBar
#: import FavoriteButton favorites_bar.FavoriteButton
#: import AddFavoriteButton favorites_bar.AddFavoriteButton
<FavoritesBar>:
id: favorites_bar_
pos_hint: {'bottom': 0}
size_hint: (1, None)
height: dp(40)
adaptive_width: True
orientation: 'horizontal'
spacing: dp(10)
padding: dp(10), dp(2), dp(0), dp(2)
MDBoxLayout:
id: favorites_
adaptive_width: True
spacing: dp(7)
# MDIconButton:
# # Testing comet animation
# icon: "data/comet.png"
# pos_hint: {'center_x': 0.5, 'center_y': 0.5}
# size_hint: (None, 0.9)
# width: self.height
# rounded_button: True
# line_color: app.theme_cls.bg_light
# line_width: dp(0.5)
# canvas.before:
# Color:
# rgba: 0, 0, 0, 0.2 # Shadow color (adjust opacity as needed)
# Ellipse:
# pos: self.x + dp(2), self.y - dp(2) # Adjust shadow position
# size: self.width, self.height
# Color:
# rgba: 1, 1, 1, 0.5 # Shadow color (adjust opacity as needed)
# Ellipse:
# pos: self.x, self.y # Adjust shadow position
# size: self.width, self.height
AddFavoriteButton:
id: add_btn_
on_release: favorites_bar_.add_favorite()
<AddFavoriteButton>:
icon: 'plus'
style: 'outlined'
size_hint: (None, 0.9)
width: self.height
rounded_button: True
line_color: app.theme_cls.bg_light
line_width: dp(0.5)
_no_ripple_effect: True
<FavoriteButton>:
size_hint: (None, 0.9)
width: self.height
rounded_button: True
line_color: app.theme_cls.bg_light
line_width: dp(0.5)
ripple_duration_in_fast: 0.5
ripple_duration_in_slow: 0.5