Feat: Implement user's proposed gui.py changes, add footer, and refine theme JSON files
This commit is contained in:
@@ -11,26 +11,32 @@
|
|||||||
},
|
},
|
||||||
"CTkButton": {
|
"CTkButton": {
|
||||||
"fg_color": ["#21498a", "#21498a"],
|
"fg_color": ["#21498a", "#21498a"],
|
||||||
"hover_color": ["#2a5c9e", "#2a5c9e"]
|
"hover_color": ["#2a5c9e", "#2a5c9e"],
|
||||||
|
"corner_radius": 8
|
||||||
},
|
},
|
||||||
"CTkEntry": {
|
"CTkEntry": {
|
||||||
"fg_color": ["#1e1e1e", "#1e1e1e"],
|
"fg_color": ["#1e1e1e", "#1e1e1e"],
|
||||||
"text_color": ["#ecd7b2", "#ecd7b2"],
|
"text_color": ["#ecd7b2", "#ecd7b2"],
|
||||||
"placeholder_text_color": ["#888888", "#888888"]
|
"placeholder_text_color": ["#888888", "#888888"],
|
||||||
|
"corner_radius": 8,
|
||||||
|
"border_width": 2
|
||||||
},
|
},
|
||||||
"CTkOptionMenu": {
|
"CTkOptionMenu": {
|
||||||
"fg_color": ["#21498a", "#21498a"],
|
"fg_color": ["#21498a", "#21498a"],
|
||||||
"button_color": ["#21498a", "#21498a"],
|
"button_color": ["#21498a", "#21498a"],
|
||||||
"button_hover_color": ["#2a5c9e", "#2a5c9e"],
|
"button_hover_color": ["#2a5c9e", "#2a5c9e"],
|
||||||
"text_color": ["#ecd7b2", "#ecd7b2"]
|
"text_color": ["#ecd7b2", "#ecd7b2"],
|
||||||
|
"corner_radius": 8
|
||||||
},
|
},
|
||||||
"CTkProgressBar": {
|
"CTkProgressBar": {
|
||||||
"fg_color": ["#1e1e1e", "#1e1e1e"],
|
"fg_color": ["#1e1e1e", "#1e1e1e"],
|
||||||
"progress_color": ["#21498a", "#21498a"]
|
"progress_color": ["#21498a", "#21498a"],
|
||||||
|
"corner_radius": 8
|
||||||
},
|
},
|
||||||
"CTkSwitch": {
|
"CTkSwitch": {
|
||||||
"fg_color": ["#1e1e1e", "#1e1e1e"],
|
"fg_color": ["#1e1e1e", "#1e1e1e"],
|
||||||
"progress_color": ["#21498a", "#21498a"],
|
"progress_color": ["#21498a", "#21498a"],
|
||||||
"text_color": ["#ecd7b2", "#ecd7b2"]
|
"text_color": ["#ecd7b2", "#ecd7b2"],
|
||||||
|
"corner_radius": 8
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -11,26 +11,32 @@
|
|||||||
},
|
},
|
||||||
"CTkButton": {
|
"CTkButton": {
|
||||||
"fg_color": ["#4077d1", "#4077d1"],
|
"fg_color": ["#4077d1", "#4077d1"],
|
||||||
"hover_color": ["#5a8ee6", "#5a8ee6"]
|
"hover_color": ["#5a8ee6", "#5a8ee6"],
|
||||||
|
"corner_radius": 8
|
||||||
},
|
},
|
||||||
"CTkEntry": {
|
"CTkEntry": {
|
||||||
"fg_color": ["#ffffff", "#ffffff"],
|
"fg_color": ["#ffffff", "#ffffff"],
|
||||||
"text_color": ["#000000", "#000000"],
|
"text_color": ["#000000", "#000000"],
|
||||||
"placeholder_text_color": ["#888888", "#888888"]
|
"placeholder_text_color": ["#888888", "#888888"],
|
||||||
|
"corner_radius": 8,
|
||||||
|
"border_width": 2
|
||||||
},
|
},
|
||||||
"CTkOptionMenu": {
|
"CTkOptionMenu": {
|
||||||
"fg_color": ["#4077d1", "#4077d1"],
|
"fg_color": ["#4077d1", "#4077d1"],
|
||||||
"button_color": ["#4077d1", "#4077d1"],
|
"button_color": ["#4077d1", "#4077d1"],
|
||||||
"button_hover_color": ["#5a8ee6", "#5a8ee6"],
|
"button_hover_color": ["#5a8ee6", "#5a8ee6"],
|
||||||
"text_color": ["#000000", "#000000"]
|
"text_color": ["#000000", "#000000"],
|
||||||
|
"corner_radius": 8
|
||||||
},
|
},
|
||||||
"CTkProgressBar": {
|
"CTkProgressBar": {
|
||||||
"fg_color": ["#ffffff", "#ffffff"],
|
"fg_color": ["#ffffff", "#ffffff"],
|
||||||
"progress_color": ["#4077d1", "#4077d1"]
|
"progress_color": ["#4077d1", "#4077d1"],
|
||||||
|
"corner_radius": 8
|
||||||
},
|
},
|
||||||
"CTkSwitch": {
|
"CTkSwitch": {
|
||||||
"fg_color": ["#ffffff", "#ffffff"],
|
"fg_color": ["#ffffff", "#ffffff"],
|
||||||
"progress_color": ["#4077d1", "#4077d1"],
|
"progress_color": ["#4077d1", "#4077d1"],
|
||||||
"text_color": ["#000000", "#000000"]
|
"text_color": ["#000000", "#000000"],
|
||||||
|
"corner_radius": 8
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
18
gui.py
18
gui.py
@@ -6,6 +6,7 @@ import sys
|
|||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
import converter
|
import converter
|
||||||
|
import webbrowser
|
||||||
import downloader
|
import downloader
|
||||||
import utils
|
import utils
|
||||||
import config
|
import config
|
||||||
@@ -22,6 +23,20 @@ class VideoConverterGUI:
|
|||||||
customtkinter.set_appearance_mode("Dark") # Modes: "System", "Dark", "Light"
|
customtkinter.set_appearance_mode("Dark") # Modes: "System", "Dark", "Light"
|
||||||
customtkinter.set_default_color_theme(os.path.join(os.path.dirname(__file__), "custom_theme_dark.json"))
|
customtkinter.set_default_color_theme(os.path.join(os.path.dirname(__file__), "custom_theme_dark.json"))
|
||||||
|
|
||||||
|
# --- Footer Frame ---
|
||||||
|
self.footer_frame = customtkinter.CTkFrame(master, fg_color="transparent")
|
||||||
|
self.footer_frame.pack(side="bottom", fill="x", padx=10, pady=(5, 10))
|
||||||
|
|
||||||
|
self.nickname_label = customtkinter.CTkLabel(self.footer_frame, text="by ramforth")
|
||||||
|
self.nickname_label.pack(side="left", padx=(10, 0))
|
||||||
|
|
||||||
|
self.gitea_link = customtkinter.CTkLabel(self.footer_frame, text="https://gitea.ramforth.net/ramforth", text_color="#4077d1", cursor="hand2")
|
||||||
|
self.gitea_link.pack(side="right", padx=(0, 10))
|
||||||
|
self.gitea_link.bind("<Button-1>", lambda e: self.open_link("https://gitea.ramforth.net/ramforth"))
|
||||||
|
# Add underline font
|
||||||
|
underline_font = customtkinter.CTkFont(family="sans-serif", size=12, underline=True)
|
||||||
|
self.gitea_link.configure(font=underline_font)
|
||||||
|
|
||||||
# --- Pack bottom elements first ---
|
# --- Pack bottom elements first ---
|
||||||
# This makes them stick to the bottom
|
# This makes them stick to the bottom
|
||||||
self.status_var = customtkinter.StringVar(value="Ready") # Give it a default value
|
self.status_var = customtkinter.StringVar(value="Ready") # Give it a default value
|
||||||
@@ -87,6 +102,9 @@ class VideoConverterGUI:
|
|||||||
self.cancel_button = customtkinter.CTkButton(master, text="Cancel", command=self.cancel_conversion, state="disabled")
|
self.cancel_button = customtkinter.CTkButton(master, text="Cancel", command=self.cancel_conversion, state="disabled")
|
||||||
self.cancel_button.pack(pady=5)
|
self.cancel_button.pack(pady=5)
|
||||||
|
|
||||||
|
def open_link(self, url):
|
||||||
|
"""Opens the given URL in a web browser."""
|
||||||
|
webbrowser.open_new(url)
|
||||||
|
|
||||||
def toggle_mode(self):
|
def toggle_mode(self):
|
||||||
# Check if the switch is on (1) or off (0)
|
# Check if the switch is on (1) or off (0)
|
||||||
|
|||||||
Reference in New Issue
Block a user