Merge branch 'main' into feat/llm-chat-tab
C++ / fmt (pull_request) Failing after 6s
C++ / build (pull_request) Failing after 16s
C++ / clang-tidy (pull_request) Failing after 10s
JS/TS / fmt (pull_request) Successful in 14s
JS/TS / lint (pull_request) Successful in 8s
Python / static (pull_request) Successful in 29s
Rust / build (pull_request) Successful in 50s
Python / verify (pull_request) Successful in 1m37s
Rust / fmt (pull_request) Successful in 31s
Rust / clippy (pull_request) Successful in 49s
C++ / fmt (pull_request) Failing after 6s
C++ / build (pull_request) Failing after 16s
C++ / clang-tidy (pull_request) Failing after 10s
JS/TS / fmt (pull_request) Successful in 14s
JS/TS / lint (pull_request) Successful in 8s
Python / static (pull_request) Successful in 29s
Rust / build (pull_request) Successful in 50s
Python / verify (pull_request) Successful in 1m37s
Rust / fmt (pull_request) Successful in 31s
Rust / clippy (pull_request) Successful in 49s
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