RoundImageButton: add icon margins

pull/14/head
reionwong 5 years ago
parent 4766ef86c0
commit 7cd1c91c02

@ -30,7 +30,7 @@ FishUI.MenuPopupWindow {
Rectangle {
id: _background
anchors.fill: parent
color: FishUI.Theme.backgroundColor
color: FishUI.Theme.secondBackgroundColor
radius: windowHelper.compositing ? FishUI.Theme.hugeRadius : 0
opacity: windowHelper.compositing ? 0.6 : 1

@ -26,6 +26,7 @@ Item {
id: control
property var size: 32
property var iconMargins: 0
height: size
width: size
@ -56,6 +57,7 @@ Item {
id: image
objectName: "image"
anchors.fill: parent
anchors.margins: control.iconMargins
fillMode: Image.PreserveAspectFit
sourceSize: Qt.size(width, height)
cache: true

@ -296,7 +296,7 @@ Window {
}
Item {
width: FishUI.Units.smallSpacing
width: _header.spacing
}
}
}

@ -9,6 +9,13 @@ T.Button
implicitWidth: Math.max(background.implicitWidth, contentItem.implicitWidth + FishUI.Units.largeSpacing)
implicitHeight: background.implicitHeight
hoverEnabled: true
scale: control.pressed ? 0.95 : 1.0
Behavior on scale {
NumberAnimation {
duration: 100
}
}
property color hoveredColor: Qt.tint(FishUI.Theme.textColor, Qt.rgba(FishUI.Theme.backgroundColor.r,
FishUI.Theme.backgroundColor.g,

Loading…
Cancel
Save