diff --git a/CHANGELOG.md b/CHANGELOG.md index 65dc9e8..270717d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ -# 1.1.3 (pre-release) -- `M4B (with chapters)` generation is not faster now, as it directly generates `m4b` files instead of converting from `wav`, which significantly reduces processing time. +# 1.1.3 +- `M4B (with chapters)` generation is faster now, as it directly generates `m4b` files instead of converting from `wav`, which significantly reduces processing time. - Better sleep state handling for Linux. +- The app window now tries to fit the screen if its height would exceed the available display area. - Fixed issue where the app would not restart properly on Windows. - Fixed last sentence/subtitle entry timing in generated subtitles, the end time of the final subtitle entry now correctly matches the end of the audio chunk, preventing zero or invalid timings at the end. diff --git a/abogen/gui.py b/abogen/gui.py index a99fc3e..0ad8199 100644 --- a/abogen/gui.py +++ b/abogen/gui.py @@ -763,7 +763,11 @@ class abogen(QWidget): self.setWindowTitle(f"{PROGRAM_NAME} v{VERSION}") screen = QApplication.primaryScreen().geometry() width, height = 500, 800 - x, y = (screen.width() - width) // 2, (screen.height() - height) // 2 + x = (screen.width() - width) // 2 + # If desired height is larger than screen, fit to screen height + if height > screen.height() - 65: + height = screen.height() - 100 # Leave a margin for window borders + y = max((screen.height() - height) // 2, 0) self.setGeometry(x, y, width, height) outer_layout = QVBoxLayout() outer_layout.setContentsMargins(15, 15, 15, 15) @@ -2871,7 +2875,6 @@ class abogen(QWidget): ) if reply == QMessageBox.Yes: from abogen.utils import get_user_config_path - import sys config_path = get_user_config_path() try: