From 30b74713af6510a1f3775553012566870dba3ee3 Mon Sep 17 00:00:00 2001 From: jordan Date: Fri, 16 Jun 2023 19:56:28 +0200 Subject: [PATCH] GUI slightly changed. --- YT-Downloader.py | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/YT-Downloader.py b/YT-Downloader.py index 260d8d6..00db236 100644 --- a/YT-Downloader.py +++ b/YT-Downloader.py @@ -141,41 +141,49 @@ def download_video(): window = tk.Tk() window.title("YouTube Downloader") +# Set background color +window.configure(bg="#f0f0f0") + # 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_entry = tk.Entry(window, width=50) url_entry.pack() # Format selection checkboxes -format_label = tk.Label(window, text="Format:") +format_label = tk.Label(window, text="Format:", bg="#f0f0f0") format_label.pack() + +format_frame = tk.Frame(window, bg="#f0f0f0") +format_frame.pack() + mp3_var = tk.IntVar() -mp3_checkbox = tk.Checkbutton(window, text=".mp3", variable=mp3_var) -mp3_checkbox.pack() +mp3_checkbox = tk.Checkbutton(format_frame, text=".mp3", variable=mp3_var, bg="#f0f0f0") +mp3_checkbox.pack(side=tk.LEFT) + mp4_var = tk.IntVar() -mp4_checkbox = tk.Checkbutton(window, text=".mp4", variable=mp4_var) -mp4_checkbox.pack() +mp4_checkbox = tk.Checkbutton(format_frame, text=".mp4", variable=mp4_var, bg="#f0f0f0") +mp4_checkbox.pack(side=tk.LEFT) # 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_var = tk.StringVar() quality_var.set("720p") # Default quality quality_dropdown = tk.OptionMenu(window, quality_var, "144p", "240p", "360p", "480p", "720p") +quality_dropdown.config(bg="#f0f0f0") quality_dropdown.pack() - # 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() # 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) # Status label -status_label = tk.Label(window, text="") +status_label = tk.Label(window, text="", bg="#f0f0f0") status_label.pack() # Load directories from config