Adjust the shutdown dialog button UI

pull/9/head
reionwong 4 years ago
parent 98e36fdc63
commit e4225dc97b

@ -33,19 +33,6 @@ Item {
property bool checked: false property bool checked: false
signal clicked signal clicked
Rectangle {
anchors.fill: parent
color: "white"
opacity: mouseArea.pressed ? 0.1 : mouseArea.containsMouse || control.checked ? 0.2 : 0
radius: height / 2
Behavior on opacity {
NumberAnimation {
duration: 100
}
}
}
MouseArea { MouseArea {
id: mouseArea id: mouseArea
anchors.fill: parent anchors.fill: parent
@ -57,19 +44,40 @@ Item {
ColumnLayout { ColumnLayout {
id: layout id: layout
anchors.fill: parent anchors.fill: parent
spacing: FishUI.Units.largeSpacing spacing: FishUI.Units.largeSpacing * 1.5
Item { Item {
Layout.fillHeight: true Layout.fillHeight: true
} }
Image { Item {
id: image height: control.iconSize
source: control.icon Layout.fillWidth: true
sourceSize: Qt.size(width, height)
width: control.iconSize Rectangle {
height: width anchors.centerIn: parent
Layout.alignment: Qt.AlignCenter width: parent.height + FishUI.Units.largeSpacing * 2
height: parent.height + FishUI.Units.largeSpacing * 2
z: -1
color: "white"
opacity: mouseArea.pressed ? 0.1 : mouseArea.containsMouse || control.checked ? 0.2 : 0
radius: height / 2
Behavior on opacity {
NumberAnimation {
duration: 100
}
}
}
Image {
id: image
anchors.centerIn: parent
source: control.icon
sourceSize: Qt.size(width, height)
width: control.iconSize
height: width
}
} }
Label { Label {

@ -53,13 +53,13 @@ ApplicationWindow {
asynchronous: false asynchronous: false
clip: true clip: true
cache: false cache: false
smooth: true smooth: false
ColorOverlay { ColorOverlay {
anchors.fill: parent anchors.fill: parent
source: parent source: parent
color: "#000000" color: "#000000"
opacity: 0.5 opacity: 0.4
} }
} }

Loading…
Cancel
Save