mirror of
https://github.com/Benexl/FastAnime.git
synced 2025-12-31 23:15:51 -08:00
feat:added download task card to download screen which marks the end of it
This commit is contained in:
28
app/View/DownloadsScreen/components/task_card.kv
Normal file
28
app/View/DownloadsScreen/components/task_card.kv
Normal file
@@ -0,0 +1,28 @@
|
||||
#:import color_text Utility.kivy_markup_helper.color_text
|
||||
|
||||
<TaskText@MDLabel>:
|
||||
adaptive_height:True
|
||||
max_lines:0
|
||||
shorten:False
|
||||
markup:True
|
||||
font_style: "Label"
|
||||
role: "large"
|
||||
bold:True
|
||||
|
||||
|
||||
<TaskCard>:
|
||||
adaptive_height:True
|
||||
radius:8
|
||||
padding:"20dp"
|
||||
md_bg_color:self.theme_cls.surfaceContainerHighColor
|
||||
|
||||
TaskText:
|
||||
size_hint_x:.8
|
||||
text:color_text(root.anime_task_name,root.theme_cls.primaryColor)
|
||||
TaskText:
|
||||
size_hint_x:.2
|
||||
# color:self.theme_cls.surfaceDimColor
|
||||
theme_text_color:"Secondary"
|
||||
text:color_text(root.episodes_to_download,root.theme_cls.secondaryColor)
|
||||
MDIcon:
|
||||
icon:"check-bold"
|
||||
12
app/View/DownloadsScreen/components/task_card.py
Normal file
12
app/View/DownloadsScreen/components/task_card.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from kivy.properties import StringProperty
|
||||
|
||||
from kivymd.uix.boxlayout import MDBoxLayout
|
||||
|
||||
# TODO: add a progress bar to show the individual progress of each task
|
||||
class TaskCard(MDBoxLayout):
|
||||
anime_task_name = StringProperty()
|
||||
episodes_to_download = StringProperty()
|
||||
def __init__(self, anime_title:str, episodes:str, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.anime_task_name = f"{anime_title}"
|
||||
self.episodes_to_download = f"Episodes: {episodes}"
|
||||
Reference in New Issue
Block a user