diff --git a/pomodorodiscord/src/frames/settings_frame.py b/pomodorodiscord/src/frames/settings_frame.py index 1fcafeb..676934d 100644 --- a/pomodorodiscord/src/frames/settings_frame.py +++ b/pomodorodiscord/src/frames/settings_frame.py @@ -12,23 +12,15 @@ def __init__(self, master): self.abcycling_var = ctk.IntVar(value=config.get("auto_break_cycling", 0)) self.abcycling_switch = ctk.CTkCheckBox(self, text=" Automatic break cycling", border_width=2, variable=self.abcycling_var, onvalue=1, offvalue=0, command=self.change_abcycling) - self.abcycling_switch.pack(pady=(10, 0)) - - self.sb_before_l_entry = EntryFrame(self, "Short breaks before\nlong break (if auto cycling):", config, "short_breaks_before_long", DEF_SB_BEFORE_L, self.change_sb_before_l) - self.sb_before_l_entry.pack(pady=(10, 0)) + self.abcycling_switch.pack(pady=(10, 5)) + self.sbl_entry = EntryFrame(self, "Short breaks before\nlong break (if auto cycling):", config, "short_breaks_before_long", DEF_SB_BEFORE_L, self.change_sb_before_l) self.pomodoro_entry = EntryFrame(self, "Pomodoro Duration (mins):", config, "pomodoro_time", DEF_POMODORO_MINS, self.change_pomodoro_time) - self.pomodoro_entry.pack(pady=(5, 0)) - self.sb_entry = EntryFrame(self, "Short Break Duration (mins):", config, "short_break_time", DEF_SB_MINS, self.change_sb_time) - self.sb_entry.pack(pady=(5, 0)) - self.lb_entry = EntryFrame(self, "Long Break Duration (mins):", config, "long_break_time", DEF_LB_MINS, self.change_lb_time) - self.lb_entry.pack(pady=(5, 0)) self.theme_label = ctk.CTkLabel(self, text="Select Theme (RESTARTS APP):") self.theme_label.pack(pady=(20, 0)) - self.theme_options = [os.path.splitext(theme)[0] for theme in os.listdir(self.themes_dir) if theme.endswith('.json')] selected = ctk.StringVar(value=config.get('theme', 'Default')) self.theme_menu = ctk.CTkOptionMenu(self, variable=selected, values=self.theme_options, anchor="n", command=self.change_theme) @@ -58,7 +50,7 @@ def change_time(self, entry, config_param): save_config(config) def change_sb_before_l(self): - self.change_time(self.sb_before_l_entry, "short_breaks_before_long") + self.change_time(self.sbl_entry, "short_breaks_before_long") def change_pomodoro_time(self): self.change_time(self.pomodoro_entry, "pomodoro_time") diff --git a/pomodorodiscord/src/reusable/settings_reusable.py b/pomodorodiscord/src/reusable/settings_reusable.py index 906a73b..c1f7413 100644 --- a/pomodorodiscord/src/reusable/settings_reusable.py +++ b/pomodorodiscord/src/reusable/settings_reusable.py @@ -4,6 +4,7 @@ class EntryFrame(ctk.CTkFrame): def __init__(self, master, text, config, config_attr, defvalue, command): super().__init__(master) + self.pack(pady=(5, 0)) self.label = ctk.CTkLabel(self, text=text) self.label.pack(pady=(10, 10), padx=(10, 10))