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