fix(StatusBaseButton): correct radius and icon size for `isRoundIcon` mode

- this fixes 2 small regressions, namely in how we calculate the
background corner radius and icon size when in the mode of `isRoundIcon`
- the "Saved addresses" button in wallet's left view is very special on
its own; overall we have only 2 instances of this "round" icon buttons
in the whole app

Fixes #16156
This commit is contained in:
Lukáš Tinkl 2024-08-20 13:30:45 +02:00 committed by Lukáš Tinkl
parent 08d8c9ebf2
commit f59ce285a9
4 changed files with 3 additions and 6 deletions

View File

@ -203,7 +203,6 @@ SplitView {
enabled: ctrlEnabled.checked
interactive: ctrlInteractive.checked
isRoundIcon: true
radius: height/2
textFillWidth: ctrlFillWidth.checked
}
}

View File

@ -3,6 +3,5 @@ import StatusQ.Controls 0.1
StatusButton {
isRoundIcon: true
radius: height/2
icon.name: "arrow-left"
}

View File

@ -50,7 +50,7 @@ Button {
property int borderWidth: 0
property bool textFillWidth: false
property int radius: isRoundIcon ? height/2 : size === StatusBaseButton.Size.Tiny ? 6 : 8
property int radius: isRoundIcon && d.iconOnly ? height/2 : size === StatusBaseButton.Size.Tiny ? 6 : 8
property int size: StatusBaseButton.Size.Large
property int type: StatusBaseButton.Type.Normal
@ -241,8 +241,8 @@ Button {
StatusRoundIcon {
asset.name: root.icon.name
asset.width: root.icon.width
asset.height: root.icon.height
asset.width: d.iconSize
asset.height: d.iconSize
asset.color: root.icon.color
asset.bgColor: root.asset.bgColor
}

View File

@ -13,7 +13,6 @@ StatusButton {
focusPolicy: Qt.NoFocus
isRoundIcon: true
radius: height/2
normalColor: Theme.palette.indirectColor3
disabledColor: normalColor
opacity: enabled ? 1 : 0.4