diff --git a/CHANGELOG.md b/CHANGELOG.md index b1a63b1..77e84cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,19 +1,25 @@ # Changelog -## 0.15.0: Preview Image Resizing Update +## 1.0: Final Polish (06.03.25) +- Fixed a bug where the GPS field being empty but selected caused issues. +- EXIF insertion is now canceled if any image in the folder does not end with a number. +- Minor GUI adjustments for a more polished experience. +- Disabled preview adjustment controls until an image is loaded to prevent errors. + +## 0.15.0: Preview Image Resizing Update (12.02.25) - Added the ability to change the preview image size dynamically. - Previously, the image was processed and displayed at its original size, causing lag or unresponsiveness when adjusting the slider. - Reducing the processed image size should help improve performance. - Default preview image size is now **25%**, but users can adjust it between **10% and 100%**. ## 0.14.x -### 0.14.1: Patch changelog +### 0.14.1: Patch changelog (12.02.25) - Updated the changelog to include missing entries. -### 0.14.0: Code refactor (by Mr. Finch) +### 0.14.0: Code refactor (by Mr. Finch) (11.02.25) - Introduced constants and optimized the code. -## 0.13.x +## 0.13.x (11.02.25) ### 0.13.1: Fixed image processing - Fixed a bug that made it impossible to process images. @@ -21,28 +27,28 @@ - Added a requirements file. ## 0.12.x -### 0.12.6: Disabled app restart on Windows +### 0.12.6: Disabled app restart on Windows (11.02.25) - The app can not restart properly on Windows, so the restart button has been hidden when the OS is `nt`. - Also updated tool tip to indicate that changing theme requeres are restart. -### 0.12.5: Fixed EXIF File Generation Bug +### 0.12.5: Fixed EXIF File Generation Bug (10.02.25) - Fixed a bug where the application failed to generate a new default EXIF file if none was available. Now, the file is correctly created when missing. -### 0.12.4: Updated README +### 0.12.4: Updated README (10.02.25) - The README file (project description) now includes updates description and screenshots. -### 0.12.3: UI Adjustments +### 0.12.3: UI Adjustments (10.02.25) - Minor changes to maintain a unified layout across all windows. - Added option to sync app theme with OS (if supported). - Set auto theme as the default value. -### 0.12.2: Minor UI Improvements for Theme Compatibility +### 0.12.2: Minor UI Improvements for Theme Compatibility (10.02.25) - Fixed text clipping issues when using the new theme options. -### 0.12.1: Removed Unnecessary Debug Prints +### 0.12.1: Removed Unnecessary Debug Prints (09.02.25) - Removed leftover debug statements. -### 0.12.0: New Settings Menu & Patches +### 0.12.0: New Settings Menu & Patches (09.02.25) - **New Settings Window:** - The updater window has been reworked into a settings window. - **Initial settings (first tab) include:** @@ -57,7 +63,7 @@ - Minor changes to `utility.py` to handle settings. --- -## 0.11.x +## 0.11.x (05.02.25) ### 0.11.1: Fixed pipeline - Fixed pipeline publish error @@ -69,7 +75,7 @@ --- -## 0.10.x +## 0.10.x (04.02.25) ### 0.10.1: Fixed Updater - Fixed an issue where the updater was permanently disabled. diff --git a/README.md b/README.md index 89a6160..5726bfa 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # **OptimaLab35** -_Last updated: 10 Feb 2025 (v.0.12.3)_ +Last updated: 06 Mar 2025 (v.1.0.0) ## **Overview** @@ -10,12 +10,8 @@ It serves as a GUI for the [OPTIMA35 library](https://gitlab.com/CodeByMrFinchum --- ## **Current Status** -### **Early Development** -OptimaLab35 is actively developed using **PySide6** and **Qt**, providing a modern interface for **OPTIMA35**. - -The program is still in its early stages, and features may change drastically over time. Some features might be added but later removed if they don't prove useful. Expect significant changes to the UI and functionality between updates. - -For the most accurate and detailed update information, please refer to the [**CHANGELOG**](https://gitlab.com/CodeByMrFinchum/OptimaLab35/-/blob/main/CHANGELOG.md) as the readme might lack behind. +The program has reached a stable release. All functions have been tested, and there should be **no** bugs. +While there is always room for additional features and optimizations, the core functionality is complete and reliable. --- @@ -53,8 +49,9 @@ pip install OptimaLab35 --- -## Preview GUI **0.12.2** -**PREVIEW** might be out of date. +## GUI Preview +The layout remains consistent with v1.0.0. +The UI is OS-dependent, but a custom theme can be enabled in the settings. **Main tab** @@ -83,10 +80,14 @@ pip install OptimaLab35 --- -# Use of LLMs +# Contribution + +Thanks to developer [Mr Finch](https://gitlab.com/MrFinchMkV) for contributing to this project. + +## Use of LLMs In the interest of transparency, I disclose that Generative AI (GAI) large language models (LLMs), including OpenAI’s ChatGPT and Ollama models (e.g., OpenCoder and Qwen2.5-coder), have been used to assist in this project. -## Areas of Assistance: +### Areas of Assistance: - Project discussions and planning - Spelling and grammar corrections - Suggestions for suitable packages and libraries @@ -98,7 +99,7 @@ In cases where LLMs contribute directly to code or provide substantial optimizat - mradermacher gguf Q4K-M Instruct version of infly/OpenCoder-1.5B - unsloth gguf Q4K_M Instruct version of both Qwen/QWEN2 1.5B and 3B -### References +#### References 1. **Huang, Siming, et al.** *OpenCoder: The Open Cookbook for Top-Tier Code Large Language Models.* 2024. [PDF](https://arxiv.org/pdf/2411.04905) diff --git a/media/previewwindow_dark.png b/media/previewwindow_dark.png index ff4b610..618340c 100644 Binary files a/media/previewwindow_dark.png and b/media/previewwindow_dark.png differ diff --git a/media/previewwindow_light.png b/media/previewwindow_light.png index a9d2da9..aaf3d4d 100644 Binary files a/media/previewwindow_light.png and b/media/previewwindow_light.png differ diff --git a/pip_README.md b/pip_README.md index f36b255..7b3f576 100644 --- a/pip_README.md +++ b/pip_README.md @@ -1,4 +1,9 @@ -OptimaLab35 is in active development, and even *stable* versions may produce errors in unexpected situations. It is a GUI for optima35. -Please visit [OptimaLab35](https://gitlab.com/CodeByMrFinchum/OptimaLab35/-/blob/main/media/exif_editor.png?ref_type=heads) gitlab page for more information. +**[OptimaLab35](https://gitlab.com/CodeByMrFinchum/OptimaLab35)** is a graphical interface for the [OPTIMA35 library](https://gitlab.com/CodeByMrFinchum/optima35), designed for efficient image and metadata management. -Uses [optima35](https://gitlab.com/CodeByMrFinchum/optima35) to modify images. +### **Features** +- Resize, adjust brightness/contrast, and convert images to grayscale +- Add customizable text-based watermarks +- Manage EXIF data: add, copy, remove, and adjust timestamps +- Preview image adjustments in real time +- Theme selection (light, dark, auto) +- Automatic updates via PyPI diff --git a/src/OptimaLab35/gui.py b/src/OptimaLab35/gui.py index 187a8c1..a69a452 100644 --- a/src/OptimaLab35/gui.py +++ b/src/OptimaLab35/gui.py @@ -343,6 +343,14 @@ class OptimaLab35(QMainWindow, Ui_MainWindow): # Start worker in thread pool ChatGPT self.thread_pool.start(worker) + def control_ending(self, name_lst): + for item in name_lst: + try: + int(item[-1]) + except ValueError: + return False + return True + def insert_exif(self, image_files): input_folder = self.settings["input_folder"] @@ -374,6 +382,11 @@ class OptimaLab35(QMainWindow, Ui_MainWindow): return image_list = self.image_list_from_folder(self.settings["input_folder"]) + if not self.control_ending(image_list): + QMessageBox.warning(self, "Warning", f"Error: one or more filenames do not end on a number.\nCan not adjust time") + self.toggle_buttons(True) + return + self.insert_exif(image_list) self.toggle_buttons(True) @@ -410,7 +423,7 @@ class OptimaLab35(QMainWindow, Ui_MainWindow): user_data["user_comment"] = self.ui.user_comment_comboBox.currentText() user_data["artist"] = self.ui.artist_comboBox.currentText() user_data["copyright_info"] = self.ui.copyright_info_comboBox.currentText() - user_data["software"] = f"{self.name} (v{self.version}) with {self.o.name} (v{self.o.version})" + user_data["software"] = f"{self.name} {self.version} with {self.o.name} {self.o.version}" return user_data def get_selected_exif(self): @@ -420,7 +433,10 @@ class OptimaLab35(QMainWindow, Ui_MainWindow): if self.ui.add_date_checkBox.isChecked(): selected_exif["date_time_original"] = self.get_date() if self.ui.gps_checkBox.isChecked(): - self.settings["gps"] = [float(self.ui.lat_lineEdit.text()), float(self.ui.long_lineEdit.text())] + try: + self.settings["gps"] = [float(self.ui.lat_lineEdit.text()), float(self.ui.long_lineEdit.text())] + except ValueError as e: + self.settings["gps"] = "Wrong gps data" else: self.settings["gps"] = None return selected_exif @@ -460,6 +476,9 @@ class OptimaLab35(QMainWindow, Ui_MainWindow): self.settings["own_date"] = self.get_checkbox_value(self.ui.add_date_checkBox) if self.settings["own_exif"]: self.settings["user_selected_exif"] = self.get_selected_exif() + if self.settings["gps"] is not None: + if len(self.settings["gps"]) != 2: + return self.settings["gps"] else: self.settings["user_selected_exif"] = None self.settings["gps"] = None @@ -841,6 +860,7 @@ class PreviewWindow(QMainWindow, Ui_Preview_Window): self.ui.contrast_spinBox.valueChanged.connect(self.on_ui_change) self.ui.contrast_Slider.valueChanged.connect(self.on_ui_change) self.ui.grayscale_checkBox.stateChanged.connect(self.on_ui_change) + self.ui_elements(False) def on_ui_change(self): """Triggers update only if live update is enabled.""" @@ -852,6 +872,13 @@ class PreviewWindow(QMainWindow, Ui_Preview_Window): if file[0]: self.ui.image_path_lineEdit.setText(file[0]) self.update_preview() + self.ui_elements(True) + + def ui_elements(self, state): + + self.ui.groupBox_2.setEnabled(state) + self.ui.groupBox.setEnabled(state) + self.ui.groupBox_5.setEnabled(state) def update_preview(self): """Handles loading and displaying the image in a separate thread.""" diff --git a/src/OptimaLab35/ui/main_window.py b/src/OptimaLab35/ui/main_window.py index 524d151..0db0bd8 100644 --- a/src/OptimaLab35/ui/main_window.py +++ b/src/OptimaLab35/ui/main_window.py @@ -27,10 +27,10 @@ class Ui_MainWindow(object): def setupUi(self, MainWindow): if not MainWindow.objectName(): MainWindow.setObjectName(u"MainWindow") - MainWindow.setWindowModality(Qt.NonModal) - MainWindow.resize(440, 756) + MainWindow.setWindowModality(Qt.WindowModality.NonModal) + MainWindow.resize(450, 720) MainWindow.setMinimumSize(QSize(350, 677)) - MainWindow.setMaximumSize(QSize(1000, 1000)) + MainWindow.setMaximumSize(QSize(450, 1000)) self.actionInfo = QAction(MainWindow) self.actionInfo.setObjectName(u"actionInfo") self.actionPreview = QAction(MainWindow) @@ -45,7 +45,7 @@ class Ui_MainWindow(object): self.gridLayout.setObjectName(u"gridLayout") self.tabWidget = QTabWidget(self.centralwidget) self.tabWidget.setObjectName(u"tabWidget") - self.tabWidget.setMaximumSize(QSize(500, 16777215)) + self.tabWidget.setMaximumSize(QSize(420, 16777215)) self.tab_1 = QWidget() self.tab_1.setObjectName(u"tab_1") self.verticalLayout_10 = QVBoxLayout(self.tab_1) @@ -115,7 +115,7 @@ class Ui_MainWindow(object): self.png_quality_Slider.setMaximum(9) self.png_quality_Slider.setPageStep(1) self.png_quality_Slider.setSliderPosition(6) - self.png_quality_Slider.setOrientation(Qt.Horizontal) + self.png_quality_Slider.setOrientation(Qt.Orientation.Horizontal) self.gridLayout_4.addWidget(self.png_quality_Slider, 4, 2, 1, 1) @@ -146,7 +146,7 @@ class Ui_MainWindow(object): self.jpg_quality_Slider.setMinimum(1) self.jpg_quality_Slider.setMaximum(100) self.jpg_quality_Slider.setSliderPosition(90) - self.jpg_quality_Slider.setOrientation(Qt.Horizontal) + self.jpg_quality_Slider.setOrientation(Qt.Orientation.Horizontal) self.gridLayout_4.addWidget(self.jpg_quality_Slider, 3, 2, 1, 1) @@ -160,7 +160,7 @@ class Ui_MainWindow(object): self.resize_Slider.setMinimum(1) self.resize_Slider.setMaximum(200) self.resize_Slider.setValue(100) - self.resize_Slider.setOrientation(Qt.Horizontal) + self.resize_Slider.setOrientation(Qt.Orientation.Horizontal) self.gridLayout_4.addWidget(self.resize_Slider, 5, 2, 1, 1) @@ -192,7 +192,7 @@ class Ui_MainWindow(object): self.brightness_horizontalSlider.setObjectName(u"brightness_horizontalSlider") self.brightness_horizontalSlider.setMinimum(-100) self.brightness_horizontalSlider.setMaximum(100) - self.brightness_horizontalSlider.setOrientation(Qt.Horizontal) + self.brightness_horizontalSlider.setOrientation(Qt.Orientation.Horizontal) self.gridLayout_3.addWidget(self.brightness_horizontalSlider, 1, 1, 1, 1) @@ -223,7 +223,7 @@ class Ui_MainWindow(object): self.contrast_horizontalSlider.setObjectName(u"contrast_horizontalSlider") self.contrast_horizontalSlider.setMinimum(-100) self.contrast_horizontalSlider.setMaximum(100) - self.contrast_horizontalSlider.setOrientation(Qt.Horizontal) + self.contrast_horizontalSlider.setOrientation(Qt.Orientation.Horizontal) self.gridLayout_3.addWidget(self.contrast_horizontalSlider, 4, 1, 1, 1) @@ -243,6 +243,7 @@ class Ui_MainWindow(object): self.groupBox_3 = QGroupBox(self.tab_1) self.groupBox_3.setObjectName(u"groupBox_3") self.groupBox_3.setEnabled(True) + self.groupBox_3.setMaximumSize(QSize(400, 16777215)) self.groupBox_3.setFlat(False) self.groupBox_3.setCheckable(False) self.groupBox_3.setChecked(False) @@ -537,7 +538,7 @@ class Ui_MainWindow(object): self.dateEdit = QDateEdit(self.date_groupBox) self.dateEdit.setObjectName(u"dateEdit") self.dateEdit.setEnabled(False) - self.dateEdit.setDateTime(QDateTime(QDate(2025, 1, 1), QTime(0, 0, 0))) + self.dateEdit.setDateTime(QDateTime(QDate(2024, 12, 31), QTime(23, 0, 0))) self.dateEdit.setMaximumDate(QDate(2038, 12, 31)) self.dateEdit.setMinimumDate(QDate(1970, 1, 1)) self.dateEdit.setCalendarPopup(True) @@ -557,7 +558,7 @@ class Ui_MainWindow(object): MainWindow.setStatusBar(self.statusBar) self.menuBar = QMenuBar(MainWindow) self.menuBar.setObjectName(u"menuBar") - self.menuBar.setGeometry(QRect(0, 0, 440, 27)) + self.menuBar.setGeometry(QRect(0, 0, 450, 22)) self.menuHelp = QMenu(self.menuBar) self.menuHelp.setObjectName(u"menuHelp") self.menuSettings = QMenu(self.menuBar) diff --git a/src/OptimaLab35/ui/main_window.ui b/src/OptimaLab35/ui/main_window.ui index 54f6e9f..4da4787 100644 --- a/src/OptimaLab35/ui/main_window.ui +++ b/src/OptimaLab35/ui/main_window.ui @@ -3,14 +3,14 @@ MainWindow - Qt::NonModal + Qt::WindowModality::NonModal 0 0 - 440 - 756 + 450 + 720 @@ -21,7 +21,7 @@ - 1000 + 450 1000 @@ -34,7 +34,7 @@ - 500 + 420 16777215 @@ -186,7 +186,7 @@ 6 - Qt::Horizontal + Qt::Orientation::Horizontal @@ -247,7 +247,7 @@ 90 - Qt::Horizontal + Qt::Orientation::Horizontal @@ -276,7 +276,7 @@ 100 - Qt::Horizontal + Qt::Orientation::Horizontal @@ -336,7 +336,7 @@ 100 - Qt::Horizontal + Qt::Orientation::Horizontal @@ -388,7 +388,7 @@ 100 - Qt::Horizontal + Qt::Orientation::Horizontal @@ -420,6 +420,12 @@ true + + + 400 + 16777215 + + Watermarking @@ -875,12 +881,12 @@ - 0 + 23 0 0 - 2025 - 1 - 1 + 2024 + 12 + 31 @@ -917,8 +923,8 @@ 0 0 - 440 - 27 + 450 + 22 diff --git a/src/OptimaLab35/ui/preview_window.py b/src/OptimaLab35/ui/preview_window.py index b210144..daa32c8 100644 --- a/src/OptimaLab35/ui/preview_window.py +++ b/src/OptimaLab35/ui/preview_window.py @@ -34,7 +34,7 @@ class Ui_Preview_Window(object): self.QLabel = QLabel(self.centralwidget) self.QLabel.setObjectName(u"QLabel") self.QLabel.setMinimumSize(QSize(628, 628)) - self.QLabel.setFrameShape(QFrame.Box) + self.QLabel.setFrameShape(QFrame.Shape.Box) self.QLabel.setScaledContents(False) self.horizontalLayout.addWidget(self.QLabel) @@ -42,7 +42,7 @@ class Ui_Preview_Window(object): self.widget = QWidget(self.centralwidget) self.widget.setObjectName(u"widget") self.widget.setMinimumSize(QSize(160, 628)) - self.widget.setMaximumSize(QSize(150, 16777215)) + self.widget.setMaximumSize(QSize(180, 16777215)) self.verticalLayout_4 = QVBoxLayout(self.widget) self.verticalLayout_4.setObjectName(u"verticalLayout_4") self.groupBox_3 = QGroupBox(self.widget) @@ -77,7 +77,7 @@ class Ui_Preview_Window(object): self.brightness_Slider.setObjectName(u"brightness_Slider") self.brightness_Slider.setMinimum(-100) self.brightness_Slider.setMaximum(100) - self.brightness_Slider.setOrientation(Qt.Horizontal) + self.brightness_Slider.setOrientation(Qt.Orientation.Horizontal) self.verticalLayout.addWidget(self.brightness_Slider) @@ -104,7 +104,7 @@ class Ui_Preview_Window(object): self.contrast_Slider.setObjectName(u"contrast_Slider") self.contrast_Slider.setMinimum(-100) self.contrast_Slider.setMaximum(100) - self.contrast_Slider.setOrientation(Qt.Horizontal) + self.contrast_Slider.setOrientation(Qt.Orientation.Horizontal) self.verticalLayout_2.addWidget(self.contrast_Slider) @@ -134,26 +134,37 @@ class Ui_Preview_Window(object): self.groupBox_4 = QGroupBox(self.widget) self.groupBox_4.setObjectName(u"groupBox_4") + self.groupBox_4.setMaximumSize(QSize(170, 16777215)) self.gridLayout_2 = QGridLayout(self.groupBox_4) self.gridLayout_2.setObjectName(u"gridLayout_2") + self.checkBox = QCheckBox(self.groupBox_4) + self.checkBox.setObjectName(u"checkBox") + self.checkBox.setLayoutDirection(Qt.LayoutDirection.LeftToRight) + self.checkBox.setChecked(True) + + self.gridLayout_2.addWidget(self.checkBox, 3, 0, 1, 2) + + self.close_Button = QPushButton(self.groupBox_4) + self.close_Button.setObjectName(u"close_Button") + + self.gridLayout_2.addWidget(self.close_Button, 4, 0, 1, 2) + self.live_update = QCheckBox(self.groupBox_4) self.live_update.setObjectName(u"live_update") + font = QFont() + font.setPointSize(11) + self.live_update.setFont(font) self.live_update.setChecked(True) self.gridLayout_2.addWidget(self.live_update, 0, 0, 1, 1) - self.scale_label = QLabel(self.groupBox_4) - self.scale_label.setObjectName(u"scale_label") - - self.gridLayout_2.addWidget(self.scale_label, 0, 1, 1, 1) - self.scale_Slider = QSlider(self.groupBox_4) self.scale_Slider.setObjectName(u"scale_Slider") self.scale_Slider.setMinimum(10) self.scale_Slider.setMaximum(100) self.scale_Slider.setPageStep(10) self.scale_Slider.setValue(25) - self.scale_Slider.setOrientation(Qt.Horizontal) + self.scale_Slider.setOrientation(Qt.Orientation.Horizontal) self.gridLayout_2.addWidget(self.scale_Slider, 1, 0, 1, 2) @@ -164,17 +175,13 @@ class Ui_Preview_Window(object): self.gridLayout_2.addWidget(self.update_Button, 2, 0, 1, 2) - self.checkBox = QCheckBox(self.groupBox_4) - self.checkBox.setObjectName(u"checkBox") - self.checkBox.setLayoutDirection(Qt.LeftToRight) - self.checkBox.setChecked(True) + self.scale_label = QLabel(self.groupBox_4) + self.scale_label.setObjectName(u"scale_label") + font1 = QFont() + font1.setPointSize(9) + self.scale_label.setFont(font1) - self.gridLayout_2.addWidget(self.checkBox, 3, 0, 1, 2) - - self.close_Button = QPushButton(self.groupBox_4) - self.close_Button.setObjectName(u"close_Button") - - self.gridLayout_2.addWidget(self.close_Button, 4, 0, 1, 2) + self.gridLayout_2.addWidget(self.scale_label, 0, 1, 1, 1) self.verticalLayout_4.addWidget(self.groupBox_4) @@ -185,7 +192,7 @@ class Ui_Preview_Window(object): Preview_Window.setCentralWidget(self.centralwidget) self.menubar = QMenuBar(Preview_Window) self.menubar.setObjectName(u"menubar") - self.menubar.setGeometry(QRect(0, 0, 875, 22)) + self.menubar.setGeometry(QRect(0, 0, 875, 26)) Preview_Window.setMenuBar(self.menubar) self.retranslateUi(Preview_Window) @@ -222,23 +229,8 @@ class Ui_Preview_Window(object): #if QT_CONFIG(tooltip) self.grayscale_checkBox.setToolTip(QCoreApplication.translate("Preview_Window", u"Convert the image to grayscale (black and white).", None)) #endif // QT_CONFIG(tooltip) - self.grayscale_checkBox.setText(QCoreApplication.translate("Preview_Window", u"Black n White", None)) + self.grayscale_checkBox.setText(QCoreApplication.translate("Preview_Window", u"Black and White", None)) self.groupBox_4.setTitle(QCoreApplication.translate("Preview_Window", u"Behavior", None)) -#if QT_CONFIG(tooltip) - self.live_update.setToolTip(QCoreApplication.translate("Preview_Window", u"Live update applies changes instantly. If the app becomes unresponsive or lags, disable this option.", None)) -#endif // QT_CONFIG(tooltip) - self.live_update.setText(QCoreApplication.translate("Preview_Window", u"Live refresh", None)) -#if QT_CONFIG(tooltip) - self.scale_label.setToolTip(QCoreApplication.translate("Preview_Window", u"Sets the resize value for the preview image. A high value may cause the application to freeze.", None)) -#endif // QT_CONFIG(tooltip) - self.scale_label.setText(QCoreApplication.translate("Preview_Window", u"25", None)) -#if QT_CONFIG(tooltip) - self.scale_Slider.setToolTip(QCoreApplication.translate("Preview_Window", u"Sets the resize value for the preview image. A high value may cause the application to freeze.", None)) -#endif // QT_CONFIG(tooltip) -#if QT_CONFIG(tooltip) - self.update_Button.setToolTip(QCoreApplication.translate("Preview_Window", u"Apply Changes to Preview", None)) -#endif // QT_CONFIG(tooltip) - self.update_Button.setText(QCoreApplication.translate("Preview_Window", u"Refresh image", None)) #if QT_CONFIG(tooltip) self.checkBox.setToolTip(QCoreApplication.translate("Preview_Window", u"Enable to copy adjustments to the main window upon closing", None)) #endif // QT_CONFIG(tooltip) @@ -247,5 +239,20 @@ class Ui_Preview_Window(object): self.close_Button.setToolTip("") #endif // QT_CONFIG(tooltip) self.close_Button.setText(QCoreApplication.translate("Preview_Window", u"Close", None)) +#if QT_CONFIG(tooltip) + self.live_update.setToolTip(QCoreApplication.translate("Preview_Window", u"Live update applies changes instantly. If the app becomes unresponsive or lags, disable this option.", None)) +#endif // QT_CONFIG(tooltip) + self.live_update.setText(QCoreApplication.translate("Preview_Window", u"Live refresh", None)) +#if QT_CONFIG(tooltip) + self.scale_Slider.setToolTip(QCoreApplication.translate("Preview_Window", u"Sets the resize value for the preview image. A high value may cause the application to freeze.", None)) +#endif // QT_CONFIG(tooltip) +#if QT_CONFIG(tooltip) + self.update_Button.setToolTip(QCoreApplication.translate("Preview_Window", u"Apply Changes to Preview", None)) +#endif // QT_CONFIG(tooltip) + self.update_Button.setText(QCoreApplication.translate("Preview_Window", u"Refresh image", None)) +#if QT_CONFIG(tooltip) + self.scale_label.setToolTip(QCoreApplication.translate("Preview_Window", u"Sets the resize value for the preview image. A high value may cause the application to freeze.", None)) +#endif // QT_CONFIG(tooltip) + self.scale_label.setText(QCoreApplication.translate("Preview_Window", u"25", None)) # retranslateUi diff --git a/src/OptimaLab35/ui/preview_window.ui b/src/OptimaLab35/ui/preview_window.ui index 3408bd7..38a1cc0 100644 --- a/src/OptimaLab35/ui/preview_window.ui +++ b/src/OptimaLab35/ui/preview_window.ui @@ -30,7 +30,7 @@ - QFrame::Box + QFrame::Shape::Box @@ -50,7 +50,7 @@ - 150 + 180 16777215 @@ -106,7 +106,7 @@ 100 - Qt::Horizontal + Qt::Orientation::Horizontal @@ -148,7 +148,7 @@ 100 - Qt::Horizontal + Qt::Orientation::Horizontal @@ -177,7 +177,7 @@ Convert the image to grayscale (black and white). - Black n White + Black and White @@ -187,7 +187,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -199,12 +199,49 @@ + + + 170 + 16777215 + + Behavior + + + + Enable to copy adjustments to the main window upon closing + + + Qt::LayoutDirection::LeftToRight + + + Copy Values + + + true + + + + + + + + + + Close + + + + + + 11 + + Live update applies changes instantly. If the app becomes unresponsive or lags, disable this option. @@ -216,16 +253,6 @@ - - - - Sets the resize value for the preview image. A high value may cause the application to freeze. - - - 25 - - - @@ -244,7 +271,7 @@ 25 - Qt::Horizontal + Qt::Orientation::Horizontal @@ -264,29 +291,18 @@ - - - - Enable to copy adjustments to the main window upon closing + + + + + 9 + - - Qt::LeftToRight + + Sets the resize value for the preview image. A high value may cause the application to freeze. - Copy Values - - - true - - - - - - - - - - Close + 25 @@ -304,7 +320,7 @@ 0 0 875 - 22 + 26 diff --git a/src/OptimaLab35/ui/settings_window.py b/src/OptimaLab35/ui/settings_window.py index 8de257b..1841a94 100644 --- a/src/OptimaLab35/ui/settings_window.py +++ b/src/OptimaLab35/ui/settings_window.py @@ -27,13 +27,15 @@ class Ui_Settings_Window(object): Settings_Window.setEnabled(True) Settings_Window.resize(400, 325) Settings_Window.setMinimumSize(QSize(400, 300)) - Settings_Window.setMaximumSize(QSize(500, 500)) + Settings_Window.setMaximumSize(QSize(450, 350)) self.centralwidget = QWidget(Settings_Window) self.centralwidget.setObjectName(u"centralwidget") + self.centralwidget.setMaximumSize(QSize(500, 500)) self.verticalLayout = QVBoxLayout(self.centralwidget) self.verticalLayout.setObjectName(u"verticalLayout") self.tabWidget = QTabWidget(self.centralwidget) self.tabWidget.setObjectName(u"tabWidget") + self.tabWidget.setMaximumSize(QSize(500, 500)) self.tabWidgetPage1 = QWidget() self.tabWidgetPage1.setObjectName(u"tabWidgetPage1") self.verticalLayout_2 = QVBoxLayout(self.tabWidgetPage1) @@ -117,13 +119,13 @@ class Ui_Settings_Window(object): self.gridLayout.setObjectName(u"gridLayout") self.label_optima35_latestversion = QLabel(self.pkg_info_groupBox) self.label_optima35_latestversion.setObjectName(u"label_optima35_latestversion") - self.label_optima35_latestversion.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter) + self.label_optima35_latestversion.setAlignment(Qt.AlignmentFlag.AlignRight|Qt.AlignmentFlag.AlignTrailing|Qt.AlignmentFlag.AlignVCenter) self.gridLayout.addWidget(self.label_optima35_latestversion, 2, 2, 1, 1) self.label_latest_version = QLabel(self.pkg_info_groupBox) self.label_latest_version.setObjectName(u"label_latest_version") - self.label_latest_version.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter) + self.label_latest_version.setAlignment(Qt.AlignmentFlag.AlignRight|Qt.AlignmentFlag.AlignTrailing|Qt.AlignmentFlag.AlignVCenter) self.gridLayout.addWidget(self.label_latest_version, 0, 2, 1, 1) @@ -134,7 +136,7 @@ class Ui_Settings_Window(object): self.label_optimalab35_latestversion = QLabel(self.pkg_info_groupBox) self.label_optimalab35_latestversion.setObjectName(u"label_optimalab35_latestversion") - self.label_optimalab35_latestversion.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter) + self.label_optimalab35_latestversion.setAlignment(Qt.AlignmentFlag.AlignRight|Qt.AlignmentFlag.AlignTrailing|Qt.AlignmentFlag.AlignVCenter) self.gridLayout.addWidget(self.label_optimalab35_latestversion, 1, 2, 1, 1) @@ -145,13 +147,13 @@ class Ui_Settings_Window(object): self.label_optimalab35_localversion = QLabel(self.pkg_info_groupBox) self.label_optimalab35_localversion.setObjectName(u"label_optimalab35_localversion") - self.label_optimalab35_localversion.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter) + self.label_optimalab35_localversion.setAlignment(Qt.AlignmentFlag.AlignRight|Qt.AlignmentFlag.AlignTrailing|Qt.AlignmentFlag.AlignVCenter) self.gridLayout.addWidget(self.label_optimalab35_localversion, 1, 1, 1, 1) self.label_6 = QLabel(self.pkg_info_groupBox) self.label_6.setObjectName(u"label_6") - self.label_6.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter) + self.label_6.setAlignment(Qt.AlignmentFlag.AlignRight|Qt.AlignmentFlag.AlignTrailing|Qt.AlignmentFlag.AlignVCenter) self.gridLayout.addWidget(self.label_6, 0, 1, 1, 1) @@ -162,7 +164,7 @@ class Ui_Settings_Window(object): self.label_optima35_localversion = QLabel(self.pkg_info_groupBox) self.label_optima35_localversion.setObjectName(u"label_optima35_localversion") - self.label_optima35_localversion.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter) + self.label_optima35_localversion.setAlignment(Qt.AlignmentFlag.AlignRight|Qt.AlignmentFlag.AlignTrailing|Qt.AlignmentFlag.AlignVCenter) self.gridLayout.addWidget(self.label_optima35_localversion, 2, 1, 1, 1) @@ -197,7 +199,7 @@ class Ui_Settings_Window(object): self.label_last_check = QLabel(self.tabWidgetPage2) self.label_last_check.setObjectName(u"label_last_check") - self.label_last_check.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter) + self.label_last_check.setAlignment(Qt.AlignmentFlag.AlignRight|Qt.AlignmentFlag.AlignTrailing|Qt.AlignmentFlag.AlignVCenter) self.gridLayout_2.addWidget(self.label_last_check, 3, 1, 2, 1) diff --git a/src/OptimaLab35/ui/settings_window.ui b/src/OptimaLab35/ui/settings_window.ui index c871303..d6b92d6 100644 --- a/src/OptimaLab35/ui/settings_window.ui +++ b/src/OptimaLab35/ui/settings_window.ui @@ -21,17 +21,29 @@ - 500 - 500 + 450 + 350 Settings + + + 500 + 500 + + + + + 500 + 500 + + 0 @@ -154,7 +166,7 @@ - Qt::Horizontal + Qt::Orientation::Horizontal @@ -200,7 +212,7 @@ unknown - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter @@ -210,7 +222,7 @@ Latest version - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter @@ -227,7 +239,7 @@ unknown - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter @@ -244,7 +256,7 @@ 0.0.0 - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter @@ -254,7 +266,7 @@ Local Version - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter @@ -271,7 +283,7 @@ 0.0.0 - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter @@ -307,7 +319,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -330,7 +342,7 @@ TextLabel - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter