diff --git a/CHANGELOG.md b/CHANGELOG.md index a276501..cf6411f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # Changelog ## 0.12.x +### 0.12.3: UI Adjustments +- 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 - Fixed text clipping issues when using the new theme options. diff --git a/src/OptimaLab35/gui.py b/src/OptimaLab35/gui.py index 550fd5c..e21669a 100644 --- a/src/OptimaLab35/gui.py +++ b/src/OptimaLab35/gui.py @@ -529,7 +529,7 @@ class SettingsWindow(QMainWindow, Ui_Settings_Window): # Connect buttons to functions self.ui.check_for_update_Button.clicked.connect(self.check_for_updates) self.ui.update_and_restart_Button.clicked.connect(self.update_and_restart) - self.ui.label_last_check_2.setText(self.time_to_string(self.ol35_last_state[0])) + self.ui.label_last_check.setText(f"Last check: {self.time_to_string(self.ol35_last_state[0])}") self.ui.dev_widget.setVisible(False) # Timer for long press detection @@ -753,7 +753,7 @@ class SettingsWindow(QMainWindow, Ui_Settings_Window): self.ui.update_and_restart_Button.setEnabled(True) last_date = self.time_to_string(self.ppu_ol35.get_last_state()[0]) - self.ui.label_last_check_2.setText(last_date) + self.ui.label_last_check.setText(f"Last check: {last_date}") self.ui.label_latest_version.setText("Online version") self.ui.check_for_update_Button.setEnabled(True) @@ -985,7 +985,7 @@ def main(): app_settings["theme"]["theme_pkg"] = False if app_settings["theme"]["use_custom_theme"] and app_settings["theme"]["theme_pkg"]: - app.setStyleSheet(qdarktheme.load_stylesheet(app_settings["theme"]["mode"].lower())) + qdarktheme.setup_theme(app_settings["theme"]["mode"].lower()) u.save_settings(app_settings) del u diff --git a/src/OptimaLab35/ui/main_window.py b/src/OptimaLab35/ui/main_window.py index 03c3ee6..524d151 100644 --- a/src/OptimaLab35/ui/main_window.py +++ b/src/OptimaLab35/ui/main_window.py @@ -17,11 +17,11 @@ from PySide6.QtGui import (QAction, QBrush, QColor, QConicalGradient, QPainter, QPalette, QPixmap, QRadialGradient, QTransform) from PySide6.QtWidgets import (QApplication, QCheckBox, QComboBox, QDateEdit, - QFrame, QGridLayout, QGroupBox, QHBoxLayout, - QLabel, QLineEdit, QMainWindow, QMenu, - QMenuBar, QProgressBar, QPushButton, QSizePolicy, - QSlider, QSpinBox, QStatusBar, QTabWidget, - QVBoxLayout, QWidget) + QGridLayout, QGroupBox, QHBoxLayout, QLabel, + QLineEdit, QMainWindow, QMenu, QMenuBar, + QProgressBar, QPushButton, QSizePolicy, QSlider, + QSpinBox, QStatusBar, QTabWidget, QVBoxLayout, + QWidget) class Ui_MainWindow(object): def setupUi(self, MainWindow): @@ -50,7 +50,7 @@ class Ui_MainWindow(object): self.tab_1.setObjectName(u"tab_1") self.verticalLayout_10 = QVBoxLayout(self.tab_1) self.verticalLayout_10.setObjectName(u"verticalLayout_10") - self.folder_group = QFrame(self.tab_1) + self.folder_group = QGroupBox(self.tab_1) self.folder_group.setObjectName(u"folder_group") self.folder_group.setMaximumSize(QSize(400, 16777215)) self.gridLayout_5 = QGridLayout(self.folder_group) @@ -606,6 +606,7 @@ class Ui_MainWindow(object): self.actionPreview.setText(QCoreApplication.translate("MainWindow", u"Preview image", None)) self.actionAbout.setText(QCoreApplication.translate("MainWindow", u"About", None)) self.actionSettings.setText(QCoreApplication.translate("MainWindow", u"Preferences...", None)) + self.folder_group.setTitle(QCoreApplication.translate("MainWindow", u"File selection", None)) #if QT_CONFIG(tooltip) self.input_folder_button.setToolTip(QCoreApplication.translate("MainWindow", u"Open a file browser to select a folder for loading images.", None)) #endif // QT_CONFIG(tooltip) diff --git a/src/OptimaLab35/ui/main_window.ui b/src/OptimaLab35/ui/main_window.ui index bb7cc28..54f6e9f 100644 --- a/src/OptimaLab35/ui/main_window.ui +++ b/src/OptimaLab35/ui/main_window.ui @@ -47,13 +47,16 @@ - + 400 16777215 + + File selection + diff --git a/src/OptimaLab35/ui/preview_window.py b/src/OptimaLab35/ui/preview_window.py index eb3ab56..3381324 100644 --- a/src/OptimaLab35/ui/preview_window.py +++ b/src/OptimaLab35/ui/preview_window.py @@ -15,10 +15,11 @@ from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor, QFont, QFontDatabase, QGradient, QIcon, QImage, QKeySequence, QLinearGradient, QPainter, QPalette, QPixmap, QRadialGradient, QTransform) -from PySide6.QtWidgets import (QApplication, QCheckBox, QFrame, QHBoxLayout, - QLabel, QLineEdit, QMainWindow, QMenuBar, - QPushButton, QSizePolicy, QSlider, QSpacerItem, - QSpinBox, QVBoxLayout, QWidget) +from PySide6.QtWidgets import (QApplication, QCheckBox, QFrame, QGridLayout, + QGroupBox, QHBoxLayout, QLabel, QLineEdit, + QMainWindow, QMenuBar, QPushButton, QSizePolicy, + QSlider, QSpacerItem, QSpinBox, QVBoxLayout, + QWidget) class Ui_Preview_Window(object): def setupUi(self, Preview_Window): @@ -42,31 +43,37 @@ class Ui_Preview_Window(object): self.widget.setObjectName(u"widget") self.widget.setMinimumSize(QSize(160, 628)) self.widget.setMaximumSize(QSize(150, 16777215)) - self.verticalLayout = QVBoxLayout(self.widget) - self.verticalLayout.setObjectName(u"verticalLayout") - self.image_path_lineEdit = QLineEdit(self.widget) + self.verticalLayout_5 = QVBoxLayout(self.widget) + self.verticalLayout_5.setObjectName(u"verticalLayout_5") + self.groupBox_3 = QGroupBox(self.widget) + self.groupBox_3.setObjectName(u"groupBox_3") + self.verticalLayout_3 = QVBoxLayout(self.groupBox_3) + self.verticalLayout_3.setObjectName(u"verticalLayout_3") + self.image_path_lineEdit = QLineEdit(self.groupBox_3) self.image_path_lineEdit.setObjectName(u"image_path_lineEdit") - self.verticalLayout.addWidget(self.image_path_lineEdit) + self.verticalLayout_3.addWidget(self.image_path_lineEdit) - self.load_Button = QPushButton(self.widget) + self.load_Button = QPushButton(self.groupBox_3) self.load_Button.setObjectName(u"load_Button") - self.verticalLayout.addWidget(self.load_Button) + self.verticalLayout_3.addWidget(self.load_Button) - self.label = QLabel(self.widget) - self.label.setObjectName(u"label") - self.verticalLayout.addWidget(self.label) + self.verticalLayout_5.addWidget(self.groupBox_3) - self.brightness_spinBox = QSpinBox(self.widget) + self.groupBox_2 = QGroupBox(self.widget) + self.groupBox_2.setObjectName(u"groupBox_2") + self.verticalLayout = QVBoxLayout(self.groupBox_2) + self.verticalLayout.setObjectName(u"verticalLayout") + self.brightness_spinBox = QSpinBox(self.groupBox_2) self.brightness_spinBox.setObjectName(u"brightness_spinBox") self.brightness_spinBox.setMinimum(-100) self.brightness_spinBox.setMaximum(100) self.verticalLayout.addWidget(self.brightness_spinBox) - self.brightness_Slider = QSlider(self.widget) + self.brightness_Slider = QSlider(self.groupBox_2) self.brightness_Slider.setObjectName(u"brightness_Slider") self.brightness_Slider.setMinimum(-100) self.brightness_Slider.setMaximum(100) @@ -74,68 +81,88 @@ class Ui_Preview_Window(object): self.verticalLayout.addWidget(self.brightness_Slider) - self.reset_brightness_Button = QPushButton(self.widget) + self.reset_brightness_Button = QPushButton(self.groupBox_2) self.reset_brightness_Button.setObjectName(u"reset_brightness_Button") self.verticalLayout.addWidget(self.reset_brightness_Button) - self.label_2 = QLabel(self.widget) - self.label_2.setObjectName(u"label_2") - self.verticalLayout.addWidget(self.label_2) + self.verticalLayout_5.addWidget(self.groupBox_2) - self.contrast_spinBox = QSpinBox(self.widget) + self.groupBox = QGroupBox(self.widget) + self.groupBox.setObjectName(u"groupBox") + self.verticalLayout_2 = QVBoxLayout(self.groupBox) + self.verticalLayout_2.setObjectName(u"verticalLayout_2") + self.contrast_spinBox = QSpinBox(self.groupBox) self.contrast_spinBox.setObjectName(u"contrast_spinBox") self.contrast_spinBox.setMinimum(-100) self.contrast_spinBox.setMaximum(100) - self.verticalLayout.addWidget(self.contrast_spinBox) + self.verticalLayout_2.addWidget(self.contrast_spinBox) - self.contrast_Slider = QSlider(self.widget) + self.contrast_Slider = QSlider(self.groupBox) self.contrast_Slider.setObjectName(u"contrast_Slider") self.contrast_Slider.setMinimum(-100) self.contrast_Slider.setMaximum(100) self.contrast_Slider.setOrientation(Qt.Horizontal) - self.verticalLayout.addWidget(self.contrast_Slider) + self.verticalLayout_2.addWidget(self.contrast_Slider) - self.reset_contrast_Button = QPushButton(self.widget) + self.reset_contrast_Button = QPushButton(self.groupBox) self.reset_contrast_Button.setObjectName(u"reset_contrast_Button") - self.verticalLayout.addWidget(self.reset_contrast_Button) + self.verticalLayout_2.addWidget(self.reset_contrast_Button) - self.grayscale_checkBox = QCheckBox(self.widget) + + self.verticalLayout_5.addWidget(self.groupBox) + + self.groupBox_5 = QGroupBox(self.widget) + self.groupBox_5.setObjectName(u"groupBox_5") + self.gridLayout = QGridLayout(self.groupBox_5) + self.gridLayout.setObjectName(u"gridLayout") + self.grayscale_checkBox = QCheckBox(self.groupBox_5) self.grayscale_checkBox.setObjectName(u"grayscale_checkBox") - self.verticalLayout.addWidget(self.grayscale_checkBox) + self.gridLayout.addWidget(self.grayscale_checkBox, 0, 0, 1, 1) + + + self.verticalLayout_5.addWidget(self.groupBox_5) self.verticalSpacer = QSpacerItem(20, 219, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding) - self.verticalLayout.addItem(self.verticalSpacer) + self.verticalLayout_5.addItem(self.verticalSpacer) - self.live_update = QCheckBox(self.widget) + self.groupBox_4 = QGroupBox(self.widget) + self.groupBox_4.setObjectName(u"groupBox_4") + self.verticalLayout_4 = QVBoxLayout(self.groupBox_4) + self.verticalLayout_4.setObjectName(u"verticalLayout_4") + self.live_update = QCheckBox(self.groupBox_4) self.live_update.setObjectName(u"live_update") self.live_update.setChecked(True) - self.verticalLayout.addWidget(self.live_update) + self.verticalLayout_4.addWidget(self.live_update) - self.update_Button = QPushButton(self.widget) + self.update_Button = QPushButton(self.groupBox_4) self.update_Button.setObjectName(u"update_Button") + self.update_Button.setEnabled(False) self.update_Button.setAutoFillBackground(False) - self.verticalLayout.addWidget(self.update_Button) + self.verticalLayout_4.addWidget(self.update_Button) - self.checkBox = QCheckBox(self.widget) + self.checkBox = QCheckBox(self.groupBox_4) self.checkBox.setObjectName(u"checkBox") self.checkBox.setLayoutDirection(Qt.LeftToRight) self.checkBox.setChecked(True) - self.verticalLayout.addWidget(self.checkBox) + self.verticalLayout_4.addWidget(self.checkBox) - self.close_Button = QPushButton(self.widget) + self.close_Button = QPushButton(self.groupBox_4) self.close_Button.setObjectName(u"close_Button") - self.verticalLayout.addWidget(self.close_Button) + self.verticalLayout_4.addWidget(self.close_Button) + + + self.verticalLayout_5.addWidget(self.groupBox_4) self.horizontalLayout.addWidget(self.widget) @@ -151,6 +178,7 @@ class Ui_Preview_Window(object): self.brightness_spinBox.valueChanged.connect(self.brightness_Slider.setValue) self.contrast_Slider.valueChanged.connect(self.contrast_spinBox.setValue) self.contrast_spinBox.valueChanged.connect(self.contrast_Slider.setValue) + self.live_update.toggled.connect(self.update_Button.setDisabled) QMetaObject.connectSlotsByName(Preview_Window) # setupUi @@ -158,33 +186,36 @@ class Ui_Preview_Window(object): def retranslateUi(self, Preview_Window): Preview_Window.setWindowTitle(QCoreApplication.translate("Preview_Window", u"OptimaLab35 - Preview", None)) self.QLabel.setText("") + self.groupBox_3.setTitle(QCoreApplication.translate("Preview_Window", u"File", None)) #if QT_CONFIG(tooltip) self.image_path_lineEdit.setToolTip(QCoreApplication.translate("Preview_Window", u"Enter the path to the image file or use the 'Select Image' button to browse.", None)) #endif // QT_CONFIG(tooltip) self.image_path_lineEdit.setPlaceholderText(QCoreApplication.translate("Preview_Window", u"Image Path", None)) self.load_Button.setText(QCoreApplication.translate("Preview_Window", u"Select image", None)) - self.label.setText(QCoreApplication.translate("Preview_Window", u"Brightness", None)) + self.groupBox_2.setTitle(QCoreApplication.translate("Preview_Window", u"Brightness", None)) #if QT_CONFIG(tooltip) self.reset_brightness_Button.setToolTip(QCoreApplication.translate("Preview_Window", u"Click to reset the brightness to its default value (0).", None)) #endif // QT_CONFIG(tooltip) self.reset_brightness_Button.setText(QCoreApplication.translate("Preview_Window", u"Reset", None)) - self.label_2.setText(QCoreApplication.translate("Preview_Window", u"Contrast", None)) + self.groupBox.setTitle(QCoreApplication.translate("Preview_Window", u"Contrast", None)) #if QT_CONFIG(tooltip) self.reset_contrast_Button.setToolTip(QCoreApplication.translate("Preview_Window", u"Click to reset the contrast to its default value (0).", None)) #endif // QT_CONFIG(tooltip) self.reset_contrast_Button.setText(QCoreApplication.translate("Preview_Window", u"Reset", None)) + self.groupBox_5.setTitle(QCoreApplication.translate("Preview_Window", u"Grayscale", None)) #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.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 update", None)) + self.live_update.setText(QCoreApplication.translate("Preview_Window", u"Live refresh", None)) #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"Update Preview", None)) + 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) diff --git a/src/OptimaLab35/ui/preview_window.ui b/src/OptimaLab35/ui/preview_window.ui index f47cfac..1e8066f 100644 --- a/src/OptimaLab35/ui/preview_window.ui +++ b/src/OptimaLab35/ui/preview_window.ui @@ -54,112 +54,134 @@ 16777215 - + - - - Enter the path to the image file or use the 'Select Image' button to browse. - - - Image Path + + + File + + + + + Enter the path to the image file or use the 'Select Image' button to browse. + + + Image Path + + + + + + + Select image + + + + - - - Select image - - - - - - + + Brightness + + + + + -100 + + + 100 + + + + + + + -100 + + + 100 + + + Qt::Horizontal + + + + + + + Click to reset the brightness to its default value (0). + + + Reset + + + + - - - -100 - - - 100 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - Click to reset the brightness to its default value (0). - - - Reset - - - - - - + + Contrast + + + + + -100 + + + 100 + + + + + + + -100 + + + 100 + + + Qt::Horizontal + + + + + + + Click to reset the contrast to its default value (0). + + + Reset + + + + - - - -100 - - - 100 - - - - - - - -100 - - - 100 - - - Qt::Horizontal - - - - - - - Click to reset the contrast to its default value (0). - - - Reset - - - - - - - Convert the image to grayscale (black and white). - - - Black n White + + + Grayscale + + + + + Convert the image to grayscale (black and white). + + + Black n White + + + + @@ -176,55 +198,67 @@ - - - Live update applies changes instantly. If the app becomes unresponsive or lags, disable this option. - - - Live update - - - true - - - - - - - Apply Changes to Preview - - - false - - - Update Preview - - - - - - - Enable to copy adjustments to the main window upon closing - - - Qt::LeftToRight - - - Copy Values - - - true - - - - - - - - - - Close + + + Behavior + + + + + Live update applies changes instantly. If the app becomes unresponsive or lags, disable this option. + + + Live refresh + + + true + + + + + + + false + + + Apply Changes to Preview + + + false + + + Refresh image + + + + + + + Enable to copy adjustments to the main window upon closing + + + Qt::LeftToRight + + + Copy Values + + + true + + + + + + + + + + Close + + + + @@ -309,5 +343,21 @@ + + live_update + toggled(bool) + update_Button + setDisabled(bool) + + + 785 + 624 + + + 785 + 659 + + + diff --git a/src/OptimaLab35/ui/settings_window.py b/src/OptimaLab35/ui/settings_window.py index 9e25439..be60c0b 100644 --- a/src/OptimaLab35/ui/settings_window.py +++ b/src/OptimaLab35/ui/settings_window.py @@ -16,16 +16,16 @@ from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor, QImage, QKeySequence, QLinearGradient, QPainter, QPalette, QPixmap, QRadialGradient, QTransform) from PySide6.QtWidgets import (QApplication, QCheckBox, QComboBox, QGridLayout, - QHBoxLayout, QLabel, QMainWindow, QPushButton, - QSizePolicy, QSpacerItem, QTabWidget, QVBoxLayout, - QWidget) + QGroupBox, QHBoxLayout, QLabel, QMainWindow, + QPushButton, QSizePolicy, QSpacerItem, QTabWidget, + QVBoxLayout, QWidget) class Ui_Settings_Window(object): def setupUi(self, Settings_Window): if not Settings_Window.objectName(): Settings_Window.setObjectName(u"Settings_Window") Settings_Window.setEnabled(True) - Settings_Window.resize(400, 300) + Settings_Window.resize(400, 325) Settings_Window.setMinimumSize(QSize(400, 300)) Settings_Window.setMaximumSize(QSize(500, 500)) self.centralwidget = QWidget(Settings_Window) @@ -38,16 +38,43 @@ class Ui_Settings_Window(object): self.tabWidgetPage1.setObjectName(u"tabWidgetPage1") self.verticalLayout_2 = QVBoxLayout(self.tabWidgetPage1) self.verticalLayout_2.setObjectName(u"verticalLayout_2") - self.widget_3 = QWidget(self.tabWidgetPage1) - self.widget_3.setObjectName(u"widget_3") - self.gridLayout_3 = QGridLayout(self.widget_3) + self.groupBox_4 = QGroupBox(self.tabWidgetPage1) + self.groupBox_4.setObjectName(u"groupBox_4") + self.horizontalLayout_3 = QHBoxLayout(self.groupBox_4) + self.horizontalLayout_3.setObjectName(u"horizontalLayout_3") + self.label_4 = QLabel(self.groupBox_4) + self.label_4.setObjectName(u"label_4") + self.label_4.setWordWrap(True) + + self.horizontalLayout_3.addWidget(self.label_4) + + self.reset_exif_Button = QPushButton(self.groupBox_4) + self.reset_exif_Button.setObjectName(u"reset_exif_Button") + self.reset_exif_Button.setMinimumSize(QSize(100, 0)) + self.reset_exif_Button.setMaximumSize(QSize(100, 16777215)) + + self.horizontalLayout_3.addWidget(self.reset_exif_Button) + + + self.verticalLayout_2.addWidget(self.groupBox_4) + + self.groupBox_3 = QGroupBox(self.tabWidgetPage1) + self.groupBox_3.setObjectName(u"groupBox_3") + self.gridLayout_3 = QGridLayout(self.groupBox_3) self.gridLayout_3.setObjectName(u"gridLayout_3") - self.label_3 = QLabel(self.widget_3) + self.label_3 = QLabel(self.groupBox_3) self.label_3.setObjectName(u"label_3") self.gridLayout_3.addWidget(self.label_3, 0, 0, 1, 3) - self.theme_selection_comboBox = QComboBox(self.widget_3) + self.enable_theme_checkBox = QCheckBox(self.groupBox_3) + self.enable_theme_checkBox.setObjectName(u"enable_theme_checkBox") + self.enable_theme_checkBox.setChecked(False) + + self.gridLayout_3.addWidget(self.enable_theme_checkBox, 1, 0, 1, 1) + + self.theme_selection_comboBox = QComboBox(self.groupBox_3) + self.theme_selection_comboBox.addItem("") self.theme_selection_comboBox.addItem("") self.theme_selection_comboBox.addItem("") self.theme_selection_comboBox.setObjectName(u"theme_selection_comboBox") @@ -57,140 +84,90 @@ class Ui_Settings_Window(object): self.gridLayout_3.addWidget(self.theme_selection_comboBox, 1, 2, 1, 1) - self.enable_theme_checkBox = QCheckBox(self.widget_3) - self.enable_theme_checkBox.setObjectName(u"enable_theme_checkBox") - self.enable_theme_checkBox.setChecked(False) + self.save_and_close_Button = QPushButton(self.groupBox_3) + self.save_and_close_Button.setObjectName(u"save_and_close_Button") - self.gridLayout_3.addWidget(self.enable_theme_checkBox, 1, 0, 1, 1) + self.gridLayout_3.addWidget(self.save_and_close_Button, 3, 0, 1, 1) self.horizontalSpacer_2 = QSpacerItem(98, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum) self.gridLayout_3.addItem(self.horizontalSpacer_2, 1, 1, 1, 1) - self.install_pkg_Button = QPushButton(self.widget_3) + self.install_pkg_Button = QPushButton(self.groupBox_3) self.install_pkg_Button.setObjectName(u"install_pkg_Button") self.gridLayout_3.addWidget(self.install_pkg_Button, 2, 0, 1, 3) - - self.verticalLayout_2.addWidget(self.widget_3) - - self.widget_4 = QWidget(self.tabWidgetPage1) - self.widget_4.setObjectName(u"widget_4") - self.horizontalLayout_3 = QHBoxLayout(self.widget_4) - self.horizontalLayout_3.setObjectName(u"horizontalLayout_3") - self.label_4 = QLabel(self.widget_4) - self.label_4.setObjectName(u"label_4") - self.label_4.setWordWrap(True) - - self.horizontalLayout_3.addWidget(self.label_4) - - self.reset_exif_Button = QPushButton(self.widget_4) - self.reset_exif_Button.setObjectName(u"reset_exif_Button") - self.reset_exif_Button.setMinimumSize(QSize(100, 0)) - self.reset_exif_Button.setMaximumSize(QSize(100, 16777215)) - - self.horizontalLayout_3.addWidget(self.reset_exif_Button) - - - self.verticalLayout_2.addWidget(self.widget_4) - - self.verticalSpacer = QSpacerItem(20, 237, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding) - - self.verticalLayout_2.addItem(self.verticalSpacer) - - self.widget_5 = QWidget(self.tabWidgetPage1) - self.widget_5.setObjectName(u"widget_5") - self.horizontalLayout_4 = QHBoxLayout(self.widget_5) - self.horizontalLayout_4.setObjectName(u"horizontalLayout_4") - self.save_and_close_Button = QPushButton(self.widget_5) - self.save_and_close_Button.setObjectName(u"save_and_close_Button") - - self.horizontalLayout_4.addWidget(self.save_and_close_Button) - - self.save_and_restart_Button = QPushButton(self.widget_5) + self.save_and_restart_Button = QPushButton(self.groupBox_3) self.save_and_restart_Button.setObjectName(u"save_and_restart_Button") - self.horizontalLayout_4.addWidget(self.save_and_restart_Button) + self.gridLayout_3.addWidget(self.save_and_restart_Button, 3, 1, 1, 2) - self.verticalLayout_2.addWidget(self.widget_5) + self.verticalLayout_2.addWidget(self.groupBox_3) self.tabWidget.addTab(self.tabWidgetPage1, "") self.tabWidgetPage2 = QWidget() self.tabWidgetPage2.setObjectName(u"tabWidgetPage2") - self.verticalLayout_3 = QVBoxLayout(self.tabWidgetPage2) - self.verticalLayout_3.setObjectName(u"verticalLayout_3") - self.widget_6 = QWidget(self.tabWidgetPage2) - self.widget_6.setObjectName(u"widget_6") - self.label_last_check = QLabel(self.widget_6) - self.label_last_check.setObjectName(u"label_last_check") - self.label_last_check.setGeometry(QRect(0, 10, 131, 22)) - self.label_last_check_2 = QLabel(self.widget_6) - self.label_last_check_2.setObjectName(u"label_last_check_2") - self.label_last_check_2.setEnabled(True) - self.label_last_check_2.setGeometry(QRect(190, 10, 67, 22)) - self.label_last_check_2.setAlignment(Qt.AlignRight|Qt.AlignTrailing|Qt.AlignVCenter) - - self.verticalLayout_3.addWidget(self.widget_6) - - self.widget_2 = QWidget(self.tabWidgetPage2) - self.widget_2.setObjectName(u"widget_2") - self.gridLayout = QGridLayout(self.widget_2) + self.gridLayout_2 = QGridLayout(self.tabWidgetPage2) + self.gridLayout_2.setObjectName(u"gridLayout_2") + self.pkg_info_groupBox = QGroupBox(self.tabWidgetPage2) + self.pkg_info_groupBox.setObjectName(u"pkg_info_groupBox") + self.gridLayout = QGridLayout(self.pkg_info_groupBox) self.gridLayout.setObjectName(u"gridLayout") - self.label_optima35_latestversion = QLabel(self.widget_2) + 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.gridLayout.addWidget(self.label_optima35_latestversion, 2, 2, 1, 1) - self.label_latest_version = QLabel(self.widget_2) + 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.gridLayout.addWidget(self.label_latest_version, 0, 2, 1, 1) - self.label = QLabel(self.widget_2) + self.label = QLabel(self.pkg_info_groupBox) self.label.setObjectName(u"label") self.gridLayout.addWidget(self.label, 1, 0, 1, 1) - self.label_optimalab35_latestversion = QLabel(self.widget_2) + 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.gridLayout.addWidget(self.label_optimalab35_latestversion, 1, 2, 1, 1) - self.label_9 = QLabel(self.widget_2) + self.label_9 = QLabel(self.pkg_info_groupBox) self.label_9.setObjectName(u"label_9") self.gridLayout.addWidget(self.label_9, 0, 0, 1, 1) - self.label_optimalab35_localversion = QLabel(self.widget_2) + 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.gridLayout.addWidget(self.label_optimalab35_localversion, 1, 1, 1, 1) - self.label_6 = QLabel(self.widget_2) + 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.gridLayout.addWidget(self.label_6, 0, 1, 1, 1) - self.label_2 = QLabel(self.widget_2) + self.label_2 = QLabel(self.pkg_info_groupBox) self.label_2.setObjectName(u"label_2") self.gridLayout.addWidget(self.label_2, 2, 0, 1, 1) - self.label_optima35_localversion = QLabel(self.widget_2) + 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.gridLayout.addWidget(self.label_optima35_localversion, 2, 1, 1, 1) - self.verticalLayout_3.addWidget(self.widget_2) + self.gridLayout_2.addWidget(self.pkg_info_groupBox, 0, 0, 1, 2) self.dev_widget = QWidget(self.tabWidgetPage2) self.dev_widget.setObjectName(u"dev_widget") @@ -207,16 +184,22 @@ class Ui_Settings_Window(object): self.horizontalLayout_2.addWidget(self.update_local_Button) - self.verticalLayout_3.addWidget(self.dev_widget) + self.gridLayout_2.addWidget(self.dev_widget, 1, 0, 1, 2) - self.verticalSpacer_2 = QSpacerItem(20, 9, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding) + self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding) - self.verticalLayout_3.addItem(self.verticalSpacer_2) + self.gridLayout_2.addItem(self.verticalSpacer, 2, 0, 1, 1) self.label_5 = QLabel(self.tabWidgetPage2) self.label_5.setObjectName(u"label_5") - self.verticalLayout_3.addWidget(self.label_5) + self.gridLayout_2.addWidget(self.label_5, 3, 0, 1, 1) + + 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.gridLayout_2.addWidget(self.label_last_check, 3, 1, 2, 1) self.widget = QWidget(self.tabWidgetPage2) self.widget.setObjectName(u"widget") @@ -239,7 +222,7 @@ class Ui_Settings_Window(object): self.horizontalLayout.addWidget(self.restart_checkBox) - self.verticalLayout_3.addWidget(self.widget) + self.gridLayout_2.addWidget(self.widget, 5, 0, 1, 2) self.tabWidget.addTab(self.tabWidgetPage2, "") @@ -258,25 +241,27 @@ class Ui_Settings_Window(object): def retranslateUi(self, Settings_Window): Settings_Window.setWindowTitle(QCoreApplication.translate("Settings_Window", u"Settings", None)) + self.groupBox_4.setTitle(QCoreApplication.translate("Settings_Window", u"EXIF", None)) + self.label_4.setText(QCoreApplication.translate("Settings_Window", u"Reset selectable EXIF data to default", None)) + self.reset_exif_Button.setText(QCoreApplication.translate("Settings_Window", u"Reset", None)) + self.groupBox_3.setTitle(QCoreApplication.translate("Settings_Window", u"Theme", None)) self.label_3.setText(QCoreApplication.translate("Settings_Window", u"Change theme from OS to PyQT Dark or Light", None)) - self.theme_selection_comboBox.setItemText(0, QCoreApplication.translate("Settings_Window", u"Dark", None)) - self.theme_selection_comboBox.setItemText(1, QCoreApplication.translate("Settings_Window", u"Light", None)) - -#if QT_CONFIG(tooltip) - self.theme_selection_comboBox.setToolTip(QCoreApplication.translate("Settings_Window", u"App needs to restart before changes take effect.", None)) -#endif // QT_CONFIG(tooltip) #if QT_CONFIG(tooltip) self.enable_theme_checkBox.setToolTip(QCoreApplication.translate("Settings_Window", u"App needs to restart before changes take effect.", None)) #endif // QT_CONFIG(tooltip) self.enable_theme_checkBox.setText(QCoreApplication.translate("Settings_Window", u"Custom theme", None)) + self.theme_selection_comboBox.setItemText(0, QCoreApplication.translate("Settings_Window", u"Auto", None)) + self.theme_selection_comboBox.setItemText(1, QCoreApplication.translate("Settings_Window", u"Dark", None)) + self.theme_selection_comboBox.setItemText(2, QCoreApplication.translate("Settings_Window", u"Light", None)) + +#if QT_CONFIG(tooltip) + self.theme_selection_comboBox.setToolTip(QCoreApplication.translate("Settings_Window", u"App needs to restart before changes take effect.", None)) +#endif // QT_CONFIG(tooltip) + self.save_and_close_Button.setText(QCoreApplication.translate("Settings_Window", u"Apply theme", None)) self.install_pkg_Button.setText(QCoreApplication.translate("Settings_Window", u"Install package for custom theme", None)) - self.label_4.setText(QCoreApplication.translate("Settings_Window", u"Reset selectable EXIF data to default", None)) - self.reset_exif_Button.setText(QCoreApplication.translate("Settings_Window", u"Reset", None)) - self.save_and_close_Button.setText(QCoreApplication.translate("Settings_Window", u"Save and close", None)) - self.save_and_restart_Button.setText(QCoreApplication.translate("Settings_Window", u"Save and restart", None)) + self.save_and_restart_Button.setText(QCoreApplication.translate("Settings_Window", u"Apply and restart", None)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabWidgetPage1), QCoreApplication.translate("Settings_Window", u"Preferences", None)) - self.label_last_check.setText(QCoreApplication.translate("Settings_Window", u"Last update check:", None)) - self.label_last_check_2.setText(QCoreApplication.translate("Settings_Window", u"TextLabel", None)) + self.pkg_info_groupBox.setTitle(QCoreApplication.translate("Settings_Window", u"Package information", None)) self.label_optima35_latestversion.setText(QCoreApplication.translate("Settings_Window", u"unknown", None)) self.label_latest_version.setText(QCoreApplication.translate("Settings_Window", u"Latest version", None)) self.label.setText(QCoreApplication.translate("Settings_Window", u"OptimaLab35", None)) @@ -295,6 +280,7 @@ class Ui_Settings_Window(object): #endif // QT_CONFIG(tooltip) self.update_local_Button.setText(QCoreApplication.translate("Settings_Window", u"Update local", None)) self.label_5.setText(QCoreApplication.translate("Settings_Window", u"TextLabel", None)) + self.label_last_check.setText(QCoreApplication.translate("Settings_Window", u"TextLabel", None)) self.check_for_update_Button.setText(QCoreApplication.translate("Settings_Window", u"Check for update", None)) self.update_and_restart_Button.setText(QCoreApplication.translate("Settings_Window", u"Update", None)) #if QT_CONFIG(tooltip) diff --git a/src/OptimaLab35/ui/settings_window.ui b/src/OptimaLab35/ui/settings_window.ui index a30edf8..9ac5bd4 100644 --- a/src/OptimaLab35/ui/settings_window.ui +++ b/src/OptimaLab35/ui/settings_window.ui @@ -10,7 +10,7 @@ 0 0 400 - 300 + 325 @@ -35,91 +35,16 @@ 0 - + Preferences - - - - - - Change theme from OS to PyQT Dark or Light - - - - - - - false - - - - 100 - 0 - - - - - 100 - 16777215 - - - - App needs to restart before changes take effect. - - - - Dark - - - - - Light - - - - - - - - App needs to restart before changes take effect. - - - Custom theme - - - false - - - - - - - Qt::Horizontal - - - - 98 - 20 - - - - - - - - Install package for custom theme - - - - - - - - + + + EXIF + @@ -154,32 +79,99 @@ - - - Qt::Vertical + + + Theme - - - 20 - 237 - - - - - - - - - + + + - Save and close + Change theme from OS to PyQT Dark or Light - + + + + App needs to restart before changes take effect. + + + Custom theme + + + false + + + + + + + false + + + + 100 + 0 + + + + + 100 + 16777215 + + + + App needs to restart before changes take effect. + + + + Auto + + + + + Dark + + + + + Light + + + + + + + + Apply theme + + + + + + + Qt::Horizontal + + + + 98 + 20 + + + + + + + + Install package for custom theme + + + + - Save and restart + Apply and restart @@ -188,49 +180,16 @@ - + Updater - - - - - - - 0 - 10 - 131 - 22 - - - - Last update check: - - - - - true - - - - 190 - 10 - 67 - 22 - - - - TextLabel - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - + + + + + Package information + @@ -316,7 +275,7 @@ - + @@ -342,27 +301,37 @@ - - + + Qt::Vertical 20 - 9 + 40 - + TextLabel - + + + + TextLabel + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + @@ -411,12 +380,12 @@ setEnabled(bool) - 112 - 103 + 96 + 225 - 286 - 103 + 317 + 225 diff --git a/src/OptimaLab35/utils/utility.py b/src/OptimaLab35/utils/utility.py index 1db2060..ff22625 100644 --- a/src/OptimaLab35/utils/utility.py +++ b/src/OptimaLab35/utils/utility.py @@ -99,7 +99,7 @@ class Utilities: "theme": { "theme_pkg": False, "use_custom_theme": False, - "mode": "Dark" + "mode": "Auto" } } self.write_yaml(self.settings_path, settings) diff --git a/src/pyproject.toml b/src/pyproject.toml index 903108e..0c07f29 100644 --- a/src/pyproject.toml +++ b/src/pyproject.toml @@ -11,7 +11,7 @@ readme = "../pip_README.md" requires-python = ">=3.8" dependencies = [ "optima35>=1.0.0, <2.0.0", - "PyPiUpdater>=0.7.0, <1.0.0", + "PyPiUpdater>=0.7.2, <1.0.0", "pyside6", "PyYAML", ] @@ -26,6 +26,8 @@ classifiers = [ [project.urls] Source = "https://gitlab.com/CodeByMrFinchum/OptimaLab35" +Documentation = "https://gitlab.com/CodeByMrFinchum/OptimaLab35/-/blob/main/README.md" +Changelog = "https://gitlab.com/CodeByMrFinchum/OptimaLab35/-/blob/main/CHANGELOG.md" [project.scripts] OptimaLab35 = "OptimaLab35.__main__:main"