bar: better colours
This commit is contained in:
parent
4ca23da8e1
commit
9f55a6d0aa
9 changed files with 7 additions and 30 deletions
|
|
@ -8,7 +8,6 @@ Singleton {
|
||||||
|
|
||||||
readonly property Sizes sizes: Sizes {}
|
readonly property Sizes sizes: Sizes {}
|
||||||
readonly property Workspaces workspaces: Workspaces {}
|
readonly property Workspaces workspaces: Workspaces {}
|
||||||
readonly property Tray tray: Tray {}
|
|
||||||
|
|
||||||
component Sizes: QtObject {
|
component Sizes: QtObject {
|
||||||
property int innerHeight: 30
|
property int innerHeight: 30
|
||||||
|
|
@ -25,8 +24,4 @@ Singleton {
|
||||||
property string occupiedLabel: " "
|
property string occupiedLabel: " "
|
||||||
property string activeLabel: " "
|
property string activeLabel: " "
|
||||||
}
|
}
|
||||||
|
|
||||||
component Tray: QtObject {
|
|
||||||
property bool recolourIcons: false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property bool vertical: parent?.vertical ?? false
|
readonly property bool vertical: parent?.vertical ?? false
|
||||||
property color colour: Colours.palette.pink
|
property color colour: Colours.palette.m3primary
|
||||||
|
|
||||||
implicitWidth: child.implicitWidth
|
implicitWidth: child.implicitWidth
|
||||||
implicitHeight: child.implicitHeight
|
implicitHeight: child.implicitHeight
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property bool vertical: parent?.vertical ?? false
|
readonly property bool vertical: parent?.vertical ?? false
|
||||||
property color colour: Colours.palette.peach
|
property color colour: Colours.palette.m3tertiary
|
||||||
|
|
||||||
implicitWidth: vertical ? Math.max(icon.implicitWidth, text.implicitWidth) : icon.implicitWidth + text.implicitWidth + text.anchors.leftMargin
|
implicitWidth: vertical ? Math.max(icon.implicitWidth, text.implicitWidth) : icon.implicitWidth + text.implicitWidth + text.anchors.leftMargin
|
||||||
implicitHeight: vertical ? icon.implicitHeight + text.implicitHeight + text.anchors.topMargin : Math.max(icon.implicitHeight, text.implicitHeight)
|
implicitHeight: vertical ? icon.implicitHeight + text.implicitHeight + text.anchors.topMargin : Math.max(icon.implicitHeight, text.implicitHeight)
|
||||||
|
|
|
||||||
|
|
@ -7,5 +7,5 @@ StyledText {
|
||||||
text: Icons.osIcon
|
text: Icons.osIcon
|
||||||
font.pointSize: Appearance.font.size.smaller
|
font.pointSize: Appearance.font.size.smaller
|
||||||
font.family: Appearance.font.family.mono
|
font.family: Appearance.font.family.mono
|
||||||
color: Colours.palette.yellow
|
color: Colours.palette.m3tertiary
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property bool vertical: parent?.vertical ?? false
|
readonly property bool vertical: parent?.vertical ?? false
|
||||||
property color colour: Colours.palette.rosewater
|
property color colour: Colours.palette.m3secondary
|
||||||
|
|
||||||
clip: true
|
clip: true
|
||||||
implicitWidth: vertical ? Math.max(network.implicitWidth, bluetooth.implicitWidth, devices.implicitWidth) : network.implicitWidth + bluetooth.implicitWidth + bluetooth.anchors.leftMargin + (repeater.count > 0 ? devices.implicitWidth + devices.anchors.leftMargin : 0)
|
implicitWidth: vertical ? Math.max(network.implicitWidth, bluetooth.implicitWidth, devices.implicitWidth) : network.implicitWidth + bluetooth.implicitWidth + bluetooth.anchors.leftMargin + (repeater.count > 0 ? devices.implicitWidth + devices.anchors.leftMargin : 0)
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property bool vertical: parent?.vertical ?? false
|
readonly property bool vertical: parent?.vertical ?? false
|
||||||
property color colour: Colours.palette.lavender
|
|
||||||
|
|
||||||
clip: true
|
clip: true
|
||||||
visible: width > 0 && height > 0 // To avoid warnings about being visible with no size
|
visible: width > 0 && height > 0 // To avoid warnings about being visible with no size
|
||||||
|
|
@ -22,9 +21,7 @@ Item {
|
||||||
Repeater {
|
Repeater {
|
||||||
model: SystemTray.items
|
model: SystemTray.items
|
||||||
|
|
||||||
TrayItem {
|
TrayItem {}
|
||||||
colour: root.colour
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,11 @@ import Quickshell
|
||||||
import Quickshell.Widgets
|
import Quickshell.Widgets
|
||||||
import Quickshell.Services.SystemTray
|
import Quickshell.Services.SystemTray
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Effects
|
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property SystemTrayItem modelData
|
required property SystemTrayItem modelData
|
||||||
required property color colour
|
|
||||||
|
|
||||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||||
implicitWidth: Appearance.font.size.small * 2
|
implicitWidth: Appearance.font.size.small * 2
|
||||||
|
|
@ -36,7 +34,6 @@ MouseArea {
|
||||||
IconImage {
|
IconImage {
|
||||||
id: icon
|
id: icon
|
||||||
|
|
||||||
visible: !BarConfig.tray.recolourIcons
|
|
||||||
source: {
|
source: {
|
||||||
let icon = root.modelData.icon;
|
let icon = root.modelData.icon;
|
||||||
if (icon.includes("?path=")) {
|
if (icon.includes("?path=")) {
|
||||||
|
|
@ -48,15 +45,4 @@ MouseArea {
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
}
|
}
|
||||||
|
|
||||||
Loader {
|
|
||||||
anchors.fill: icon
|
|
||||||
active: BarConfig.tray.recolourIcons
|
|
||||||
asynchronous: true
|
|
||||||
|
|
||||||
sourceComponent: Colouriser {
|
|
||||||
source: icon
|
|
||||||
colorizationColor: root.colour
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,13 +27,14 @@ Rectangle {
|
||||||
implicitWidth: (vertical ? BarConfig.sizes.innerHeight : size) - 2
|
implicitWidth: (vertical ? BarConfig.sizes.innerHeight : size) - 2
|
||||||
implicitHeight: (vertical ? size : BarConfig.sizes.innerHeight) - 2
|
implicitHeight: (vertical ? size : BarConfig.sizes.innerHeight) - 2
|
||||||
radius: BarConfig.workspaces.rounded ? Appearance.rounding.full : 0
|
radius: BarConfig.workspaces.rounded ? Appearance.rounding.full : 0
|
||||||
|
color: Colours.palette.m3primary
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: base
|
id: base
|
||||||
|
|
||||||
visible: false
|
visible: false
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: Colours.on(root.color)
|
color: Colours.palette.m3onPrimary
|
||||||
|
|
||||||
Behavior on color {
|
Behavior on color {
|
||||||
ColorAnimation {
|
ColorAnimation {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property alias vertical: layout.vertical
|
property alias vertical: layout.vertical
|
||||||
property color colour: Colours.palette.mauve
|
|
||||||
|
|
||||||
readonly property list<Workspace> workspaces: layout.children.filter(c => c.isWorkspace).sort((w1, w2) => w1.ws - w2.ws)
|
readonly property list<Workspace> workspaces: layout.children.filter(c => c.isWorkspace).sort((w1, w2) => w1.ws - w2.ws)
|
||||||
readonly property var occupied: Hyprland.workspaces.values.reduce((acc, curr) => {
|
readonly property var occupied: Hyprland.workspaces.values.reduce((acc, curr) => {
|
||||||
|
|
@ -59,7 +58,6 @@ Item {
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
|
|
||||||
sourceComponent: ActiveIndicator {
|
sourceComponent: ActiveIndicator {
|
||||||
color: root.colour
|
|
||||||
vertical: root.vertical
|
vertical: root.vertical
|
||||||
workspaces: root.workspaces
|
workspaces: root.workspaces
|
||||||
mask: layout
|
mask: layout
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue