Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 1 addition & 24 deletions src/EasyApp/Gui/Components/TableView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}

Expand Down Expand Up @@ -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
}
Expand Down
14 changes: 10 additions & 4 deletions src/EasyApp/Gui/Components/TableViewDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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 {} }
}

}
2 changes: 1 addition & 1 deletion src/EasyApp/Gui/Elements/GroupBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 4 additions & 0 deletions src/EasyApp/Gui/Style/Colors.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/EasyApp/Logic/Maintenance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -134,15 +134,15 @@ 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:
self.updateFailed.emit()
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'<update.*version="([A-Za-z0-9.-]*)".*/>'
Expand Down
3 changes: 2 additions & 1 deletion src/EasyApp/Logic/Utils/Utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os, sys
import os
import sys
from urllib.parse import urlparse


Expand Down