diff --git a/src/EasyApp/Gui/Components/TableView.qml b/src/EasyApp/Gui/Components/TableView.qml index 45dcd975..72e906ef 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 {} @@ -89,25 +79,12 @@ ListView { 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`) - } - } - } - // ScrollBar ScrollBar.vertical: EaElements.ScrollBar { - topInset: listView.headerItem ? listView.headerItem.height : 0 topPadding: topInset interactive: true + topInset: listView.headerItem ? listView.headerItem.height : 0 policy: ScrollBar.AsNeeded } diff --git a/src/EasyApp/Gui/Components/TableViewDelegate.qml b/src/EasyApp/Gui/Components/TableViewDelegate.qml index 38159068..07093035 100644 --- a/src/EasyApp/Gui/Components/TableViewDelegate.qml +++ b/src/EasyApp/Gui/Components/TableViewDelegate.qml @@ -42,11 +42,17 @@ Rectangle { cursorShape: Qt.PointingHandCursor blocking: false onHoveredChanged: { - if (hovered) { - //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/Style/Colors.qml b/src/EasyApp/Gui/Style/Colors.qml index 84cab14e..6fcb5843 100644 --- a/src/EasyApp/Gui/Style/Colors.qml +++ b/src/EasyApp/Gui/Style/Colors.qml @@ -48,6 +48,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 ? "#666": "#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 8013d303..698e76ec 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