feat(StatusFlatRoundButton): introduce `highlighted` color for secondary type
Closes #245
This commit is contained in:
parent
193498815f
commit
58e8f1cd23
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue