GUI slightly changed.

This commit is contained in:
jordan
2023-06-16 19:56:28 +02:00
parent 4f823557bc
commit 30b74713af
+19 -11
View File
@@ -141,41 +141,49 @@ def download_video():
window = tk.Tk() window = tk.Tk()
window.title("YouTube Downloader") window.title("YouTube Downloader")
# Set background color
window.configure(bg="#f0f0f0")
# URL entry field # URL entry field
url_label = tk.Label(window, text="YouTube URL:") url_label = tk.Label(window, text="YouTube URL:", bg="#f0f0f0")
url_label.pack() url_label.pack()
url_entry = tk.Entry(window, width=50) url_entry = tk.Entry(window, width=50)
url_entry.pack() url_entry.pack()
# Format selection checkboxes # Format selection checkboxes
format_label = tk.Label(window, text="Format:") format_label = tk.Label(window, text="Format:", bg="#f0f0f0")
format_label.pack() format_label.pack()
format_frame = tk.Frame(window, bg="#f0f0f0")
format_frame.pack()
mp3_var = tk.IntVar() mp3_var = tk.IntVar()
mp3_checkbox = tk.Checkbutton(window, text=".mp3", variable=mp3_var) mp3_checkbox = tk.Checkbutton(format_frame, text=".mp3", variable=mp3_var, bg="#f0f0f0")
mp3_checkbox.pack() mp3_checkbox.pack(side=tk.LEFT)
mp4_var = tk.IntVar() mp4_var = tk.IntVar()
mp4_checkbox = tk.Checkbutton(window, text=".mp4", variable=mp4_var) mp4_checkbox = tk.Checkbutton(format_frame, text=".mp4", variable=mp4_var, bg="#f0f0f0")
mp4_checkbox.pack() mp4_checkbox.pack(side=tk.LEFT)
# Video quality selection dropdown # Video quality selection dropdown
quality_label = tk.Label(window, text="Video Quality:") quality_label = tk.Label(window, text="Video Quality:", bg="#f0f0f0")
quality_label.pack() quality_label.pack()
quality_var = tk.StringVar() quality_var = tk.StringVar()
quality_var.set("720p") # Default quality quality_var.set("720p") # Default quality
quality_dropdown = tk.OptionMenu(window, quality_var, "144p", "240p", "360p", "480p", "720p") quality_dropdown = tk.OptionMenu(window, quality_var, "144p", "240p", "360p", "480p", "720p")
quality_dropdown.config(bg="#f0f0f0")
quality_dropdown.pack() quality_dropdown.pack()
# Download button # Download button
download_button = tk.Button(window, text="Download", command=download_video) download_button = tk.Button(window, text="Download", command=download_video, bg="#4CAF50", fg="white")
download_button.pack() download_button.pack()
# Settings button # Settings button
settings_button = tk.Button(window, text="⚙️", width=2, command=open_settings) settings_button = tk.Button(window, text="⚙️", width=2, command=open_settings, bg="#f0f0f0")
settings_button.pack(side=tk.RIGHT, padx=10, pady=10) settings_button.pack(side=tk.RIGHT, padx=10, pady=10)
# Status label # Status label
status_label = tk.Label(window, text="") status_label = tk.Label(window, text="", bg="#f0f0f0")
status_label.pack() status_label.pack()
# Load directories from config # Load directories from config