use new styled popup window for tray item menu
This commit is contained in:
parent
7d7f7b9fd6
commit
875551777c
2 changed files with 9 additions and 66 deletions
|
|
@ -59,9 +59,9 @@ Scope {
|
|||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
// Tray {
|
||||
// anchors.verticalCenter: parent.verticalCenter
|
||||
// }
|
||||
Tray {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
|
|
|
|||
|
|
@ -6,72 +6,15 @@ import Quickshell
|
|||
import "../../../../../config/"
|
||||
import "../../../../../styled/"
|
||||
|
||||
PopupWindow {
|
||||
StyledPopupWindow {
|
||||
id: window
|
||||
|
||||
property QsMenuOpener menuOpener
|
||||
property bool opened: false
|
||||
|
||||
color: 'transparent'
|
||||
|
||||
implicitWidth: menu.width
|
||||
implicitHeight: menu.height
|
||||
|
||||
Rectangle {
|
||||
id: background
|
||||
|
||||
anchors.fill: menu
|
||||
color: Theme.palette.base300
|
||||
border.color: Theme.palette.base200
|
||||
border.width: 2
|
||||
backgroundColor: Theme.palette.base300
|
||||
radius: 8
|
||||
|
||||
opacity: 0
|
||||
property QsMenuOpener menuOpener
|
||||
|
||||
states: State {
|
||||
name: "opened"
|
||||
when: window.opened
|
||||
PropertyChanges {
|
||||
background {
|
||||
opacity: 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
transitions: [
|
||||
Transition {
|
||||
from: ""
|
||||
to: "opened"
|
||||
SequentialAnimation {
|
||||
ScriptAction {
|
||||
script: window.visible = true
|
||||
}
|
||||
NumberAnimation {
|
||||
property: "background.opacity"
|
||||
duration: 200
|
||||
}
|
||||
}
|
||||
},
|
||||
Transition {
|
||||
from: "opened"
|
||||
to: ""
|
||||
SequentialAnimation {
|
||||
PauseAnimation {
|
||||
duration: repeater.count * 15
|
||||
}
|
||||
NumberAnimation {
|
||||
property: "background.opacity"
|
||||
duration: 200
|
||||
}
|
||||
ScriptAction {
|
||||
script: window.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
content: ColumnLayout {
|
||||
id: menu
|
||||
|
||||
anchors.margins: 30
|
||||
|
|
@ -118,7 +61,7 @@ PopupWindow {
|
|||
to: "opened"
|
||||
SequentialAnimation {
|
||||
PauseAnimation {
|
||||
duration: 15 * loader.index
|
||||
duration: (repeater.count / root.animationDuration) * loader.index
|
||||
}
|
||||
NumberAnimation {
|
||||
property: "opacity"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue