Improve button style

main
reionwong 4 years ago
parent cc40ade66f
commit 944da16ce3

@ -30,12 +30,15 @@ Item {
Rectangle { Rectangle {
id: _background id: _background
anchors.fill: parent anchors.centerIn: parent
radius: FishUI.Theme.smallRadius
width: control.width - radius
height: control.height - radius
color: !flat ? _mouseArea.pressed ? pressedColor : _mouseArea.containsMouse color: !flat ? _mouseArea.pressed ? pressedColor : _mouseArea.containsMouse
? hoveredColor : backgroundColor ? hoveredColor : backgroundColor
: _mouseArea.pressed ? flatPressedBg : _mouseArea.containsMouse : _mouseArea.pressed ? flatPressedBg : _mouseArea.containsMouse
? flatHoveredBg : flatBg ? flatHoveredBg : flatBg
opacity: !flat ? _mouseArea.pressed || _mouseArea.containsMouse ? 0.7 : 0.5 : 1.0 opacity: !flat ? _mouseArea.pressed || _mouseArea.containsMouse ? 0.6 : 0.7 : 1.0
} }
MouseArea { MouseArea {

@ -11,6 +11,7 @@ Item {
GridLayout { GridLayout {
id: _mainLayout id: _mainLayout
anchors.fill: parent anchors.fill: parent
anchors.margins: FishUI.Units.smallSpacing
columnSpacing: 1 columnSpacing: 1
rowSpacing: 1 rowSpacing: 1
columns: 4 columns: 4

Loading…
Cancel
Save