diff --git a/tests/ui/modules/Common/Colors.qml b/tests/ui/modules/Common/Colors.qml index a23b223ea..8e1d40e25 100644 --- a/tests/ui/modules/Common/Colors.qml +++ b/tests/ui/modules/Common/Colors.qml @@ -29,4 +29,8 @@ QtObject { property color q: '#E6E6E6' property color r: '#8F8F8F' + + property color s: '#D64D00' + + property color t: '#FF8600' } diff --git a/tests/ui/modules/Common/Menu/ActionMenu.qml b/tests/ui/modules/Common/Menu/ActionMenu.qml index 6f70d2a11..1e2e2db8a 100644 --- a/tests/ui/modules/Common/Menu/ActionMenu.qml +++ b/tests/ui/modules/Common/Menu/ActionMenu.qml @@ -22,7 +22,12 @@ ColumnLayout { model: entries Rectangle { - color: ActionMenuStyle.entry.color + color: mouseArea.pressed + ? ActionMenuStyle.entry.color.pressed + : (mouseArea.containsMouse + ? ActionMenuStyle.entry.color.hovered + : ActionMenuStyle.entry.color.normal + ) height: menu.entryHeight width: menu.entryWidth @@ -43,6 +48,8 @@ ColumnLayout { } MouseArea { + id: mouseArea + anchors.fill: parent hoverEnabled: true diff --git a/tests/ui/modules/Common/Popup/AbstractDropDownMenu.qml b/tests/ui/modules/Common/Popup/AbstractDropDownMenu.qml index 965be712c..a6c5a7138 100644 --- a/tests/ui/modules/Common/Popup/AbstractDropDownMenu.qml +++ b/tests/ui/modules/Common/Popup/AbstractDropDownMenu.qml @@ -42,6 +42,9 @@ Item { visible = true menuOpened() + + // Necessary to use `Keys.onEscapePressed`. + focus = true } function hideMenu () { diff --git a/tests/ui/modules/Common/Styles/Menu/ActionMenuStyle.qml b/tests/ui/modules/Common/Styles/Menu/ActionMenuStyle.qml index 064339f31..35a9ffac6 100644 --- a/tests/ui/modules/Common/Styles/Menu/ActionMenuStyle.qml +++ b/tests/ui/modules/Common/Styles/Menu/ActionMenuStyle.qml @@ -9,10 +9,15 @@ QtObject { property int spacing: 1 property QtObject entry: QtObject { - property color color: Colors.i property int leftMargin: 4 property int rightMargin: 4 + property QtObject color: QtObject { + property color hovered: Colors.s + property color normal: Colors.i + property color pressed: Colors.t + } + property QtObject text: QtObject { property color color: Colors.k property int fontSize: 8