Upgrade to Qt 6.10.3, refactor AppState for LibraryModel integration, add ChunkMeasurer tests, and update CI/docker configurations.

This commit is contained in:
Agel committed 2026-04-03 13:55:28 +02:00
1 parent 0303107fa2
commit a31b20534a
53 files changed
+2095 -880

No files matched your search

+28 -15
View File
@@ -7,6 +7,7 @@ ApplicationWindow {
id: window
width: 1024
height: 768
opacity: 0
visible: true
title: "Asteria"
color: ThemeManager.currentTheme.backgroundDeepest
@@ -19,7 +20,6 @@ ApplicationWindow {
property bool sidebarOpen: appState.sidebarOpen
onSidebarOpenChanged: appState.sidebarOpen = sidebarOpen
property string currentPage: "starter"
property bool _restoringState: false
property bool barsVisible: true
onCurrentPageChanged: appState.lastPage = currentPage
@@ -31,23 +31,12 @@ ApplicationWindow {
x = appState.windowX
y = appState.windowY
}
// Initialize theme from AppState
if (appState.themeName !== "") {
ThemeManager.currentThemeName = appState.themeName
}
if (appState.lastFilePath !== "") {
window._restoringState = true
bookController.openBook(appState.lastFileUrl())
} else {
window.sidebarOpen = true
var savedPage = appState.lastPage
if (savedPage === "library" || savedPage === "settings")
window.currentPage = savedPage
}
}
Connections {
target: appState
function onThemeNameChanged() {
@@ -129,6 +118,13 @@ ApplicationWindow {
anchors.fill: parent
visible: window.currentPage === "library"
}
BusyIndicator {
anchors.centerIn: parent
running: bookController.loading || readingModel.measuring
visible: running
z: 10
}
}
Loader {
@@ -224,8 +220,7 @@ ApplicationWindow {
Connections {
target: bookController
function onBookReady() {
if (window._restoringState) {
window._restoringState = false
if (bookController.startupRestore) {
var savedPage = appState.lastPage
if (savedPage === "library" || savedPage === "settings")
window.currentPage = savedPage
@@ -239,5 +234,23 @@ ApplicationWindow {
if (!bookController.hasBook && window.currentPage === "reader")
window.currentPage = "starter"
}
function onNoSavedBook() {
window.sidebarOpen = true
var savedPage = appState.lastPage
if (savedPage === "library" || savedPage === "settings")
window.currentPage = savedPage
}
}
Timer {
running: true
repeat: false
interval: 1
triggeredOnStart: false
onTriggered: {
window.opacity = 1
readerPage.pageView.updateContentWidth()
bookController.uiReady()
}
}
}