From 89c3fb3e68f36696de5301a0cb7be1f148feb334 Mon Sep 17 00:00:00 2001 From: Mr Finchum Date: Thu, 30 Jan 2025 16:45:02 +0000 Subject: [PATCH] feat: Enhanced preview window --- CHANGELOG.md | 17 +++-- src/OptimaLab35/gui.py | 93 ++++++++++++++++++++++------ src/OptimaLab35/ui/main_window.py | 5 -- src/OptimaLab35/ui/main_window.ui | 7 --- src/OptimaLab35/ui/preview_window.py | 24 ++++++- src/OptimaLab35/ui/preview_window.ui | 27 +++++++- src/OptimaLab35/ui/simple_dialog.py | 12 +++- 7 files changed, 141 insertions(+), 44 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5643294..c103ff4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,14 @@ # Changelog -## 0.6.x -### 0.6.0: Initial Flatpak Support +## 0.7.x +### 0.7.0: Enhanced Preview +- Images loaded into the preview window are now scaled while maintaining aspect ratio. +- Added live updates: changes to brightness, contrast, or grayscale are applied immediately. + - ⚠ This may crush the system depending on image size and system specifications. +- Removed Settings from menuBar, and extended the about window. +--- + +## 0.6.0: Initial Flatpak Support - Started Flatpak package building. - Not added to Flathub yet, as only stable software is hosted there. - Not fully completed, icon, name, and description are included, but the version is missing for some reason. @@ -10,14 +17,12 @@ --- -## 0.5.x -### 0.5.0 +## 0.5.0 - Removed all leftover of tui code that was hiding in some classes. --- -## 0.4.x -### 0.4.0 +## 0.4.0 - Fixed a critical issue that prevented the program from functioning. - Updated compatibility to align with the **upcoming** optima35 **release**. diff --git a/src/OptimaLab35/gui.py b/src/OptimaLab35/gui.py index 4fc4afb..1194845 100644 --- a/src/OptimaLab35/gui.py +++ b/src/OptimaLab35/gui.py @@ -10,7 +10,7 @@ from OptimaLab35.ui.exif_handler_window import ExifEditor from OptimaLab35.ui.simple_dialog import SimpleDialog # Import the SimpleDialog class from OptimaLab35 import __version__ -from PySide6.QtCore import QRunnable, QThreadPool, Signal, QObject, QRegularExpression +from PySide6.QtCore import QRunnable, QThreadPool, Signal, QObject, QRegularExpression, Qt from PySide6 import QtWidgets from PySide6.QtWidgets import ( @@ -75,7 +75,6 @@ class OptimaLab35(QMainWindow, Ui_MainWindow): self.ui.edit_exif_button.clicked.connect(self.open_exif_editor) self.ui.actionAbout.triggered.connect(self.info_window) - self.ui.actionPreview.triggered.connect(self.open_preview_window) self.ui.preview_Button.clicked.connect(self.open_preview_window) regex = QRegularExpression(r"^\d{1,2}\.\d{1,6}$") @@ -88,7 +87,7 @@ class OptimaLab35(QMainWindow, Ui_MainWindow): # UI related function, changing parts, open, etc. def open_preview_window(self): self.preview_window.values_selected.connect(self.update_values) - self.preview_window.show() + self.preview_window.showMaximized() def update_values(self, value1, value2, checkbox_state): # Update main window's widgets with the received values @@ -98,12 +97,20 @@ class OptimaLab35(QMainWindow, Ui_MainWindow): self.ui.grayscale_checkBox.setChecked(checkbox_state) def info_window(self): - # ChatGPT, mainly info_text = f"""

{self.name} v{self.version}

-

(C) 2024-2025 Mr. Finchum aka CodeByMrFinchum

-

{self.name} is a GUI for {self.o.name} (v{self.o.version}).

-

Both projects are in active development, for more details, visit:

+

(C) 2024-2025 Mr Finchum aka CodeByMrFinchum

+

{self.name} is a GUI for {self.o.name} (v{self.o.version}), enhancing its functionality with a\nuser-friendly interface for efficient image and metadata management.

+ +

Features:

+ + +

For more details, visit: