diff options
| author | AlexanderCurl <alexc@alexc.hu> | 2026-04-18 17:46:06 +0100 |
|---|---|---|
| committer | AlexanderCurl <alexc@alexc.hu> | 2026-04-18 17:46:06 +0100 |
| commit | 70ca3fef77ee8bdc6e3ac28589a6fa08c024cc69 (patch) | |
| tree | ab1123d4067c1b086dd6faa7ee4ea643236b565a /raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modules/ControlCenter/Widgets/ToggleButton.qml | |
| parent | 5d94c0a7d44a2255b81815a52a7056a94a39842d (diff) | |
| download | RaveOS-PKGBUILD-70ca3fef77ee8bdc6e3ac28589a6fa08c024cc69.tar.gz RaveOS-PKGBUILD-70ca3fef77ee8bdc6e3ac28589a6fa08c024cc69.zip | |
Replaced file structures for themes in the correct format
Diffstat (limited to 'raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modules/ControlCenter/Widgets/ToggleButton.qml')
| -rw-r--r-- | raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modules/ControlCenter/Widgets/ToggleButton.qml | 134 |
1 files changed, 0 insertions, 134 deletions
diff --git a/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modules/ControlCenter/Widgets/ToggleButton.qml b/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modules/ControlCenter/Widgets/ToggleButton.qml deleted file mode 100644 index b8adda8..0000000 --- a/raveos-theme/hyprland/theme-data/DankMaterialShell/quickshell/Modules/ControlCenter/Widgets/ToggleButton.qml +++ /dev/null @@ -1,134 +0,0 @@ -import QtQuick -import qs.Common -import qs.Widgets - -Rectangle { - id: root - - LayoutMirroring.enabled: I18n.isRtl - LayoutMirroring.childrenInherit: true - - property string iconName: "" - property string text: "" - property bool isActive: false - property bool enabled: true - property string secondaryText: "" - property real iconRotation: 0 - - signal clicked - signal iconRotationCompleted - - width: parent ? parent.width : 200 - height: 60 - radius: { - if (Theme.cornerRadius === 0) - return 0; - return isActive ? Theme.cornerRadius : Theme.cornerRadius + 4; - } - - readonly property color _tileBgActive: Theme.ccTileActiveBg - readonly property color _tileBgInactive: Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency) - readonly property color _tileRingActive: Theme.ccTileRing - - color: { - if (isActive) - return _tileBgActive; - const baseColor = mouseArea.containsMouse ? Theme.primaryPressed : _tileBgInactive; - return baseColor; - } - border.color: isActive ? _tileRingActive : Qt.rgba(Theme.outline.r, Theme.outline.g, Theme.outline.b, 0.08) - border.width: 0 - opacity: enabled ? 1.0 : 0.6 - - function hoverTint(base) { - const factor = 1.2; - return Theme.isLightMode ? Qt.darker(base, factor) : Qt.lighter(base, factor); - } - - readonly property color _containerBg: Theme.withAlpha(Theme.surfaceContainerHigh, Theme.popupTransparency) - - Rectangle { - anchors.fill: parent - radius: Theme.cornerRadius - color: mouseArea.containsMouse ? hoverTint(_containerBg) : Theme.withAlpha(_containerBg, 0) - opacity: mouseArea.containsMouse ? 0.08 : 0.0 - - Behavior on opacity { - NumberAnimation { - duration: Theme.shortDuration - } - } - } - - Row { - anchors.fill: parent - anchors.leftMargin: Theme.spacingL + 2 - anchors.rightMargin: Theme.spacingM - spacing: Theme.spacingM - - DankIcon { - name: root.iconName - size: Theme.iconSize - color: isActive ? Theme.ccTileActiveText : Theme.ccTileInactiveIcon - anchors.verticalCenter: parent.verticalCenter - rotation: root.iconRotation - onRotationCompleted: root.iconRotationCompleted() - } - - Item { - width: parent.width - Theme.iconSize - parent.spacing - height: parent.height - - Column { - anchors.left: parent.left - anchors.right: parent.right - anchors.verticalCenter: parent.verticalCenter - spacing: 2 - - StyledText { - width: parent.width - text: root.text - font.pixelSize: Theme.fontSizeMedium - color: isActive ? Theme.ccTileActiveText : Theme.surfaceText - font.weight: Font.Medium - elide: Text.ElideRight - wrapMode: Text.NoWrap - horizontalAlignment: Text.AlignLeft - } - - StyledText { - width: parent.width - text: root.secondaryText - font.pixelSize: Theme.fontSizeSmall - color: isActive ? Theme.ccTileActiveText : Theme.surfaceVariantText - visible: text.length > 0 - elide: Text.ElideRight - wrapMode: Text.NoWrap - horizontalAlignment: Text.AlignLeft - } - } - } - } - - DankRipple { - id: ripple - cornerRadius: root.radius - } - - MouseArea { - id: mouseArea - anchors.fill: parent - hoverEnabled: true - cursorShape: Qt.PointingHandCursor - enabled: root.enabled - onPressed: mouse => ripple.trigger(mouse.x, mouse.y) - onClicked: root.clicked() - } - - Behavior on radius { - NumberAnimation { - duration: Theme.shortDuration - easing.type: Theme.standardEasing - } - } -} |