mirror of
https://github.com/Benexl/FastAnime.git
synced 2025-12-28 21:53:20 -08:00
completed the basic ui and anilist module
This commit is contained in:
0
app/View/MainScreen/__init__.py
Normal file
0
app/View/MainScreen/__init__.py
Normal file
0
app/View/MainScreen/components/__init__.py
Normal file
0
app/View/MainScreen/components/__init__.py
Normal file
96
app/View/MainScreen/main_screen.kv
Normal file
96
app/View/MainScreen/main_screen.kv
Normal file
@@ -0,0 +1,96 @@
|
||||
#:import get_color_from_hex kivy.utils.get_color_from_hex
|
||||
#:import StringProperty kivy.properties.StringProperty
|
||||
|
||||
# custom sets for existing
|
||||
<MDBoxLayout>
|
||||
size_hint: 1,1
|
||||
|
||||
|
||||
# custom components
|
||||
|
||||
<CommonNavigationRailItem@MDNavigationRailItem>
|
||||
icon:""
|
||||
text:""
|
||||
<CommonNavigationRailItem>
|
||||
MDNavigationRailItemIcon:
|
||||
icon:root.icon
|
||||
|
||||
MDNavigationRailItemLabel:
|
||||
text: root.text
|
||||
|
||||
|
||||
<MainScreenView>
|
||||
md_bg_color: self.theme_cls.backgroundColor
|
||||
main_container:main_container
|
||||
MDBoxLayout:
|
||||
MDNavigationRail:
|
||||
anchor:"top"
|
||||
type: "selected"
|
||||
md_bg_color: self.theme_cls.secondaryContainerColor
|
||||
|
||||
MDNavigationRailFabButton:
|
||||
icon: "home-outline"
|
||||
|
||||
CommonNavigationRailItem:
|
||||
icon: "magnify"
|
||||
text: "Search"
|
||||
on_release:
|
||||
# print("r")
|
||||
root.manager_screens.current = "search screen"
|
||||
|
||||
CommonNavigationRailItem:
|
||||
icon: "bookmark-outline"
|
||||
text: "Bookmark"
|
||||
|
||||
CommonNavigationRailItem:
|
||||
icon: "library-outline"
|
||||
text: "Library"
|
||||
|
||||
CommonNavigationRailItem:
|
||||
icon: "cog"
|
||||
text: "settings"
|
||||
|
||||
MDAnchorLayout:
|
||||
anchor_y: 'top'
|
||||
padding:"10dp"
|
||||
MDBoxLayout:
|
||||
orientation: 'vertical'
|
||||
id:p
|
||||
MDBoxLayout:
|
||||
pos_hint: {'center_x': 0.5,'top': 1}
|
||||
padding: "10dp"
|
||||
size_hint_y:None
|
||||
height: self.minimum_height
|
||||
size_hint_x:.75
|
||||
spacing: '20dp'
|
||||
MDTextField:
|
||||
size_hint_x:1
|
||||
MDTextFieldLeadingIcon:
|
||||
icon: "magnify"
|
||||
MDTextFieldHintText:
|
||||
text: "Search for anime"
|
||||
# MDTextFieldTrailingIcon:
|
||||
# icon: "filter"
|
||||
MDIconButton:
|
||||
pos_hint: {'center_y': 0.5}
|
||||
icon: "account-circle"
|
||||
# size: 32,32
|
||||
MDScrollView:
|
||||
# do_scroll_y:True
|
||||
# do_scroll_x:False
|
||||
size_hint:1,1
|
||||
# height:main_container.minimum_height
|
||||
MDBoxLayout:
|
||||
id:main_container
|
||||
padding:"50dp","5dp","50dp","150dp"
|
||||
spacing:"10dp"
|
||||
orientation: 'vertical'
|
||||
size_hint_y:None
|
||||
height:max(self.minimum_height,p.height,1800)
|
||||
adaptive_height:True
|
||||
# MDBoxLayout:
|
||||
# size_hint_y:None
|
||||
# height:self.minimum_height
|
||||
# MDLabel:
|
||||
# text: "By BeneX"
|
||||
|
||||
16
app/View/MainScreen/main_screen.py
Normal file
16
app/View/MainScreen/main_screen.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from kivy.properties import ObjectProperty
|
||||
from View.base_screen import BaseScreenView
|
||||
|
||||
|
||||
class MainScreenView(BaseScreenView):
|
||||
main_container = ObjectProperty()
|
||||
def write_data(self):
|
||||
self.controller.write_data()
|
||||
|
||||
def model_is_changed(self) -> None:
|
||||
"""
|
||||
Called whenever any change has occurred in the data model.
|
||||
The view in this method tracks these changes and updates the UI
|
||||
according to these changes.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user