From 8b34db9d76b54de14187aa4dfd660fb9d6f6d7fe Mon Sep 17 00:00:00 2001 From: rozyczko Date: Fri, 20 Mar 2026 10:10:41 +0100 Subject: [PATCH 1/3] added footer component + assorted fixes --- src/EasyApp/Gui/Components/SideBar.qml | 21 +++++++++++++++---- .../Gui/Components/TableViewDelegate.qml | 6 ++++++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/EasyApp/Gui/Components/SideBar.qml b/src/EasyApp/Gui/Components/SideBar.qml index b4e31031..34bd0ae6 100644 --- a/src/EasyApp/Gui/Components/SideBar.qml +++ b/src/EasyApp/Gui/Components/SideBar.qml @@ -12,6 +12,7 @@ Item { property alias items: items.contentData property alias continueButton: continueButton + property Component footerComponent: null anchors.fill: parent @@ -30,9 +31,7 @@ Item { id: items anchors.top: tabs.bottom - anchors.bottom: continueButton.visible ? - continueButton.top: - sideBarContainer.bottom + anchors.bottom: footerLoader.top anchors.left: sideBarContainer.left anchors.right: sideBarContainer.right @@ -45,6 +44,20 @@ Item { } // Sidebar content + // Footer content (pinned above continue button) + Loader { + id: footerLoader + + active: sideBarContainer.footerComponent !== null + sourceComponent: sideBarContainer.footerComponent + + anchors.bottom: continueButton.visible ? continueButton.top : sideBarContainer.bottom + anchors.horizontalCenter: sideBarContainer.horizontalCenter + + anchors.bottomMargin: footerLoader.item ? 0.25 * EaStyle.Sizes.fontPixelSize : 0 + } + // Footer content + // Continue button EaElements.SideBarButton { id: continueButton @@ -64,7 +77,7 @@ Item { // Gradient area above button Rectangle { height: 1.25 * EaStyle.Sizes.fontPixelSize - anchors.bottom: continueButton.top + anchors.bottom: footerLoader.top anchors.left: sideBarContainer.left anchors.right: sideBarContainer.right diff --git a/src/EasyApp/Gui/Components/TableViewDelegate.qml b/src/EasyApp/Gui/Components/TableViewDelegate.qml index 38159068..ed574b7a 100644 --- a/src/EasyApp/Gui/Components/TableViewDelegate.qml +++ b/src/EasyApp/Gui/Components/TableViewDelegate.qml @@ -43,6 +43,12 @@ Rectangle { blocking: false onHoveredChanged: { if (hovered) { + // Don't change current index while a text input is being edited, + // as this steals focus from the active editor + var fi = control.Window.activeFocusItem + if (fi && fi.activeFocus && fi.hasOwnProperty('cursorPosition')) { + return + } //console.error(`${control} [TableViewDelegate.qml] hovered`) parent.ListView.view.currentIndex = index } From bb4c5d455058f3b4142ab86a6c4954a63cd984c7 Mon Sep 17 00:00:00 2001 From: Piotr Rozyczko Date: Thu, 9 Apr 2026 18:56:31 +0200 Subject: [PATCH 2/3] revert the footer fix --- src/EasyApp/Gui/Components/SideBar.qml | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/src/EasyApp/Gui/Components/SideBar.qml b/src/EasyApp/Gui/Components/SideBar.qml index 34bd0ae6..b4e31031 100644 --- a/src/EasyApp/Gui/Components/SideBar.qml +++ b/src/EasyApp/Gui/Components/SideBar.qml @@ -12,7 +12,6 @@ Item { property alias items: items.contentData property alias continueButton: continueButton - property Component footerComponent: null anchors.fill: parent @@ -31,7 +30,9 @@ Item { id: items anchors.top: tabs.bottom - anchors.bottom: footerLoader.top + anchors.bottom: continueButton.visible ? + continueButton.top: + sideBarContainer.bottom anchors.left: sideBarContainer.left anchors.right: sideBarContainer.right @@ -44,20 +45,6 @@ Item { } // Sidebar content - // Footer content (pinned above continue button) - Loader { - id: footerLoader - - active: sideBarContainer.footerComponent !== null - sourceComponent: sideBarContainer.footerComponent - - anchors.bottom: continueButton.visible ? continueButton.top : sideBarContainer.bottom - anchors.horizontalCenter: sideBarContainer.horizontalCenter - - anchors.bottomMargin: footerLoader.item ? 0.25 * EaStyle.Sizes.fontPixelSize : 0 - } - // Footer content - // Continue button EaElements.SideBarButton { id: continueButton @@ -77,7 +64,7 @@ Item { // Gradient area above button Rectangle { height: 1.25 * EaStyle.Sizes.fontPixelSize - anchors.bottom: footerLoader.top + anchors.bottom: continueButton.top anchors.left: sideBarContainer.left anchors.right: sideBarContainer.right From b7eeb01b6d4c81035e42183a7e8e2ce1f5f60b12 Mon Sep 17 00:00:00 2001 From: rozyczko Date: Mon, 27 Apr 2026 13:21:26 +0200 Subject: [PATCH 3/3] changes to resemble Ales' impl --- src/EasyApp/Gui/Components/TableView.qml | 26 ------------------- .../Gui/Components/TableViewDelegate.qml | 20 +++++++------- src/EasyApp/Gui/Elements/GroupBox.qml | 2 +- src/EasyApp/Gui/Elements/Slider.qml | 2 +- src/EasyApp/Gui/Style/Colors.qml | 4 +++ src/EasyApp/Logic/Maintenance.py | 8 +++--- src/EasyApp/Logic/Utils/Utils.py | 3 ++- 7 files changed, 22 insertions(+), 43 deletions(-) diff --git a/src/EasyApp/Gui/Components/TableView.qml b/src/EasyApp/Gui/Components/TableView.qml index c3d538ec..8901627b 100644 --- a/src/EasyApp/Gui/Components/TableView.qml +++ b/src/EasyApp/Gui/Components/TableView.qml @@ -37,16 +37,6 @@ ListView { onHeaderLabelItemsChanged: setWidthOfFlexibleColumnForHeader() onContentItemChildrenLengthChanged: widthAndAlignmentChangeTimer.start() - // Highlight current row - highlightMoveDuration: EaStyle.Sizes.tableHighlightMoveDuration - highlight: Rectangle { - z: 2 // To display highlight rect above delegate - color: mouseHoverHandler.hovered ? - EaStyle.Colors.tableHighlight : - "transparent" - Behavior on color { EaAnimations.ThemeChange {} } - } - // Empty header row //header: EaComponents.TableViewHeader {} @@ -84,22 +74,6 @@ ListView { interval: 10 onTriggered: setAllColumnsWidthAndAlignment() } - - // HoverHandler to react on hover events - // Hide current row highlight if table is not hovered - HoverHandler { - id: mouseHoverHandler - acceptedDevices: PointerDevice.AllDevices - blocking: false - onHoveredChanged: { - if (hovered) { - //console.error(`${listView} [TableView.qml] hovered`) - } - } - } - - // Logic - function flexibleColumnWidth() { let fixedColumnsWidth = 0 for (let item of headerLabelItems) { diff --git a/src/EasyApp/Gui/Components/TableViewDelegate.qml b/src/EasyApp/Gui/Components/TableViewDelegate.qml index ed574b7a..07093035 100644 --- a/src/EasyApp/Gui/Components/TableViewDelegate.qml +++ b/src/EasyApp/Gui/Components/TableViewDelegate.qml @@ -42,17 +42,17 @@ Rectangle { cursorShape: Qt.PointingHandCursor blocking: false onHoveredChanged: { - if (hovered) { - // Don't change current index while a text input is being edited, - // as this steals focus from the active editor - var fi = control.Window.activeFocusItem - if (fi && fi.activeFocus && fi.hasOwnProperty('cursorPosition')) { - return - } - //console.error(`${control} [TableViewDelegate.qml] hovered`) - parent.ListView.view.currentIndex = index - } + // Hover highlight is now handled by the Rectangle below, no currentIndex binding } } + // Hover tint + Rectangle { + anchors.fill: parent + color: EaStyle.Colors.tableHighlight + opacity: mouseHoverHandler.hovered ? 1 : 0 + Behavior on opacity { NumberAnimation { duration: EaStyle.Sizes.tableHighlightMoveDuration } } + Behavior on color { EaAnimations.ThemeChange {} } + } + } diff --git a/src/EasyApp/Gui/Elements/GroupBox.qml b/src/EasyApp/Gui/Elements/GroupBox.qml index 04ab6481..dd34b8ed 100644 --- a/src/EasyApp/Gui/Elements/GroupBox.qml +++ b/src/EasyApp/Gui/Elements/GroupBox.qml @@ -52,7 +52,7 @@ T.GroupBox { } // Collapse all other sidebar groups on this page for (const groupBox of parent.children) { - if (groupBox.toString().startsWith('GroupBox_QMLTYPE') && groupBox !== control) { // groupBox instanceof GroupBox doesn't work + if (groupBox !== control && typeof groupBox.collapsible !== 'undefined' && typeof groupBox.collapsed !== 'undefined') { if (groupBox.collapsible && !groupBox.collapsed) { groupBox.collapsed = true } diff --git a/src/EasyApp/Gui/Elements/Slider.qml b/src/EasyApp/Gui/Elements/Slider.qml index 9eac32ed..9a180e15 100644 --- a/src/EasyApp/Gui/Elements/Slider.qml +++ b/src/EasyApp/Gui/Elements/Slider.qml @@ -31,7 +31,7 @@ T.Slider { EaElements.ToolTip { id: toolTip - visible: slider.pressed || slider.hovered + visible: control.pressed || control.hovered //text: EaLogic.Utils.toDefaultPrecision(control.value) } } diff --git a/src/EasyApp/Gui/Style/Colors.qml b/src/EasyApp/Gui/Style/Colors.qml index b826ecf1..d238989a 100644 --- a/src/EasyApp/Gui/Style/Colors.qml +++ b/src/EasyApp/Gui/Style/Colors.qml @@ -47,6 +47,10 @@ QtObject { property color themeBackgroundHovered1: isDarkPalette ? "#353535" : "#fefefe" property color themeBackgroundHovered2: isDarkPalette ? "#3a3a3a" : "#f7f7f7" + property color themeRowHovered: isDarkPalette ? "#394247" : "#E6F5FC" + property color themeRowHighlight: isDarkPalette ? "#3A484F" : "#DCF0FA" + property color themeRowHighlightHovered: isDarkPalette ? "#3E5059" : "#C9E6F5" + property color themeForeground: isDarkPalette ? "#eee" : "#333" property color themeForegroundMinor: isDarkPalette ? "#888" : "#aaa" property color themeForegroundDisabled: isDarkPalette ? "#555": "#bbb" // control.Material.hintTextColor diff --git a/src/EasyApp/Logic/Maintenance.py b/src/EasyApp/Logic/Maintenance.py index 398e8b35..76aca379 100644 --- a/src/EasyApp/Logic/Maintenance.py +++ b/src/EasyApp/Logic/Maintenance.py @@ -46,7 +46,7 @@ def __init__(self, parent=None): @Slot() def checkUpdate(self): - console.debug(f"Updater checkUpdate called") + console.debug("Updater checkUpdate called") if self._process.state() == QProcess.Running: return @@ -59,7 +59,7 @@ def installUpdate(self): """ Start the external maintenance tool as detached process """ - console.debug(f"Updater installUpdate called") + console.debug("Updater installUpdate called") if self._process.state() == QProcess.Running: return @@ -134,7 +134,7 @@ def _onFinished(self, exit_code: int, exit_status: QProcess.ExitStatus): # Something went wrong if exit_code != 0 or exit_status != QProcess.ExitStatus.NormalExit: - console.debug(f"Updater process failed") + console.debug("Updater process failed") self._error_message = f"Updater process finished with\n* exit code: {exit_code} \n* exit status: {exit_status}" self.errorMessageChanged.emit() if not self.silentCheck: @@ -142,7 +142,7 @@ def _onFinished(self, exit_code: int, exit_status: QProcess.ExitStatus): return # Process finished succesfully - console.debug(f"Updater process succeeded; checking for updates...") + console.debug("Updater process succeeded; checking for updates...") # Check if a new version of any of the app component is found pattern = r'' diff --git a/src/EasyApp/Logic/Utils/Utils.py b/src/EasyApp/Logic/Utils/Utils.py index b33f88fd..4fb3ac34 100644 --- a/src/EasyApp/Logic/Utils/Utils.py +++ b/src/EasyApp/Logic/Utils/Utils.py @@ -1,4 +1,5 @@ -import os, sys +import os +import sys from urllib.parse import urlparse