forked from Shinonome/dots-hyprland
waffles: polkit
This commit is contained in:
@@ -67,7 +67,7 @@ Button {
|
||||
}
|
||||
}
|
||||
|
||||
CloseButton {
|
||||
WindowCloseButton {
|
||||
id: closeButton
|
||||
}
|
||||
}
|
||||
@@ -91,46 +91,14 @@ Button {
|
||||
}
|
||||
}
|
||||
|
||||
component CloseButton: Button {
|
||||
id: reusableCloseButton
|
||||
component WindowCloseButton: CloseButton {
|
||||
visible: root.hovered
|
||||
Layout.leftMargin: 4
|
||||
implicitHeight: 30
|
||||
implicitWidth: 30
|
||||
radius: Looks.radius.large - root.padding
|
||||
onClicked: {
|
||||
root.toplevel.close();
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
z: 0
|
||||
color: "transparent"
|
||||
anchors.fill: closeButtonBg
|
||||
anchors.margins: -1
|
||||
opacity: closeButtonBg.opacity
|
||||
border.width: 1
|
||||
radius: closeButtonBg.radius + 1
|
||||
border.color: Looks.colors.bg2Border
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
id: closeButtonBg
|
||||
z: 1
|
||||
opacity: reusableCloseButton.hovered ? 1 : 0
|
||||
radius: Looks.radius.large - root.padding
|
||||
color: reusableCloseButton.pressed ? Looks.colors.dangerActive : Looks.colors.danger
|
||||
Behavior on opacity {
|
||||
animation: Looks.transition.opacity.createObject(this)
|
||||
}
|
||||
Behavior on color {
|
||||
animation: Looks.transition.color.createObject(this)
|
||||
}
|
||||
}
|
||||
|
||||
contentItem: FluentIcon {
|
||||
z: 2
|
||||
anchors.centerIn: parent
|
||||
icon: "dismiss"
|
||||
implicitSize: 10
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user