fix(Profile showcase): Update showcase visibility button UI

- correct width and radius
- correct padding
- remove border
- use a regular `StatusButton` instead of `DisabledTooltipButton` +
`StatusRoundButton`
- add the missing dropdown indicator

Fixes #13941
This commit is contained in:
Lukáš Tinkl 2024-03-12 16:52:02 +01:00 committed by Lukáš Tinkl
parent 2487963323
commit e5567d06f4
1 changed files with 61 additions and 55 deletions

View File

@ -62,22 +62,29 @@ StatusDraggableListItem {
Layout.maximumWidth: root.width *.4
},
DisabledTooltipButton {
StatusButton {
interactive: root.contextMenuEnabled
tooltipText: root.tooltipTextWhenContextMenuDisabled
buttonComponent: StatusRoundButton {
enabled: root.contextMenuEnabled
tooltip.text: root.tooltipTextWhenContextMenuDisabled
icon.name: ProfileUtils.visibilityIcon(root.showcaseVisibility)
width: 58
height: 30
border.width: 1
border.color: Theme.palette.directColor7
radius: 14
horizontalPadding: Style.current.halfPadding
verticalPadding: 3
Layout.preferredWidth: 72
Layout.preferredHeight: root.height/2
radius: height/2
highlighted: menuLoader.item && menuLoader.item.opened
onClicked: {
menuLoader.active = true
menuLoader.item.popup(width - menuLoader.item.width, height)
}
text: " " // NB to give the icon and indicator some even space
indicator: StatusIcon {
anchors.right: parent.right
anchors.rightMargin: parent.horizontalPadding
anchors.verticalCenter: parent.verticalCenter
icon: "chevron-down"
color: parent.interactive ? Theme.palette.primaryColor1 : Theme.palette.baseColor1
}
ButtonGroup {
id: showcaseVisibilityGroup
@ -126,7 +133,6 @@ StatusDraggableListItem {
}
}
}
}
]
Component {