This commit is contained in:
2026-02-06 22:10:20 -05:00
parent 125041f469
commit c170b3b20d

View File

@@ -57,9 +57,7 @@ TreeView {
indentation: 12 indentation: 12
background: Rectangle { background: Rectangle {
// TODO: Fix flickering from color transition on states here. color: "transparent"
color: (treeDelegate.index === fileSystemTreeView.lastIndex) ? RustColors.explorer_text_selected : (hoverHandler.hovered ? RustColors.explorer_hovered : "transparent")
opacity: hoverHandler.hovered ? 0.75 : 1.0
radius: 2.5 radius: 2.5
Behavior on color { Behavior on color {
@@ -128,6 +126,7 @@ TreeView {
switch (button) { switch (button) {
case Qt.LeftButton: case Qt.LeftButton:
fileSystemTreeView.toggleExpanded(treeDelegate.row); fileSystemTreeView.toggleExpanded(treeDelegate.row);
fileSystemTreeView.lastIndex = treeDelegate.index
// If this model item doesn't have children, it means it's // If this model item doesn't have children, it means it's
// representing a file. // representing a file.
if (!treeDelegate.hasChildren) if (!treeDelegate.hasChildren)