removing BasicListItem and making a simple item instead
This commit is contained in:
parent
ad36b7b953
commit
4c5847c12f
1 changed files with 25 additions and 16 deletions
|
@ -141,7 +141,7 @@ Item {
|
||||||
|
|
||||||
keys: ["library","serviceitem"]
|
keys: ["library","serviceitem"]
|
||||||
|
|
||||||
Kirigami.BasicListItem {
|
Rectangle {
|
||||||
id: visServiceItem
|
id: visServiceItem
|
||||||
width: serviceDrop.width
|
width: serviceDrop.width
|
||||||
height: serviceDrop.height
|
height: serviceDrop.height
|
||||||
|
@ -149,14 +149,7 @@ Item {
|
||||||
horizontalCenter: parent.horizontalCenter
|
horizontalCenter: parent.horizontalCenter
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
label: name
|
color: {
|
||||||
trailing: Controls.Label {
|
|
||||||
text: type
|
|
||||||
color: Kirigami.Theme.disabledTextColor
|
|
||||||
}
|
|
||||||
hoverEnabled: false
|
|
||||||
supportsMouseEvents: false
|
|
||||||
backgroundColor: {
|
|
||||||
if (active)
|
if (active)
|
||||||
Kirigami.Theme.highlightColor;
|
Kirigami.Theme.highlightColor;
|
||||||
else if (selected)
|
else if (selected)
|
||||||
|
@ -166,12 +159,29 @@ Item {
|
||||||
else
|
else
|
||||||
Kirigami.Theme.backgroundColor;
|
Kirigami.Theme.backgroundColor;
|
||||||
}
|
}
|
||||||
textColor: {
|
|
||||||
if (selected ||
|
Controls.Label {
|
||||||
mouseHandler.containsMouse || active)
|
id: label
|
||||||
Kirigami.Theme.highlightedTextColor;
|
anchors.left: parent.left
|
||||||
else
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
Kirigami.Theme.textColor;
|
text: name
|
||||||
|
elide: Text.ElideRight
|
||||||
|
width: parent.width - trailing.width - 10
|
||||||
|
color: {
|
||||||
|
if (selected ||
|
||||||
|
mouseHandler.containsMouse || active)
|
||||||
|
Kirigami.Theme.highlightedTextColor;
|
||||||
|
else
|
||||||
|
Kirigami.Theme.textColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Controls.Label {
|
||||||
|
id: trailing
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
text: type
|
||||||
|
color: Kirigami.Theme.disabledTextColor
|
||||||
}
|
}
|
||||||
|
|
||||||
onYChanged: serviceItemList.updateDrag(Math.round(y));
|
onYChanged: serviceItemList.updateDrag(Math.round(y));
|
||||||
|
@ -255,7 +265,6 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Controls.Menu {
|
Controls.Menu {
|
||||||
id: rightClickMenu
|
id: rightClickMenu
|
||||||
x: mouseHandler.mouseX
|
x: mouseHandler.mouseX
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue