Put all the QML colors into a single standalone configurable file

This commit is contained in:
Tomas Rivera
2026-03-11 10:48:44 +01:00
parent 3bc27a2a4f
commit d374a70c9c
29 changed files with 112 additions and 883 deletions
+6 -5
View File
@@ -5,6 +5,7 @@ import QtQuick.Layouts
import Quickshell.Wayland
import "mpris" as Mpris
import "systray" as SysTray
import "../theme" as Theme
import ".."
PanelWindow {
@@ -32,7 +33,7 @@ PanelWindow {
}
exclusiveZone: 48
implicitHeight: 72
color: "transparent"
color: Theme.Colors.barColor1
mask: barRegion
Region {
@@ -61,12 +62,12 @@ PanelWindow {
implicitWidth: left.width + left.anchors.leftMargin + left.anchors.rightMargin
implicitHeight: left.height
color: "#3B253F"
color: Theme.Colors.barColor2
Rectangle {
z: -1
anchors.fill: parent
color: "#BE850E"
color: Theme.Colors.barColor3
anchors.margins: -4
}
Image {
@@ -112,12 +113,12 @@ PanelWindow {
implicitWidth: right.width + right.anchors.leftMargin + right.anchors.rightMargin
implicitHeight: right.height
color: "#3B253F"
color: Theme.Colors.barColor4
Rectangle {
z: -1
anchors.fill: parent
color: "#BE850E"
color: Theme.Colors.barColor5
anchors.margins: -4
}
Image {
-39
View File
@@ -1,39 +0,0 @@
import QtQuick
import QtQuick.Effects
import Quickshell
import Quickshell.Io
import QtQuick.Layouts
import "../launcher" as Launcher
MouseArea {
id: root
implicitWidth: 26
implicitHeight: 26
acceptedButtons: Qt.LeftButton
Image {
id: img
anchors.fill: parent
source: "../assets/chi-ro.png"
smooth: false
scale: Launcher.Controller.isOpen ? 0.8 : 1
Behavior on scale {
NumberAnimation {
duration: 70
}
}
}
MultiEffect {
source: img
anchors.fill: img
blur: 1.0
brightness: 0.3
blurEnabled: true
}
onPressed: () => {
Launcher.Controller.isOpen = true;
}
}
+3 -3
View File
@@ -2,7 +2,7 @@ import QtQuick
import QtQuick.Effects
import Quickshell.Services.UPower
import Qt5Compat.GraphicalEffects
import "../theme" as Theme
Item {
id: root
@@ -28,13 +28,13 @@ Item {
Rectangle {
id: progressBar
anchors.fill: parent
color: "black"
color: Theme.Colors.powerColor1
Rectangle {
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right
height: root.isLaptop ? root.percentage * parent.height : parent.height
color: root.isLaptop ? (root.isLow ? "red" : "#EEA939") : "#EEA939"
color: root.isLaptop ? (root.isLow ? Theme.Colors.powerColor2 : Theme.Colors.powerColor3) : Theme.Colors.powerColor4
}
visible: false
}
+3 -2
View File
@@ -1,6 +1,7 @@
import QtQuick
import QtQuick.Layouts
import Quickshell.Io
import "../theme" as Theme
import ".."
Text {
@@ -8,12 +9,12 @@ Text {
font.family: "BigBlueTermPlusNerdFont"
font.pointSize: 16
font.bold: true
color: "white"
color: Theme.Colors.timeColor1
opacity: 0.5
Process {
id: dateProc
command: ["date", "+%H:%M"]
command: ["date", "+%Y-%m-%d\(%a\)\ %T"]
running: true
stdout: SplitParser {
onRead: data => timetxt.text = data
+3 -2
View File
@@ -3,6 +3,7 @@ pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import Quickshell.Hyprland
import "../theme" as Theme
import "root:/"
Scope {
@@ -113,7 +114,7 @@ Scope {
//implicitWidth: Math.max(700, tooltipItem.largestAnimWidth) // max due to qtwayland glitches
//implicitHeight: Math.max(700, tooltipItem.largestAnimHeight) // max due to qtwayland glitches
visible: true
color: "transparent"
color: Theme.Colors.tooltipColor1
//color: "#20ff0000"
mask: Region {
@@ -154,7 +155,7 @@ Scope {
// bkg
Rectangle {
anchors.fill: parent
color: "#3B253F"
color: Theme.Colors.tooltipColor2
}
readonly property var targetWidth: shownItem?.implicitWidth ?? 0
+5 -4
View File
@@ -3,6 +3,7 @@ pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import Quickshell.Hyprland
import "../theme" as Theme
import "root:/"
Scope {
@@ -118,7 +119,7 @@ Scope {
return h;
}
visible: true
color: "transparent"
color: Theme.Colors.tooltipBackupColor1
//color: "#20ff0000"
mask: Region {
@@ -136,14 +137,14 @@ Scope {
}
/*Rectangle {
color: "#10ff0000"
color: Theme.Colors.tooltipBackupColor2
//y: tooltipItem.highestAnimY
height: tooltipItem.lowestAnimY - tooltipItem.highestAnimY
width: parent.width
}
Rectangle {
color: "#1000ff00"
color: Theme.Colors.tooltipBackupColor3
//y: tooltipItem.highestAnimY
height: popup.height
width: parent.width
@@ -173,7 +174,7 @@ Scope {
// bkg
Rectangle {
anchors.fill: parent
color: "red"
color: Theme.Colors.tooltipBackupColor4
}
readonly property var targetWidth: shownItem?.implicitWidth ?? 0
+5 -4
View File
@@ -6,6 +6,7 @@ import QtQuick.Controls
import Quickshell
import Quickshell.Services.Pipewire
import Quickshell.Widgets
import "../theme" as Theme
import "mpris"
MouseArea {
@@ -62,7 +63,7 @@ MouseArea {
anchor.window: root.bar
width: 200
height: 32
color: "#9B5B36"
color: Theme.Colors.volumeColor1
Connections {
target: root
function onXChanged() {
@@ -97,7 +98,7 @@ MouseArea {
implicitHeight: 16
width: slider.availableWidth
height: implicitHeight
color: "#824524"
color: Theme.Colors.volumeColor2
opacity: node.audio.muted ? 0.5 : 1
Rectangle {
@@ -106,7 +107,7 @@ MouseArea {
y: anchors.topMargin
width: slider.visualPosition * (parent.width - anchors.leftMargin - anchors.rightMargin)
height: parent.height - anchors.topMargin - anchors.bottomMargin
color: "#8D804B"
color: Theme.Colors.volumeColor3
}
}
@@ -116,7 +117,7 @@ MouseArea {
implicitWidth: 12
implicitHeight: 12
rotation: 45
color: "#8D804B"
color: Theme.Colors.volumeColor4
}
}
+2 -1
View File
@@ -4,6 +4,7 @@ import QtQuick
import QtQuick.Effects
import QtQuick.Layouts
import Quickshell.Hyprland
import "../theme" as Theme
MouseArea {
id: root
@@ -81,7 +82,7 @@ MouseArea {
anchors.fill: parent
anchors.margins: 2
radius: width / 2
color: wsItem.exists ? "#C0DB4C" : "#59622D"
color: wsItem.exists ? Theme.Colors.workspacesColor1 : Theme.Colors.workspacesColor2
}
Image {
anchors.fill: parent
+2 -1
View File
@@ -9,6 +9,7 @@ import Quickshell.Widgets
import Quickshell.Wayland
import Quickshell.Hyprland
import Quickshell.Services.Mpris
import "../../theme" as Theme
import "../.."
import ".."
@@ -148,7 +149,7 @@ MouseArea {
elide: Text.ElideRight
width: Math.min(parent.width - 20, implicitWidth)
font.family: "BigBlueTermPlusNerdFont"
color: "white"
color: Theme.Colors.playersLabel
}
}
}
@@ -1,5 +1,6 @@
import QtQuick
import QtQuick.Shapes
import "../../theme" as Theme
import "../.."
Rectangle {
@@ -7,7 +8,7 @@ Rectangle {
implicitHeight: 18
implicitWidth: 18
radius: 3
color: checkState == Qt.Checked ? "#C5E3EE" : "#90ACAD"
color: checkState == Qt.Checked ? Theme.Colors.menuCheckBoxChecked1 : Theme.Colors.menuCheckBoxChecked2
Shape {
visible: checkState == Qt.Checked
@@ -18,8 +19,8 @@ Rectangle {
ShapePath {
strokeWidth: 2
capStyle: ShapePath.RoundCap
joinStyle: ShapePath.RoundJoin
fillColor: "transparent"
joinStyle: ShapePath.RoundJoin
fillColor: Theme.Colors.menuCheckBoxShapePath
startX: start.x
startY: start.y
@@ -1,6 +1,7 @@
import QtQuick
import QtQuick.Shapes
import Quickshell
import "../../theme" as Theme
Item {
property bool expanded: false;
@@ -37,7 +38,7 @@ Item {
strokeWidth: 2
capStyle: ShapePath.RoundCap
joinStyle: ShapePath.MiterJoin
fillColor: "transparent"
fillColor: Theme.Colors.menuChildrenRevealerShapePath
startX: xStart
startY: yStart
+3 -2
View File
@@ -3,6 +3,7 @@ import QtQuick.Layouts
import Quickshell
import Quickshell.Widgets
import Quickshell.DBusMenu
import "../../theme" as Theme
import "../.."
MouseArea {
@@ -34,7 +35,7 @@ MouseArea {
anchors.fill: parent
visible: root.containsMouse || childrenRevealer.expanded
color: "#824524"
color: Theme.Colors.menuItemColor1
}
ColumnLayout {
id: row
@@ -71,7 +72,7 @@ MouseArea {
Text {
text: entry.text
color: entry.enabled ? "white" : "#bbbbbb"
color: entry.enabled ? Theme.Colors.menuItemColor2 : Theme.Colors.menuItemColor3
}
Item {
@@ -1,4 +1,5 @@
import QtQuick
import "../../theme" as Theme
import "../.."
Rectangle {
@@ -6,7 +7,7 @@ Rectangle {
implicitHeight: 18
implicitWidth: 18
radius: width / 2
color: checkState == Qt.Checked ? "#C5E3EE" : "#90ACAD"
color: checkState == Qt.Checked ? Theme.Colors.menuRadioButtonColor1 : Theme.Colors.menuRadioButtonColor2
Rectangle {
x: parent.width * 0.25
+2 -1
View File
@@ -1,6 +1,7 @@
import QtQuick
import QtQuick.Layouts
import Quickshell
import "../../theme" as Theme
ColumnLayout {
id: root
@@ -60,7 +61,7 @@ ColumnLayout {
property var separator: Component {
Rectangle {
color: "#824524"
color: Theme.Colors.menuViewColor
implicitHeight: 4
}
}
+3 -2
View File
@@ -5,6 +5,7 @@ import QtQuick.Layouts
import QtQuick.Effects
import Quickshell
import Quickshell.Services.SystemTray
import "../../theme" as Theme
import ".."
import "../.."
import "../../components"
@@ -121,11 +122,11 @@ Rectangle {
implicitWidth: Math.max(1, menuView.implicitWidth)
implicitHeight: Math.max(1, menuView.implicitHeight)
color: "transparent"
color: Theme.Colors.sysTrayColor1
Rectangle {
anchors.fill: parent
color: "#9B5B36"
color: Theme.Colors.sysTrayColor2
MenuView {
id: menuView
anchors.fill: parent