refractor: DeltaruneQuickshell -> Shell

This commit is contained in:
2026-01-23 23:28:40 +02:00
parent 2c32b17b16
commit edb941fe90
22 changed files with 1 additions and 1 deletions

View File

@@ -0,0 +1,31 @@
import QtQuick
Item {
id: dialogboxroot
implicitHeight: 378
implicitWidth: 1334
readonly property int text_x: 350 - 275
readonly property int text_y: 55
readonly property int font_size: 48
property string text: "(The power of Hyprland shines within you...)"
Image {
source: "./frame.png"
}
Text {
text: dialogboxroot.text
font.family: "8-bit Operator+"
font.pixelSize: dialogboxroot.font_size
color: "#04047C"
x: dialogboxroot.text_x + 2
y: dialogboxroot.text_y + 2
}
Text {
text: dialogboxroot.text
font.family: "8-bit Operator+"
font.pixelSize: dialogboxroot.font_size
color: "#ffffff"
x: dialogboxroot.text_x
y: dialogboxroot.text_y
}
}

BIN
Shell/DialogBox/frame.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

View File

@@ -0,0 +1,11 @@
import QtQuick
Item {
implicitWidth: 479
implicitHeight: 137
anchors.centerIn: parent
Image {
anchors.centerIn: parent
source: "kris.png"
}
}

BIN
Shell/Healthbar/kris.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 257 KiB

View File

75
Shell/Topbar/Topbar.qml Normal file
View File

@@ -0,0 +1,75 @@
pragma ComponentBehavior: Bound
import QtQuick
import "topbar"
Item {
id: topbar
implicitWidth: 1312
implicitHeight: 182
anchors.centerIn: parent
property var iconSources: ["item.png", "equip.png", "power.png", "config.png"]
property int iconCount: iconSources.length
property int selectedIndex: 0
function moveSelection(delta) {
if (iconCount <= 0)
return;
selectedIndex = (selectedIndex + delta + iconCount) % iconCount;
}
onIconCountChanged: {
if (iconCount <= 0) {
selectedIndex = 0;
} else if (selectedIndex >= iconCount) {
selectedIndex = iconCount - 1;
}
}
DarkDollarsDisplay {}
Image {
source: "./topbar/setting_names/" + topbar.iconSources[topbar.selectedIndex]
}
FocusScope {
id: focusScope
focus: true
anchors.fill: parent
Keys.onLeftPressed: topbar.moveSelection(-1)
Keys.onRightPressed: topbar.moveSelection(1)
Component.onCompleted: forceActiveFocus()
Row {
id: iconRow
spacing: 76
anchors.horizontalCenter: parent.horizontalCenter
y: 45
Repeater {
model: topbar.iconSources
delegate: Item {
id: repeatitem
required property int index
width: 149
height: 108
TopbarSettingIcon {
anchors.centerIn: parent
selected: topbar.selectedIndex == repeatitem.index
iconSource: topbar.iconSources[repeatitem.index]
}
MouseArea {
anchors.fill: parent
onClicked: {
topbar.selectedIndex = repeatitem.index;
}
}
}
}
}
}
}

View File

@@ -0,0 +1,28 @@
import QtQuick
// import Quickshell
Item {
Text {
x: 1064 + 117
y: 37 + 9
color: "#ffffff"
text: "D$ 4294"
font.pixelSize: 64
font.family: "8bitoperator JVE"
}
// SystemClock {
// id: clock
// precision: SystemClock.Minutes
// }
// Text {
// x: 1064 + 117
// y: 37 + 9 + 64
// color: "#777777"
// text: Qt.formatDateTime(clock.date, "dd/MM - hh:mm")
// font.pixelSize: 32
// font.family: "8bitoperator JVE"
// }
}

View File

@@ -0,0 +1,34 @@
import QtQuick
import Qt5Compat.GraphicalEffects
Item {
id: item
implicitWidth: 149
implicitHeight: 108
property url iconSource: "settings.png"
property bool selected: false
property bool showSoul: true
readonly property color selectedColor: "#ffc90e"
readonly property color unselectedColor: "#614e6b"
state: selected ? "selected" : ""
Image {
id: originalImage
source: "./setting_icons/" + item.iconSource
}
ColorOverlay {
id: colorOverlay
anchors.fill: originalImage
source: originalImage
color: item.selected ? item.selectedColor : item.unselectedColor
}
Image {
id: soul
source: "./soul_small.png"
x: 19
y: 42
visible: item.showSoul && item.selected
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@@ -0,0 +1,47 @@
import Quickshell
import Quickshell.Wayland
import Quickshell.Io
import "DialogBox"
PanelWindow {
id: baseDialog
anchors {
bottom: true
}
property bool isOpen: false
property string text: "(The power of Hyprland\nshines within you.)"
WlrLayershell.layer: WlrLayer.Overlay
WlrLayershell.focusable: false
WlrLayershell.keyboardFocus: WlrKeyboardFocus.None
WlrLayershell.namespace: "deltarune-quickshell-dialogbox"
visible: isOpen
exclusionMode: ExclusionMode.Ignore
aboveWindows: true
focusable: false
mask: Region {}
implicitHeight: 378
implicitWidth: 1334 - 147
color: '#000000ff'
DialogBox {
text: baseDialog.text
}
IpcHandler {
target: "deltarune.dialog"
enabled: true
function open(): void {
baseDialog.isOpen = true;
}
function close(): void {
baseDialog.isOpen = false;
}
function setText(text: string): void {
baseDialog.text = text.replace("\\n", "\n");
}
}
}

View File

@@ -0,0 +1,26 @@
import Quickshell
import Quickshell.Wayland
import "Healthbar"
PanelWindow {
anchors {
left: true
right: true
bottom: true
}
WlrLayershell.layer: WlrLayer.Top
WlrLayershell.namespace: "deltarune-quickshell-bottom"
visible: true
exclusionMode: ExclusionMode.Ignore
aboveWindows: true
focusable: false
mask: Region {}
implicitHeight: 137
color: "#000000"
Healthbar {}
}

29
Shell/WLRLayerTopbar.qml Normal file
View File

@@ -0,0 +1,29 @@
import Quickshell
import Quickshell.Wayland
import "Topbar"
PanelWindow {
anchors {
top: true
left: true
right: true
}
WlrLayershell.layer: WlrLayer.Top
WlrLayershell.focusable: true
WlrLayershell.keyboardFocus: WlrKeyboardFocus.OnDemand
WlrLayershell.namespace: "deltarune-quickshell"
mask: Region {}
visible: true
exclusionMode: ExclusionMode.Ignore
aboveWindows: true
focusable: true
implicitHeight: 182
color: "#000000"
Topbar {}
}

BIN
Shell/border.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB