From a92e60ebefabe080a3dee5569d5deef83d466cc2 Mon Sep 17 00:00:00 2001 From: purian23 Date: Mon, 26 Oct 2026 23:21:29 -0400 Subject: [PATCH] updater: confirm installs on enter & keeps the upgrade log in view when inline Port 2.0 --- .../Modals/Common/ConfirmDialogOverlay.qml | 2 +- .../Modules/Settings/SoftwareUpdatesTab.qml | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/quickshell/Modals/Common/ConfirmDialogOverlay.qml b/quickshell/Modals/Common/ConfirmDialogOverlay.qml index 48ecddfaa..6bc15a55b 100644 --- a/quickshell/Modals/Common/ConfirmDialogOverlay.qml +++ b/quickshell/Modals/Common/ConfirmDialogOverlay.qml @@ -39,7 +39,7 @@ Item { onCancel = options.onCancel || (() => {}); visible = true; dialogContent.keyboardNavigation = false; - dialogContent.selectedButton = 0; + dialogContent.selectedButton = options.confirmByDefault === true ? 1 : 0; focusDialog(); } diff --git a/quickshell/Modules/Settings/SoftwareUpdatesTab.qml b/quickshell/Modules/Settings/SoftwareUpdatesTab.qml index 70dbf281c..a449ca7e7 100644 --- a/quickshell/Modules/Settings/SoftwareUpdatesTab.qml +++ b/quickshell/Modules/Settings/SoftwareUpdatesTab.qml @@ -234,6 +234,7 @@ Item { title: I18n.tr("Install system updates?", "confirmation dialog title before running the system upgrade"), message: root.installSummary(), confirmText: I18n.tr("Install", "install action button"), + confirmByDefault: true, onConfirm: () => root.runUpdateAll() }); return; @@ -277,13 +278,31 @@ Item { interactive: interactive === true }); packagesExpanded = false; + followUpgradeLog = true; if (upgradeInWindow && interactive !== true) PopoutService.showSystemUpdateModal(); } + property bool followUpgradeLog: false + readonly property bool upgrading: SystemUpdateService.isUpgrading + + onUpgradingChanged: { + if (!upgrading) + followUpgradeLog = false; + } + + function revealUpgradeLog() { + if (!followUpgradeLog || !upgradeLogRow.visible) + return; + const top = upgradeLogRow.mapToItem(mainColumn.contentItem, 0, 0).y; + mainColumn.revealRange(top, top + upgradeLogRow.height); + } + SettingsPage { id: mainColumn + onContentHeightChanged: root.revealUpgradeLog() + ReleaseHero { M3WaveProgress { width: parent.width @@ -505,6 +524,7 @@ Item { } SettingsRow { + id: upgradeLogRow visible: (SystemUpdateService.isUpgrading && !root.upgradeInWindow) || (root.upgradeFailed && !root.upgradeRunsInTerminal) body: Item { readonly property real lineHeight: logText.implicitHeight / Math.max(1, logText.lineCount)