From 1da62ef4141ebf04e3aa76f5559bdb2e70b20ca8 Mon Sep 17 00:00:00 2001 From: KeksNino Date: Fri, 30 Jan 2026 10:43:43 +0100 Subject: [PATCH] feat: browse directories to select download_path and image_path --- core/interface/dialogs/settings.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/core/interface/dialogs/settings.py b/core/interface/dialogs/settings.py index 1049ae6..24bb5a9 100644 --- a/core/interface/dialogs/settings.py +++ b/core/interface/dialogs/settings.py @@ -12,7 +12,8 @@ from PySide6.QtWidgets import ( QHBoxLayout, QSpinBox, QCheckBox, - ) + QFileDialog, +) import platform @@ -114,6 +115,15 @@ def settings_dialog(self): download_path.setText(state.download_path) dialog.layout().addWidget(download_path_container) + def browse_download_path(): + dir_path = QFileDialog.getExistingDirectory(dialog, "Select Download Directory", state.download_path) + if dir_path: + download_path.setText(dir_path) + + browse_button = QPushButton("📁") + download_path_layout.addWidget(browse_button) + browse_button.clicked.connect(browse_download_path) + ################## # SPEED LIMITING # ################## @@ -147,6 +157,15 @@ def settings_dialog(self): image_path.setText(state.image_path) dialog.layout().addWidget(image_path_container) + def browse_image_path(): + file_path = QFileDialog.getOpenFileName(dialog, "Select Image File", state.image_path, "Image Files (*.png *.jpg)")[0] + if file_path: + image_path.setText(file_path) + + browse_button = QPushButton("📁") + image_path_layout.addWidget(browse_button) + browse_button.clicked.connect(browse_image_path) + ############### # SAVE/CANCEL # ###############