mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
qmlfmt with 4 space
This commit is contained in:
@@ -12,125 +12,127 @@ import qs.Services
|
||||
import qs.Widgets
|
||||
|
||||
DankPopout {
|
||||
id: processListPopout
|
||||
id: processListPopout
|
||||
|
||||
property var parentWidget: null
|
||||
property string triggerSection: "right"
|
||||
property var triggerScreen: null
|
||||
property var parentWidget: null
|
||||
property string triggerSection: "right"
|
||||
property var triggerScreen: null
|
||||
|
||||
function setTriggerPosition(x, y, width, section, screen) {
|
||||
triggerX = x
|
||||
triggerY = y
|
||||
triggerWidth = width
|
||||
triggerSection = section
|
||||
triggerScreen = screen
|
||||
}
|
||||
|
||||
function hide() {
|
||||
close()
|
||||
if (processContextMenu.visible)
|
||||
processContextMenu.close()
|
||||
}
|
||||
|
||||
function show() {
|
||||
open()
|
||||
}
|
||||
|
||||
popupWidth: 600
|
||||
popupHeight: 600
|
||||
triggerX: Screen.width - 600 - Theme.spacingL
|
||||
triggerY: Theme.barHeight - 4 + SettingsData.topBarSpacing + Theme.spacingXS
|
||||
triggerWidth: 55
|
||||
positioning: "center"
|
||||
WlrLayershell.namespace: "quickshell-processlist"
|
||||
screen: triggerScreen
|
||||
visible: shouldBeVisible
|
||||
shouldBeVisible: false
|
||||
|
||||
Ref {
|
||||
service: DgopService
|
||||
}
|
||||
|
||||
content: Component {
|
||||
Rectangle {
|
||||
id: processListContent
|
||||
|
||||
radius: Theme.cornerRadius
|
||||
color: Theme.popupBackground()
|
||||
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g,
|
||||
Theme.outline.b, 0.08)
|
||||
border.width: 1
|
||||
clip: true
|
||||
antialiasing: true
|
||||
smooth: true
|
||||
focus: true
|
||||
|
||||
Component.onCompleted: {
|
||||
if (processListPopout.shouldBeVisible)
|
||||
forceActiveFocus()
|
||||
}
|
||||
|
||||
Keys.onPressed: function (event) {
|
||||
if (event.key === Qt.Key_Escape) {
|
||||
processListPopout.close()
|
||||
event.accepted = true
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
function onShouldBeVisibleChanged() {
|
||||
if (processListPopout.shouldBeVisible)
|
||||
Qt.callLater(function () {
|
||||
processListContent.forceActiveFocus()
|
||||
})
|
||||
}
|
||||
target: processListPopout
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
anchors.margins: Theme.spacingL
|
||||
spacing: Theme.spacingL
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
height: systemOverview.height + Theme.spacingM * 2
|
||||
radius: Theme.cornerRadius
|
||||
color: Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g,
|
||||
Theme.surfaceVariant.b, 0.2)
|
||||
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g,
|
||||
Theme.outline.b, 0.08)
|
||||
border.width: 1
|
||||
|
||||
SystemOverview {
|
||||
id: systemOverview
|
||||
|
||||
anchors.centerIn: parent
|
||||
width: parent.width - Theme.spacingM * 2
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
radius: Theme.cornerRadius
|
||||
color: Qt.rgba(Theme.surfaceVariant.r, Theme.surfaceVariant.g,
|
||||
Theme.surfaceVariant.b, 0.1)
|
||||
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g,
|
||||
Theme.outline.b, 0.05)
|
||||
border.width: 1
|
||||
|
||||
ProcessListView {
|
||||
anchors.fill: parent
|
||||
anchors.margins: Theme.spacingS
|
||||
contextMenu: processContextMenu
|
||||
}
|
||||
}
|
||||
}
|
||||
function setTriggerPosition(x, y, width, section, screen) {
|
||||
triggerX = x
|
||||
triggerY = y
|
||||
triggerWidth = width
|
||||
triggerSection = section
|
||||
triggerScreen = screen
|
||||
}
|
||||
}
|
||||
|
||||
ProcessContextMenu {
|
||||
id: processContextMenu
|
||||
}
|
||||
}
|
||||
function hide() {
|
||||
close()
|
||||
if (processContextMenu.visible)
|
||||
processContextMenu.close()
|
||||
}
|
||||
|
||||
function show() {
|
||||
open()
|
||||
}
|
||||
|
||||
popupWidth: 600
|
||||
popupHeight: 600
|
||||
triggerX: Screen.width - 600 - Theme.spacingL
|
||||
triggerY: Theme.barHeight - 4 + SettingsData.topBarSpacing + Theme.spacingXS
|
||||
triggerWidth: 55
|
||||
positioning: "center"
|
||||
WlrLayershell.namespace: "quickshell-processlist"
|
||||
screen: triggerScreen
|
||||
visible: shouldBeVisible
|
||||
shouldBeVisible: false
|
||||
|
||||
Ref {
|
||||
service: DgopService
|
||||
}
|
||||
|
||||
content: Component {
|
||||
Rectangle {
|
||||
id: processListContent
|
||||
|
||||
radius: Theme.cornerRadius
|
||||
color: Theme.popupBackground()
|
||||
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g,
|
||||
Theme.outline.b, 0.08)
|
||||
border.width: 1
|
||||
clip: true
|
||||
antialiasing: true
|
||||
smooth: true
|
||||
focus: true
|
||||
|
||||
Component.onCompleted: {
|
||||
if (processListPopout.shouldBeVisible)
|
||||
forceActiveFocus()
|
||||
}
|
||||
|
||||
Keys.onPressed: function (event) {
|
||||
if (event.key === Qt.Key_Escape) {
|
||||
processListPopout.close()
|
||||
event.accepted = true
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
function onShouldBeVisibleChanged() {
|
||||
if (processListPopout.shouldBeVisible)
|
||||
Qt.callLater(function () {
|
||||
processListContent.forceActiveFocus()
|
||||
})
|
||||
}
|
||||
target: processListPopout
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
anchors.margins: Theme.spacingL
|
||||
spacing: Theme.spacingL
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
height: systemOverview.height + Theme.spacingM * 2
|
||||
radius: Theme.cornerRadius
|
||||
color: Qt.rgba(Theme.surfaceVariant.r,
|
||||
Theme.surfaceVariant.g,
|
||||
Theme.surfaceVariant.b, 0.2)
|
||||
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g,
|
||||
Theme.outline.b, 0.08)
|
||||
border.width: 1
|
||||
|
||||
SystemOverview {
|
||||
id: systemOverview
|
||||
|
||||
anchors.centerIn: parent
|
||||
width: parent.width - Theme.spacingM * 2
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
radius: Theme.cornerRadius
|
||||
color: Qt.rgba(Theme.surfaceVariant.r,
|
||||
Theme.surfaceVariant.g,
|
||||
Theme.surfaceVariant.b, 0.1)
|
||||
border.color: Qt.rgba(Theme.outline.r, Theme.outline.g,
|
||||
Theme.outline.b, 0.05)
|
||||
border.width: 1
|
||||
|
||||
ProcessListView {
|
||||
anchors.fill: parent
|
||||
anchors.margins: Theme.spacingS
|
||||
contextMenu: processContextMenu
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ProcessContextMenu {
|
||||
id: processContextMenu
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user