mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-04 06:45:45 +02:00
context menu: fix colored items on menu regen
Change-Id: I59e68da48195292cbaa50021f0d677010ffb5a52
This commit is contained in:
parent
eea8e291d3
commit
da026ab226
1 changed files with 23 additions and 20 deletions
|
@ -39,9 +39,17 @@ MenuItem {
|
||||||
|
|
||||||
signal clicked
|
signal clicked
|
||||||
|
|
||||||
contentItem: Rectangle {
|
contentItem: AbstractButton {
|
||||||
id: menuItemContentRect
|
id: menuItemContentRect
|
||||||
|
|
||||||
|
background: Rectangle {
|
||||||
|
id: background
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.leftMargin: 1
|
||||||
|
anchors.rightMargin: 1
|
||||||
|
color: "transparent"
|
||||||
|
}
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
ResponsiveImage {
|
ResponsiveImage {
|
||||||
id: contextMenuItemImage
|
id: contextMenuItemImage
|
||||||
|
@ -75,7 +83,18 @@ MenuItem {
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
color: "transparent"
|
onReleased: menuItem.clicked()
|
||||||
|
|
||||||
|
states: [
|
||||||
|
State {
|
||||||
|
name: "hovered"; when: hovered
|
||||||
|
PropertyChanges { target: background; color: JamiTheme.hoverColor }
|
||||||
|
},
|
||||||
|
State {
|
||||||
|
name: "normal"; when: !hovered
|
||||||
|
PropertyChanges { target: background; color: "white" }
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
onIconSourceChanged: {
|
onIconSourceChanged: {
|
||||||
|
@ -85,6 +104,8 @@ MenuItem {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
highlighted: true
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
id: contextMenuBackgroundRect
|
id: contextMenuBackgroundRect
|
||||||
|
|
||||||
|
@ -98,24 +119,6 @@ MenuItem {
|
||||||
border.width: 0
|
border.width: 0
|
||||||
color: menuItem.down ? JamiTheme.normalButtonColor : "white"
|
color: menuItem.down ? JamiTheme.normalButtonColor : "white"
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
hoverEnabled: true
|
|
||||||
onPressed: {
|
|
||||||
contextMenuBackgroundRect.color = JamiTheme.pressColor
|
|
||||||
}
|
|
||||||
onReleased: {
|
|
||||||
contextMenuBackgroundRect.color = JamiTheme.normalButtonColor
|
|
||||||
menuItem.clicked()
|
|
||||||
}
|
|
||||||
onEntered: {
|
|
||||||
contextMenuBackgroundRect.color = JamiTheme.hoverColor
|
|
||||||
}
|
|
||||||
onExited: {
|
|
||||||
contextMenuBackgroundRect.color = "white"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
CustomBorder {
|
CustomBorder {
|
||||||
commonBorder: false
|
commonBorder: false
|
||||||
lBorderwidth: leftBorderWidth
|
lBorderwidth: leftBorderWidth
|
||||||
|
|
Loading…
Add table
Reference in a new issue