mirror of
https://github.com/kossLAN/dots.git
synced 2025-11-05 06:59:50 -05:00
Initial commit
This commit is contained in:
commit
05cd51b54e
148 changed files with 10112 additions and 0 deletions
74
.stversions/bar/control/ControlButton~20250307-175400.qml
Normal file
74
.stversions/bar/control/ControlButton~20250307-175400.qml
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
96
.stversions/bar/control/ControlPanel~20250307-175400.qml
Normal file
96
.stversions/bar/control/ControlPanel~20250307-175400.qml
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
64
.stversions/bar/control/ControlSlider~20250307-175400.qml
Normal file
64
.stversions/bar/control/ControlSlider~20250307-175400.qml
Normal 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 { }
|
||||
}
|
||||
70
.stversions/bar/control/ControlVSlider~20250307-175400.qml
Normal file
70
.stversions/bar/control/ControlVSlider~20250307-175400.qml
Normal 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 { }
|
||||
}
|
||||
32
.stversions/bar/control/Control~20250307-175400.qml
Normal file
32
.stversions/bar/control/Control~20250307-175400.qml
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue