chore: init
This commit is contained in:
18
CONSTANTS.txt
Normal file
18
CONSTANTS.txt
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
1:1 dimensions + colors from deltarune in 1920x1080 fullscreen
|
||||||
|
|
||||||
|
top bar:
|
||||||
|
width: 1312px
|
||||||
|
height: 182px
|
||||||
|
|
||||||
|
text: #ffffff
|
||||||
|
|
||||||
|
option items:
|
||||||
|
selected: #ffc90e
|
||||||
|
unselected: #614e6b
|
||||||
|
gap: 76px
|
||||||
|
top: 45px
|
||||||
|
|
||||||
|
|
||||||
|
selection soul offset frop top left:
|
||||||
|
x: 19
|
||||||
|
y: 42
|
||||||
2
COPYRIGHT_NOTICE.txt
Normal file
2
COPYRIGHT_NOTICE.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Asset & Copyright Disclaimer
|
||||||
|
DELTARUNE, its trademark and all related assets are Copyright (c) Toby Fox.
|
||||||
69
DeltaruneQuickshell/DeltaruneTopbar.qml
Normal file
69
DeltaruneQuickshell/DeltaruneTopbar.qml
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
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", "./settings.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
DeltaruneQuickshell/border.png
Normal file
BIN
DeltaruneQuickshell/border.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
33
DeltaruneQuickshell/topbar/TopbarSettingIcon.qml
Normal file
33
DeltaruneQuickshell/topbar/TopbarSettingIcon.qml
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
import QtQuick
|
||||||
|
import Qt5Compat.GraphicalEffects
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: item
|
||||||
|
implicitWidth: 149
|
||||||
|
implicitHeight: 108
|
||||||
|
property url iconSource: "./settings.png"
|
||||||
|
property bool selected: false
|
||||||
|
readonly property color selectedColor: "#ffc90e"
|
||||||
|
readonly property color unselectedColor: "#614e6b"
|
||||||
|
state: selected ? "selected" : ""
|
||||||
|
|
||||||
|
Image {
|
||||||
|
id: originalImage
|
||||||
|
source: item.iconSource
|
||||||
|
}
|
||||||
|
|
||||||
|
ColorOverlay {
|
||||||
|
id: colorOverlay
|
||||||
|
anchors.fill: originalImage
|
||||||
|
source: originalImage
|
||||||
|
color: item.selected ? item.selectedColor : item.unselectedColor
|
||||||
|
}
|
||||||
|
|
||||||
|
Image {
|
||||||
|
id: soul
|
||||||
|
source: "./soul.png"
|
||||||
|
x: 19
|
||||||
|
y: 42
|
||||||
|
visible: item.selected
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
DeltaruneQuickshell/topbar/equip.png
Normal file
BIN
DeltaruneQuickshell/topbar/equip.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 63 KiB |
BIN
DeltaruneQuickshell/topbar/item.png
Normal file
BIN
DeltaruneQuickshell/topbar/item.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 63 KiB |
BIN
DeltaruneQuickshell/topbar/power.png
Normal file
BIN
DeltaruneQuickshell/topbar/power.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 63 KiB |
BIN
DeltaruneQuickshell/topbar/settings.png
Normal file
BIN
DeltaruneQuickshell/topbar/settings.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 63 KiB |
BIN
DeltaruneQuickshell/topbar/soul.png
Normal file
BIN
DeltaruneQuickshell/topbar/soul.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# DeltaruneQuickshell
|
||||||
|
|
||||||
|
A [Quickshell](https://quickshell.org/) shell inspired by Deltarune.
|
||||||
19
shell.qml
Normal file
19
shell.qml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
import Quickshell // for PanelWindow
|
||||||
|
import QtQuick // for Text
|
||||||
|
import "DeltaruneQuickshell"
|
||||||
|
|
||||||
|
PanelWindow {
|
||||||
|
anchors {
|
||||||
|
top: true
|
||||||
|
left: true
|
||||||
|
right: true
|
||||||
|
}
|
||||||
|
// exclusionMode:x ExclusionMode.Ignore
|
||||||
|
aboveWindows: true
|
||||||
|
focusable: false
|
||||||
|
|
||||||
|
implicitHeight: 182
|
||||||
|
color: "#000000"
|
||||||
|
|
||||||
|
DeltaruneTopbar {}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user