replace wraperRectangle with normal rectangle
This commit is contained in:
parent
bc0fab6cb0
commit
a62d313b29
9 changed files with 77 additions and 38 deletions
|
|
@ -6,13 +6,16 @@ import qs
|
|||
import qs.widgets
|
||||
import qs.settings
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
Rectangle {
|
||||
id: root
|
||||
required property double moduleHeight
|
||||
implicitHeight: moduleHeight
|
||||
implicitWidth: titleLayout.width + 32
|
||||
color: Colors.base01
|
||||
radius: Config.rounding
|
||||
leftMargin: 8
|
||||
rightMargin: 8
|
||||
child: RowLayout {
|
||||
RowLayout {
|
||||
id: titleLayout
|
||||
anchors.centerIn: root
|
||||
WrapperRectangle {
|
||||
Layout.maximumWidth: 400
|
||||
color: 'transparent'
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ Variants {
|
|||
delegate: WlrLayershell {
|
||||
id: root
|
||||
required property var modelData
|
||||
property double moduleHeight: implicitHeight - 8
|
||||
screen: modelData
|
||||
anchors {
|
||||
top: true
|
||||
|
|
@ -28,16 +29,21 @@ Variants {
|
|||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.leftMargin: 10
|
||||
Ws {
|
||||
moduleHeight: root.moduleHeight
|
||||
barScreen: root.modelData
|
||||
}
|
||||
ActiveWindow {}
|
||||
ActiveWindow {
|
||||
moduleHeight: root.moduleHeight
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
id: centerLayout
|
||||
anchors.centerIn: parent
|
||||
spacing: 5
|
||||
Clock {}
|
||||
Clock {
|
||||
moduleHeight: root.moduleHeight
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
|
|
@ -46,10 +52,18 @@ Variants {
|
|||
anchors.verticalCenter: parent.verticalCenter
|
||||
spacing: 5
|
||||
anchors.rightMargin: 10
|
||||
Mpris {}
|
||||
Bat {}
|
||||
Pw {}
|
||||
Tray {}
|
||||
Mpris {
|
||||
moduleHeight: root.moduleHeight
|
||||
}
|
||||
Bat {
|
||||
moduleHeight: root.moduleHeight
|
||||
}
|
||||
Pw {
|
||||
moduleHeight: root.moduleHeight
|
||||
}
|
||||
Tray {
|
||||
moduleHeight: root.moduleHeight
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,15 +6,16 @@ import qs
|
|||
import qs.widgets
|
||||
import qs.settings
|
||||
|
||||
WrapperRectangle {
|
||||
Rectangle {
|
||||
id: root
|
||||
clip: true
|
||||
color: Colors.base01
|
||||
property double percent: UPower.displayDevice.percentage * 100
|
||||
property bool hasBattery: UPower.displayDevice.isLaptopBattery
|
||||
property bool charging: UPower.displayDevice.state == UPowerDeviceState.Charging
|
||||
leftMargin: 8
|
||||
rightMargin: 8
|
||||
required property double moduleHeight
|
||||
implicitHeight: moduleHeight
|
||||
implicitWidth: batLayout.implicitWidth + 16
|
||||
radius: Config.rounding
|
||||
function batteryIcon(percent, charging) {
|
||||
if (percent <= 15)
|
||||
|
|
@ -31,7 +32,9 @@ WrapperRectangle {
|
|||
return charging ? "battery_charging_90" : "battery_6_bar";
|
||||
return charging ? "battery_charging_full" : "battery_full";
|
||||
}
|
||||
child: RowLayout {
|
||||
RowLayout {
|
||||
id: batLayout
|
||||
anchors.centerIn: root
|
||||
MaterialIcon {
|
||||
text: root.batteryIcon(root.percent, root.charging)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,18 +5,21 @@ import qs
|
|||
import qs.widgets
|
||||
import qs.settings
|
||||
|
||||
WrapperRectangle {
|
||||
Rectangle {
|
||||
id: root
|
||||
clip: true
|
||||
required property double moduleHeight
|
||||
implicitHeight: moduleHeight
|
||||
implicitWidth: clockText.implicitWidth + 32
|
||||
color: Colors.base01
|
||||
leftMargin: 8
|
||||
rightMargin: 8
|
||||
radius: Config.rounding
|
||||
SystemClock {
|
||||
id: clock
|
||||
precision: SystemClock.Seconds
|
||||
}
|
||||
child: StyledText {
|
||||
text: Qt.formatDateTime(clock.date, "d.M.yy - hh:mm")
|
||||
StyledText {
|
||||
id: clockText
|
||||
anchors.centerIn: root
|
||||
text: Qt.formatDateTime(clock.date, "d.M.yy - hh:mm")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,8 +6,11 @@ import qs
|
|||
import qs.widgets
|
||||
import qs.settings
|
||||
|
||||
WrapperRectangle {
|
||||
Rectangle {
|
||||
id: root
|
||||
required property double moduleHeight
|
||||
implicitHeight: moduleHeight
|
||||
implicitWidth: songLayout.implicitWidth + 32
|
||||
property MprisPlayer spotify: {
|
||||
for (const player of Mpris.players.values) {
|
||||
if (player.identity === "Spotify")
|
||||
|
|
@ -16,16 +19,18 @@ WrapperRectangle {
|
|||
return null;
|
||||
}
|
||||
visible: spotify !== null && spotify.playbackState === MprisPlaybackState.Playing
|
||||
leftMargin: 8
|
||||
rightMargin: 8
|
||||
clip: true
|
||||
color: Colors.base01
|
||||
radius: Config.rounding
|
||||
child: RowLayout {
|
||||
RowLayout {
|
||||
id: songLayout
|
||||
anchors.centerIn: root
|
||||
MaterialIcon {
|
||||
text: "music_note_2"
|
||||
}
|
||||
StyledText {
|
||||
Layout.maximumWidth: 400
|
||||
Layout.maximumHeight: Config.barHeight / 1.6
|
||||
text: root.spotify?.trackTitle + " - " + root.spotify?.trackArtists
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,14 +6,15 @@ import qs
|
|||
import qs.widgets
|
||||
import qs.settings
|
||||
|
||||
WrapperRectangle {
|
||||
Rectangle {
|
||||
id: root
|
||||
color: Colors.base01
|
||||
property PwNode defaultAudio: Pipewire.ready ? Pipewire.preferredDefaultAudioSink : null
|
||||
property bool mute: Pipewire.ready ? defaultAudio?.audio.muted : null
|
||||
radius: Config.rounding
|
||||
leftMargin: 8
|
||||
rightMargin: 8
|
||||
required property double moduleHeight
|
||||
implicitHeight: moduleHeight
|
||||
implicitWidth: pwLayout.implicitWidth + 16
|
||||
function getVolumeIcon() {
|
||||
let volume = Pipewire.ready ? root.defaultAudio.audio.volume : null;
|
||||
if (root.mute) {
|
||||
|
|
@ -32,7 +33,10 @@ WrapperRectangle {
|
|||
PwObjectTracker {
|
||||
objects: [Pipewire.ready ? Pipewire.defaultAudioSink : null]
|
||||
}
|
||||
child: RowLayout {
|
||||
|
||||
RowLayout {
|
||||
id: pwLayout
|
||||
anchors.centerIn: root
|
||||
spacing: 4
|
||||
MaterialIcon {
|
||||
text: root.getVolumeIcon()
|
||||
|
|
|
|||
|
|
@ -7,17 +7,19 @@ import QtQuick.Layouts
|
|||
import qs
|
||||
import qs.settings
|
||||
|
||||
WrapperRectangle {
|
||||
Rectangle {
|
||||
id: root
|
||||
color: Colors.base01
|
||||
visible: iconRepeater.count != 0
|
||||
radius: Config.rounding
|
||||
Layout.fillHeight: true
|
||||
leftMargin: 8
|
||||
rightMargin: 8
|
||||
required property double moduleHeight
|
||||
implicitHeight: moduleHeight
|
||||
implicitWidth: iconlayout.implicitWidth + 16
|
||||
|
||||
child: RowLayout {
|
||||
RowLayout {
|
||||
id: iconlayout
|
||||
anchors.centerIn: root
|
||||
Repeater {
|
||||
id: iconRepeater
|
||||
model: SystemTray.items
|
||||
|
|
|
|||
|
|
@ -8,22 +8,27 @@ import qs
|
|||
import qs.widgets
|
||||
import qs.settings
|
||||
|
||||
WrapperRectangle {
|
||||
Rectangle {
|
||||
id: root
|
||||
required property ShellScreen barScreen
|
||||
required property double moduleHeight
|
||||
property HyprlandMonitor hyprBarScreen: Hyprland.monitorFor(root.barScreen)
|
||||
radius: Config.rounding
|
||||
color: Colors.base01
|
||||
leftMargin: 8
|
||||
rightMargin: 8
|
||||
child: RowLayout {
|
||||
implicitWidth: wsLayout.implicitWidth + 32
|
||||
implicitHeight: moduleHeight
|
||||
|
||||
RowLayout {
|
||||
id: wsLayout
|
||||
anchors.centerIn: parent
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
spacing: 8
|
||||
Repeater {
|
||||
id: wsRepeater
|
||||
model: Hyprland.workspaces
|
||||
delegate: WrapperRectangle {
|
||||
id: wsWrapper
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
parent: wsLayout
|
||||
color: 'transparent'
|
||||
visible: modelData.monitor == root.hyprBarScreen
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[General]
|
||||
barHeight=34
|
||||
font=Maple Mono
|
||||
fontSize=16
|
||||
font=ProFont IIx Nerd Font
|
||||
fontSize=14
|
||||
opacity=0.5
|
||||
roudning=16
|
||||
roudning=20
|
||||
wallpaper=@Variant(\0\0\0\x11\0\0\0!file:///home/lucy/.wall/mooon.png)
|
||||
|
|
|
|||
Loading…
Reference in a new issue