bar: move tray + recolour option
Option to recolour tray icons
This commit is contained in:
parent
d06451da94
commit
d0a61b9834
3 changed files with 27 additions and 16 deletions
|
|
@ -12,6 +12,7 @@ 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 {}
|
||||||
readonly property Presets presets: Presets {}
|
readonly property Presets presets: Presets {}
|
||||||
|
|
||||||
component Sizes: QtObject {
|
component Sizes: QtObject {
|
||||||
|
|
@ -27,6 +28,10 @@ Singleton {
|
||||||
readonly property bool occupiedBg: true
|
readonly property bool occupiedBg: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
component Tray: QtObject {
|
||||||
|
readonly property bool recolourIcons: false
|
||||||
|
}
|
||||||
|
|
||||||
component Preset: QtObject {
|
component Preset: QtObject {
|
||||||
required property string name
|
required property string name
|
||||||
required property int totalHeight
|
required property int totalHeight
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,25 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
Pill {
|
Pill {
|
||||||
|
anchors.right: rightPill.left
|
||||||
|
anchors.rightMargin: Appearance.padding.normal
|
||||||
|
|
||||||
|
Tray {
|
||||||
|
vertical: BarConfig.vertical
|
||||||
|
|
||||||
|
anchors.left: root.get(clock.right, undefined)
|
||||||
|
anchors.leftMargin: root.get(Appearance.padding.large, 0)
|
||||||
|
anchors.top: root.get(undefined, clock.bottom)
|
||||||
|
anchors.topMargin: root.get(0, Appearance.padding.large)
|
||||||
|
|
||||||
|
anchors.horizontalCenter: root.get(undefined, parent.horizontalCenter)
|
||||||
|
anchors.verticalCenter: root.get(parent.verticalCenter, undefined)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Pill {
|
||||||
|
id: rightPill
|
||||||
|
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
|
||||||
Clock {
|
Clock {
|
||||||
|
|
@ -68,11 +87,7 @@ Item {
|
||||||
anchors.verticalCenter: root.get(parent.verticalCenter, undefined)
|
anchors.verticalCenter: root.get(parent.verticalCenter, undefined)
|
||||||
}
|
}
|
||||||
|
|
||||||
Tray {
|
StatusIcons {
|
||||||
id: tray
|
|
||||||
|
|
||||||
vertical: BarConfig.vertical
|
|
||||||
|
|
||||||
anchors.left: root.get(clock.right, undefined)
|
anchors.left: root.get(clock.right, undefined)
|
||||||
anchors.leftMargin: root.get(Appearance.padding.large, 0)
|
anchors.leftMargin: root.get(Appearance.padding.large, 0)
|
||||||
anchors.top: root.get(undefined, clock.bottom)
|
anchors.top: root.get(undefined, clock.bottom)
|
||||||
|
|
@ -81,16 +96,6 @@ Item {
|
||||||
anchors.horizontalCenter: root.get(undefined, parent.horizontalCenter)
|
anchors.horizontalCenter: root.get(undefined, parent.horizontalCenter)
|
||||||
anchors.verticalCenter: root.get(parent.verticalCenter, undefined)
|
anchors.verticalCenter: root.get(parent.verticalCenter, undefined)
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusIcons {
|
|
||||||
anchors.left: root.get(tray.right, undefined)
|
|
||||||
anchors.leftMargin: root.get(Appearance.padding.large, 0)
|
|
||||||
anchors.top: root.get(undefined, tray.bottom)
|
|
||||||
anchors.topMargin: root.get(0, Appearance.padding.large)
|
|
||||||
|
|
||||||
anchors.horizontalCenter: root.get(undefined, parent.horizontalCenter)
|
|
||||||
anchors.verticalCenter: root.get(parent.verticalCenter, undefined)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,12 +43,13 @@ StyledRect {
|
||||||
IconImage {
|
IconImage {
|
||||||
id: icon
|
id: icon
|
||||||
|
|
||||||
visible: false
|
visible: !BarConfig.tray.recolourIcons
|
||||||
source: item.modelData.icon
|
source: item.modelData.icon
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
}
|
}
|
||||||
|
|
||||||
ColorOverlay {
|
ColorOverlay {
|
||||||
|
visible: BarConfig.tray.recolourIcons
|
||||||
anchors.fill: icon
|
anchors.fill: icon
|
||||||
source: icon
|
source: icon
|
||||||
color: Appearance.colours.lavender
|
color: Appearance.colours.lavender
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue