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 Layout.maximumWidth: root.width *.4
}, },
DisabledTooltipButton { StatusButton {
interactive: root.contextMenuEnabled interactive: root.contextMenuEnabled
tooltipText: root.tooltipTextWhenContextMenuDisabled tooltip.text: root.tooltipTextWhenContextMenuDisabled
buttonComponent: StatusRoundButton {
enabled: root.contextMenuEnabled
icon.name: ProfileUtils.visibilityIcon(root.showcaseVisibility) icon.name: ProfileUtils.visibilityIcon(root.showcaseVisibility)
width: 58 horizontalPadding: Style.current.halfPadding
height: 30 verticalPadding: 3
border.width: 1 Layout.preferredWidth: 72
border.color: Theme.palette.directColor7 Layout.preferredHeight: root.height/2
radius: 14 radius: height/2
highlighted: menuLoader.item && menuLoader.item.opened highlighted: menuLoader.item && menuLoader.item.opened
onClicked: { onClicked: {
menuLoader.active = true menuLoader.active = true
menuLoader.item.popup(width - menuLoader.item.width, height) 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 { ButtonGroup {
id: showcaseVisibilityGroup id: showcaseVisibilityGroup
@ -126,7 +133,6 @@ StatusDraggableListItem {
} }
} }
} }
}
] ]
Component { Component {