Initial commit

This commit is contained in:
kossLAN 2025-06-07 04:01:14 -04:00
commit 05cd51b54e
Signed by: kossLAN
SSH key fingerprint: SHA256:bdV0x+wdQHGJ6LgmstH3KV8OpWY+OOFmJcPcB0wQPV8
148 changed files with 10112 additions and 0 deletions

View file

@ -0,0 +1,74 @@
import QtQuick
import QtQuick.Layouts
import QtQuick.Effects
import Quickshell.Widgets
import "../.."
Item {
property string source;
property string text: "";
property string subText: "";
property real implicitSize; // icon implicit size
property real padding: 0;
property real radius: 5;
signal clicked();
id: root;
width: implicitSize*3;
height: implicitSize*1.25;
Rectangle {
id: iconBackground;
color: iconButton.containsMouse
? ShellGlobals.colors.innerHighlight
: ShellGlobals.colors.midlight;
border.color: iconButton.containsMouse
? ShellGlobals.colors.highlight
: ShellGlobals.colors.light;
radius: root.radius;
anchors.fill: parent;
RowLayout {
spacing: 5;
anchors {
fill: parent;
margins: root.padding;
}
IconImage {
id: iconImage;
implicitSize: root.implicitSize;
source: root.source;
}
ColumnLayout {
id: textLayout;
spacing: 3;
Layout.fillWidth: true;
Text {
text: root.text;
color: ShellGlobals.colors.text;
font.pointSize: 11;
font.bold: true;
visible: text.length > 0;
}
Text {
text: root.subText;
color: ShellGlobals.colors.text;
font.pointSize: 10;
visible: text.length > 0;
}
}
}
MouseArea {
id: iconButton;
hoverEnabled: true;
anchors.fill: parent;
onPressed: root.clicked();
}
}
}

View file

@ -0,0 +1,96 @@
import QtQuick
import QtQuick.Layouts
import Qt5Compat.GraphicalEffects
import Quickshell
import Quickshell.Io
import Quickshell.Services.UPower
import "../../widgets" as Widgets
import "../.."
PopupWindow {
id: root;
width: controlContainer.implicitWidth+25
height: controlContainer.implicitHeight+25
//width: 275;
//height: 400;
color: "transparent"
visible: controlContainer.opacity > 0;
function show(x, y) {
root.anchor.rect.x = x;
root.anchor.rect.y = y;
controlContainer.opacity = 1;
}
function hide() {
controlContainer.opacity = 0;
}
HoverHandler {
id: hoverHandler;
enabled: true;
acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad;
onHoveredChanged: {
if (hovered === false) {
hide();
}
}
}
Rectangle {
id: controlContainer;
color: ShellGlobals.colors.window;
radius: 5;
opacity: 0; // TODO: change to 0
layer.enabled: true;
layer.effect: DropShadow {
transparentBorder: true;
spread: 0.02;
samples: 25;
color: "#80000000";
}
implicitWidth: columnLayout.implicitWidth + 20 // Add margins
implicitHeight: columnLayout.implicitHeight + 20 // Add margins
anchors {
centerIn: parent;
margins: 5;
}
Behavior on opacity {
NumberAnimation {
duration: 300;
easing.type: Easing.OutCubic;
}
}
ColumnLayout {
id: columnLayout
spacing: 10;
anchors {
left: parent.left
right: parent.right
top: parent.top
bottom: parent.bottom
margins: 10 // Padding from the parent rectangle
}
RowLayout {
spacing: 10;
Rectangle {
width: 120;
height: 120;
}
Rectangle {
width: 120;
height: 120;
}
}
}
}
}

View file

@ -0,0 +1,64 @@
import QtQuick
import Qt5Compat.GraphicalEffects
import QtQuick.Controls
import Quickshell.Widgets
import "../.."
Slider {
id: slider;
from: 0;
to: 100;
value: 50;
background: Rectangle {
id: sliderContainer;
width: slider.availableWidth;
height: slider.availableHeight;
color: "#e0e0e0";
radius: 10;
layer.enabled: true
layer.effect: OpacityMask {
source: Rectangle {
width: sliderContainer.width;
height: sliderContainer.height;
radius: sliderContainer.radius;
color: "white";
}
maskSource: Rectangle {
width: sliderContainer.width;
height: sliderContainer.height;
radius: sliderContainer.radius;
color: "black";
}
}
Rectangle {
id: handle;
width: sliderContainer.width * (slider.value / slider.to);
height: sliderContainer.height;
color: ShellGlobals.colors.highlight;
Behavior on width {
NumberAnimation {
duration: 100;
easing.type: Easing.OutQuad;
}
}
}
//IconImage {
// implicitSize: 20;
// source: "root:resources/control/sleep.svg"
//
// anchors {
// verticalCenter: parent.verticalCenter;
// left: parent.left;
// leftMargin: 15;
// }
//}
}
handle: Item { }
}

View file

@ -0,0 +1,70 @@
import QtQuick
import Qt5Compat.GraphicalEffects
import QtQuick.Controls
import Quickshell.Widgets
import "../.."
Slider {
id: slider;
from: 0;
to: 100;
value: 50;
orientation: Qt.Vertical;
background: Rectangle {
id: sliderContainer;
width: slider.availableWidth;
height: slider.availableHeight;
color: "#e0e0e0";
radius: 10;
layer.enabled: true
layer.effect: OpacityMask {
source: Rectangle {
width: sliderContainer.width;
height: sliderContainer.height;
radius: sliderContainer.radius;
color: "white";
}
maskSource: Rectangle {
width: sliderContainer.width;
height: sliderContainer.height;
radius: sliderContainer.radius;
color: "black";
}
}
Rectangle {
id: handle;
width: sliderContainer.width;
height: sliderContainer.height * (slider.value / slider.to);
color: ShellGlobals.colors.highlight;
anchors {
bottom: sliderContainer.bottom;
horizontalCenter: sliderContainer.horizontalCenter;
}
Behavior on height {
NumberAnimation {
duration: 100;
easing.type: Easing.OutQuad;
}
}
}
//IconImage {
// implicitSize: 20;
// source: "root:resources/control/sleep.svg"
//
// anchors {
// verticalCenter: parent.verticalCenter;
// left: parent.left;
// leftMargin: 15;
// }
//}
}
handle: Item { }
}

View file

@ -0,0 +1,32 @@
import QtQuick
import Quickshell
import Quickshell.Widgets
import "../../widgets" as Widgets
import "../.."
Widgets.IconButton {
required property var bar;
id: root;
implicitSize: 20;
padding: 2;
source: "root:/resources/control/controls-button.svg";
onClicked: {
if (controlLoader.item.visible) {
controlLoader.item.hide();
} else {
controlLoader.item.show(-root.mapFromGlobal(0, 0).x, bar.height);
}
}
LazyLoader {
id: controlLoader;
loading: true;
ControlPanel {
id: controlPanel;
anchor.window: bar;
}
}
}