fix: ui no longer blocks when volumes are unreachable + add support for network and fuse volumes
This commit is contained in:
+13
-12
@@ -124,7 +124,7 @@ MouseArea {
|
||||
model: root.items
|
||||
|
||||
CustomRect {
|
||||
id: item
|
||||
id: menuItem
|
||||
|
||||
readonly property bool active: modelData === root?.active
|
||||
required property int index
|
||||
@@ -142,13 +142,13 @@ MouseArea {
|
||||
}
|
||||
|
||||
StateLayer {
|
||||
color: item.active ? Colors.palette.m3onTertiaryContainer : Colors.palette.m3onSurface
|
||||
color: menuItem.active ? Colors.palette.m3onTertiaryContainer : Colors.palette.m3onSurface
|
||||
enabled: root.expanded
|
||||
|
||||
onClicked: {
|
||||
root.itemSelected(item.modelData);
|
||||
root.active = item.modelData;
|
||||
item.modelData.clicked();
|
||||
root.itemSelected(menuItem.modelData);
|
||||
root.active = menuItem.modelData;
|
||||
menuItem.modelData.clicked();
|
||||
root.expanded = false;
|
||||
}
|
||||
}
|
||||
@@ -162,26 +162,27 @@ MouseArea {
|
||||
|
||||
MaterialIcon {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
color: item.active ? Colors.palette.m3onTertiaryContainer : Colors.palette.m3onSurfaceVariant
|
||||
text: item.modelData?.icon ?? ""
|
||||
color: menuItem.active ? Colors.palette.m3onTertiaryContainer : Colors.palette.m3onSurfaceVariant
|
||||
text: menuItem.modelData?.icon ?? ""
|
||||
visible: text !== ""
|
||||
}
|
||||
|
||||
CustomText {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.fillWidth: true
|
||||
color: item.active ? Colors.palette.m3onTertiaryContainer : Colors.palette.m3onSurface
|
||||
text: item.modelData?.text ?? ""
|
||||
color: menuItem.active ? Colors.palette.m3onTertiaryContainer : Colors.palette.m3onSurface
|
||||
text: menuItem.modelData?.text ?? ""
|
||||
}
|
||||
|
||||
Loader {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
active: item.modelData?.trailingIcon.length > 0
|
||||
active: menuItem.modelData?.trailingIcon.length > 0
|
||||
asynchronous: true
|
||||
visible: active
|
||||
|
||||
sourceComponent: MaterialIcon {
|
||||
color: item.active ? Colors.palette.m3onTertiaryContainer : Colors.palette.m3onSurfaceVariant
|
||||
text: item.modelData.trailingIcon
|
||||
color: menuItem.active ? Colors.palette.m3onTertiaryContainer : Colors.palette.m3onSurfaceVariant
|
||||
text: menuItem.modelData.trailingIcon
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user