diff --git a/sandbox/DemoApp.qml b/sandbox/DemoApp.qml index c8d84328..1973fa51 100644 --- a/sandbox/DemoApp.qml +++ b/sandbox/DemoApp.qml @@ -450,6 +450,9 @@ Rectangle { chatInfoButton.subTitle: "Community Chat" chatInfoButton.icon.color: Theme.palette.miscColor6 chatInfoButton.type: StatusChatInfoButton.Type.CommunityChat + + searchButton.onClicked: searchButton.highlighted = !searchButton.highlighted + membersButton.onClicked: membersButton.highlighted = !membersButton.highlighted } } } diff --git a/src/StatusQ/Controls/StatusFlatRoundButton.qml b/src/StatusQ/Controls/StatusFlatRoundButton.qml index 4e0056af..792d4593 100644 --- a/src/StatusQ/Controls/StatusFlatRoundButton.qml +++ b/src/StatusQ/Controls/StatusFlatRoundButton.qml @@ -78,6 +78,15 @@ Rectangle { return "transparent"; } } + + property color highlightedColor: { + switch(statusFlatRoundButton.type) { + case StatusFlatRoundButton.Type.Primary: + return Theme.palette.primaryColor3; + case StatusFlatRoundButton.Type.Secondary: + return Theme.palette.baseColor4; + } + } } implicitWidth: 44 @@ -86,8 +95,10 @@ Rectangle { color: { if (statusFlatRoundButton.enabled) { - return sensor.containsMouse || highlighted ? backgroundSettings.hoverColor - : backgroundSettings.color + if (sensor.containsMouse) { + return backgroundSettings.hoverColor + } + return highlighted ? backgroundSettings.highlightedColor : backgroundSettings.color } else { return backgroundSettings.disabledColor }