Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #:kivy 2.0.0
- #:import get_color_from_hex kivy.utils.get_color_from_hex
- <TimerCard>
- background_color: 38/255, 38/255, 53/255, 1
- accent_color: 130/255, 135/255, 156/255, 1
- text_color: 243/255, 243/255, 249/255, 1
- size_hint: .8, .2
- pos_hint: {"center_x": .5, "center_y": .3}
- #size: "100dp", "80dp"
- radius: [45]
- canvas.before:
- Color:
- rgba: root.accent_color
- RoundedRectangle:
- size: root.size
- pos: root.pos
- radius: [45]
- Color:
- rgba: root.background_color
- RoundedRectangle:
- size: root.width - 9, root.height - 9
- pos: root.x + 5, root.y + 5
- radius: [45]
- MDRelativeLayout:
- # pos_hint: {"center_x": .5, "center_y": .5}
- MDProgressBar:
- opacity: root.progressbaropacity
- min: 0
- max: root.targettime - 1
- value: root.currenttime
- pos_hint: {"center_x": .5, "center_y": .6}
- size_hint: .9, .5
- Label:
- text: str(int(root.targettime - root.currenttime)) + "s"
- opacity: root.progressbaropacity
- pos_hint: {"center_x": .5, "center_y": .9}
- font_size: 40
- MDFillRoundFlatButton:
- text: "Start"
- on_press: root.start_update()
- opacity: root.startbuttonopacity
- pos_hint: {"center_x": .5, "center_y": .6}
- color: root.accent_color
- MDFillRoundFlatButton:
- id: plusone
- text: "+1"
- pos_hint: {"center_x": .7, "center_y": .2}
- size: "60dp", "30dp"
- on_press: root.change_targettime(1)
- MDFillRoundFlatButton:
- id: plusten
- text: "+10"
- pos_hint: {"center_x": .85, "center_y": .2}
- on_press: root.change_targettime(10)
- MDFillRoundFlatButton:
- id: minusone
- text: "-1"
- pos_hint: {"center_x": .3, "center_y": .2}
- on_press: root.change_targettime(-1)
- MDFillRoundFlatButton:
- id: minusten
- text: "-10"
- pos_hint: {"center_x": .15, "center_y": .2}
- on_press: root.change_targettime(-10)
- rounded_button: True
- MDFillRoundFlatButton:
- text: str(int(root.targettime))
- pos_hint: {"center_x": .5, "center_y": .2}
- MDScreen:
- background_color: 38/255, 38/255, 53/255, 1
- accent_color: 130/255, 135/255, 156/255, 1
- text_color: 243/255, 243/255, 249/255, 1
- canvas.before:
- Color:
- rgba: root.background_color
- Rectangle:
- pos: self.pos
- size: self.size
- ScrollView:
- do_scroll_x: False
- do_scroll_y: True
- MDBoxLayout:
- id: box
- orientation: 'vertical'
- spacing: 15
- size_hint_y: None
- height: self.minimum_height
- Label:
- font_size: 50
- text_color: root.text_color
- text:str(int(app.score))
- #text: if app.score < 10: str(round(float(app.score), 1)) + " points" else: str(app.score)
- pos_hint: {"center_x": .5, "top": .2}
- # line_color: 0, 0, 1, 1
- MDFillRoundFlatIconButton:
- icon: "plus-circle-outline"
- text: "Buy Another Slot"
- size_hint: .8, .05
- pos_hint: {"center_y": .8, "center_x": .5}
- text_color: root.text_color
- md_bg_color: root.background_color
- line_color: 130/255, 135/255, 156/255, 1
- line_width: 2
- icon_color: root.text_color
- set_radius: 45
- on_press: app.make_card()
Advertisement
Add Comment
Please, Sign In to add comment