Skip to content

Commit

Permalink
The great restructuring
Browse files Browse the repository at this point in the history
  • Loading branch information
jake158 committed Mar 7, 2024
1 parent c03f672 commit 5e854f5
Show file tree
Hide file tree
Showing 14 changed files with 368 additions and 352 deletions.
352 changes: 0 additions & 352 deletions main.py

This file was deleted.

45 changes: 45 additions & 0 deletions pomodorodiscord/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import customtkinter as ctk
from src.pomodoro_frame import PomodoroFrame
from src.settings_frame import SettingsFrame
from src.stats_frame import StatsFrame
from src.utils import load_config


class TabView(ctk.CTkTabview):
def __init__(self, master, **kwargs):
super().__init__(master, **kwargs)

self.add("Main")
self.add("Settings")
self.add("Stats")

self.main_frame = PomodoroFrame(self.tab("Main"))
self.main_frame.pack(expand=True, fill='both')

self.settings_frame = SettingsFrame(self.tab("Settings"))
self.settings_frame.pack(expand=True, fill='both')

self.stats_frame = StatsFrame(self.tab("Stats"))
self.stats_frame.pack(expand=True, fill='both')


class PomodoroApp(ctk.CTk):
WIDTH = 350
HEIGHT = 400

def __init__(self):
super().__init__()

self.title("Pomodoro Tracker")
self.geometry(f"{PomodoroApp.WIDTH}x{PomodoroApp.HEIGHT}")

self.tabview = TabView(master=self)
self.tabview.pack(pady=(15, 30), expand=True, fill='y')


if __name__ == "__main__":
config = load_config()
ctk.set_default_color_theme(f"themes/{config['theme']}.json")
ctk.set_appearance_mode("dark")
app = PomodoroApp()
app.mainloop()
File renamed without changes.
Empty file added pomodorodiscord/src/__init__.py
Empty file.
Loading

0 comments on commit 5e854f5

Please sign in to comment.