formatter

This commit is contained in:
Zacharias-Brohn
2026-02-24 23:20:11 +01:00
parent 40cd984b6d
commit d56a0260fb
202 changed files with 15037 additions and 15352 deletions
+103 -100
View File
@@ -11,72 +11,75 @@ import qs.Modules.Network
import qs.Modules.UPower
Item {
id: root
id: root
required property Item wrapper
readonly property Popout currentPopout: content.children.find(c => c.shouldBeActive) ?? null
readonly property Item current: currentPopout?.item ?? null
readonly property Item current: currentPopout?.item ?? null
readonly property Popout currentPopout: content.children.find(c => c.shouldBeActive) ?? null
required property Item wrapper
implicitWidth: (currentPopout?.implicitWidth ?? 0) + 5 * 2
implicitHeight: (currentPopout?.implicitHeight ?? 0) + 5 * 2
implicitHeight: (currentPopout?.implicitHeight ?? 0) + 5 * 2
implicitWidth: (currentPopout?.implicitWidth ?? 0) + 5 * 2
Item {
id: content
Item {
id: content
anchors.fill: parent
anchors.fill: parent
Popout {
name: "audio"
sourceComponent: AudioPopup {
wrapper: root.wrapper
}
}
Popout {
name: "audio"
Popout {
name: "resources"
sourceComponent: ResourcePopout {
wrapper: root.wrapper
}
}
sourceComponent: AudioPopup {
wrapper: root.wrapper
}
}
Repeater {
model: ScriptModel {
values: [ ...SystemTray.items.values ]
}
Popout {
name: "resources"
Popout {
id: trayMenu
sourceComponent: ResourcePopout {
wrapper: root.wrapper
}
}
required property SystemTrayItem modelData
required property int index
Repeater {
model: ScriptModel {
values: [...SystemTray.items.values]
}
name: `traymenu${index}`
sourceComponent: trayMenuComponent
Popout {
id: trayMenu
Connections {
target: root.wrapper
required property int index
required property SystemTrayItem modelData
function onHasCurrentChanged(): void {
if ( root.wrapper.hasCurrent && trayMenu.shouldBeActive ) {
trayMenu.sourceComponent = null;
trayMenu.sourceComponent = trayMenuComponent;
}
}
}
name: `traymenu${index}`
sourceComponent: trayMenuComponent
Component {
id: trayMenuComponent
Connections {
function onHasCurrentChanged(): void {
if (root.wrapper.hasCurrent && trayMenu.shouldBeActive) {
trayMenu.sourceComponent = null;
trayMenu.sourceComponent = trayMenuComponent;
}
}
TrayMenuPopout {
popouts: root.wrapper
trayItem: trayMenu.modelData.menu
}
}
}
}
target: root.wrapper
}
Component {
id: trayMenuComponent
TrayMenuPopout {
popouts: root.wrapper
trayItem: trayMenu.modelData.menu
}
}
}
}
Popout {
name: "calendar"
sourceComponent: CalendarPopup {
wrapper: root.wrapper
}
@@ -86,8 +89,8 @@ Item {
name: "overview"
sourceComponent: OverviewPopout {
wrapper: root.wrapper
screen: root.wrapper.screen
wrapper: root.wrapper
}
}
@@ -106,63 +109,63 @@ Item {
wrapper: root.wrapper
}
}
}
}
component Popout: Loader {
id: popout
component Popout: Loader {
id: popout
required property string name
readonly property bool shouldBeActive: root.wrapper.currentName === name
required property string name
readonly property bool shouldBeActive: root.wrapper.currentName === name
anchors.top: parent.top
anchors.topMargin: 5
anchors.horizontalCenter: parent.horizontalCenter
active: false
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 5
opacity: 0
scale: 0.8
opacity: 0
scale: 0.8
active: false
states: State {
name: "active"
when: popout.shouldBeActive
states: State {
name: "active"
when: popout.shouldBeActive
PropertyChanges {
popout.active: true
popout.opacity: 1
popout.scale: 1
}
}
transitions: [
Transition {
from: "active"
to: ""
PropertyChanges {
popout.active: true
popout.opacity: 1
popout.scale: 1
}
}
SequentialAnimation {
Anim {
duration: MaterialEasing.expressiveEffectsTime
properties: "opacity,scale"
}
transitions: [
Transition {
from: "active"
to: ""
PropertyAction {
property: "active"
target: popout
}
}
},
Transition {
from: ""
to: "active"
SequentialAnimation {
Anim {
properties: "opacity,scale"
duration: MaterialEasing.expressiveEffectsTime
}
PropertyAction {
target: popout
property: "active"
}
}
},
Transition {
from: ""
to: "active"
SequentialAnimation {
PropertyAction {
property: "active"
target: popout
}
SequentialAnimation {
PropertyAction {
target: popout
property: "active"
}
Anim {
properties: "opacity,scale"
}
}
}
]
}
Anim {
properties: "opacity,scale"
}
}
}
]
}
}