Changeset 8fb44c2 in flowtimer
- Timestamp:
- 08/22/24 00:02:57 (9 months ago)
- Branches:
- guix
- Children:
- 59f6e9a
- Parents:
- 1fd7029
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
flowtimer/main.py
r1fd7029 r8fb44c2 6 6 from PIL import Image, ImageTk 7 7 from pathlib import Path 8 import math9 8 import datetime 10 9 … … 28 27 self.photo = ImageTk.PhotoImage(file=Path(__file__).parent / 29 28 'resources' / 'flowtimer_startbg_new.png') 30 print(self.schedule.current_phase )29 print(self.schedule.current_phase.title) 31 30 self.show_config = self.schedule.current_phase.title 32 31 self.config_state = 'default' 33 print(self.schedule)34 32 35 33 self.build_gui() … … 77 75 style="orange.Horizontal.TProgressbar", 78 76 orient="horizontal", length=600, mode="determinate") 77 self.progressbar["maximum"] = 59 79 78 self.progressbar.pack(side='top') 80 79 … … 104 103 self.label_start.pack_forget() 105 104 current_process = self.after(1000, self.tick) 106 self.currentValue = self.currentValue + 1107 108 105 if self.schedule.state == 'initial': 109 106 self.label_sequence.config(self.start_color(root)) … … 111 108 self.label_duration.config(self.start_color(root)) 112 109 self.label_duration.config(text=("noch " + 113 str(self.schedule.current_phase.ti me_left) +110 str(self.schedule.current_phase.ticks_left // 60) + 114 111 " Min\n")) 115 112 self.schedule.start() … … 117 114 else: 118 115 if self.schedule.running(): 116 self.schedule.tick(1) 117 self.progressbar["value"] = (self.schedule.current_phase.initial_ticks - 118 self.schedule.current_phase.ticks_left) % 60 119 119 self.progressbar.update() 120 120 self.label_sequence.configure(self.start_color(root)) … … 123 123 self.label_duration.config(self.random_color(root)) 124 124 self.label_duration.config(text=("noch " + 125 str( math.ceil(self.schedule.current_phase.time_left))125 str(self.schedule.current_phase.ticks_left // 60) 126 126 + " Min\n"), bg=self.random_color(self.label_duration)) 127 self.label_config_text.config(text=(self.schedule.current_phase.current_phase_number +1,128 "/", self.schedule.current_phase.current_phase_number ),127 self.label_config_text.config(text=(self.schedule.current_phase.current_phase_number()+1, 128 "/", self.schedule.current_phase.current_phase_number()), 129 129 fg='blue',font="Times 48") 130 130 … … 196 196 def progress(self, currentValue): 197 197 self.progressbar["value"] = self.currentValue 198 self.progressbar["maximum"] = 60199 if self.currentValue == 60:200 self.currentValue = 0201 198 202 199 def change_config(self):
Note:
See TracChangeset
for help on using the changeset viewer.