use RowLayout instead of Row
This commit is contained in:
parent
7d08bf3366
commit
7cf1650794
@ -1,6 +1,7 @@
|
|||||||
pragma ComponentBehavior: Bound
|
pragma ComponentBehavior: Bound
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
import qs
|
import qs
|
||||||
import qs.settings
|
import qs.settings
|
||||||
|
|
||||||
@ -32,9 +33,9 @@ Variants {
|
|||||||
color: Qt.rgba(Colors.surface.r, Colors.surface.g, Colors.surface.b, Settings.config.translucency)
|
color: Qt.rgba(Colors.surface.r, Colors.surface.g, Colors.surface.b, Settings.config.translucency)
|
||||||
radius: Settings.config.floating ? Settings.config.barHeight / 2 : 0
|
radius: Settings.config.floating ? Settings.config.barHeight / 2 : 0
|
||||||
|
|
||||||
Row {
|
RowLayout {
|
||||||
id: leftStuff
|
id: leftStuff
|
||||||
leftPadding: Settings.config.barHeight / 4
|
anchors.margins: Settings.config.barHeight / 4
|
||||||
spacing: 10
|
spacing: 10
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
@ -51,9 +52,9 @@ Variants {
|
|||||||
Clock {}
|
Clock {}
|
||||||
}
|
}
|
||||||
|
|
||||||
Row {
|
RowLayout {
|
||||||
id: rightStuff
|
id: rightStuff
|
||||||
rightPadding: Settings.config.barHeight / 4
|
anchors.margins: Settings.config.barHeight / 4
|
||||||
spacing: 10
|
spacing: 10
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|||||||
@ -11,7 +11,6 @@ import qs.settings
|
|||||||
Loader {
|
Loader {
|
||||||
id: batLoader
|
id: batLoader
|
||||||
active: UPower.displayDevice.isLaptopBattery
|
active: UPower.displayDevice.isLaptopBattery
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
|
|
||||||
sourceComponent: Rectangle {
|
sourceComponent: Rectangle {
|
||||||
id: container
|
id: container
|
||||||
|
|||||||
@ -13,7 +13,6 @@ Rectangle {
|
|||||||
color: "transparent"
|
color: "transparent"
|
||||||
implicitHeight: Settings.config.barHeight - 10
|
implicitHeight: Settings.config.barHeight - 10
|
||||||
implicitWidth: mainLayout.implicitWidth
|
implicitWidth: mainLayout.implicitWidth
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
|
|
||||||
// --- Logic Functions ---
|
// --- Logic Functions ---
|
||||||
function getIcon(device) {
|
function getIcon(device) {
|
||||||
|
|||||||
@ -8,7 +8,6 @@ Rectangle {
|
|||||||
id: root
|
id: root
|
||||||
radius: implicitHeight / 2
|
radius: implicitHeight / 2
|
||||||
color: pavuArea.containsMouse ? Colors.primaryContainer : Colors.surfaceContainer
|
color: pavuArea.containsMouse ? Colors.primaryContainer : Colors.surfaceContainer
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
implicitWidth: volumeIcon.implicitWidth + 10
|
implicitWidth: volumeIcon.implicitWidth + 10
|
||||||
implicitHeight: Settings.config.barHeight - 10
|
implicitHeight: Settings.config.barHeight - 10
|
||||||
CustomIcon {
|
CustomIcon {
|
||||||
|
|||||||
@ -8,7 +8,6 @@ Rectangle {
|
|||||||
id: container
|
id: container
|
||||||
radius: implicitHeight / 2
|
radius: implicitHeight / 2
|
||||||
color: Colors.surfaceContainer
|
color: Colors.surfaceContainer
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
implicitWidth: root.implicitWidth
|
implicitWidth: root.implicitWidth
|
||||||
implicitHeight: Settings.config.barHeight - 10
|
implicitHeight: Settings.config.barHeight - 10
|
||||||
Item {
|
Item {
|
||||||
|
|||||||
@ -10,7 +10,6 @@ Rectangle {
|
|||||||
id: root
|
id: root
|
||||||
radius: implicitHeight / 2
|
radius: implicitHeight / 2
|
||||||
color: pavuArea.containsMouse ? Colors.primaryContainer : Colors.surfaceContainer
|
color: pavuArea.containsMouse ? Colors.primaryContainer : Colors.surfaceContainer
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
implicitWidth: textRow.implicitWidth + 20
|
implicitWidth: textRow.implicitWidth + 20
|
||||||
implicitHeight: Settings.config.barHeight - 8
|
implicitHeight: Settings.config.barHeight - 8
|
||||||
property var sink: Pipewire.defaultAudioSink
|
property var sink: Pipewire.defaultAudioSink
|
||||||
|
|||||||
@ -12,7 +12,6 @@ Rectangle {
|
|||||||
implicitWidth: workspaceRow.implicitWidth + 10
|
implicitWidth: workspaceRow.implicitWidth + 10
|
||||||
implicitHeight: Settings.config.barHeight - 10
|
implicitHeight: Settings.config.barHeight - 10
|
||||||
radius: Settings.config.barHeight / 2
|
radius: Settings.config.barHeight / 2
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
property var screen: screen
|
property var screen: screen
|
||||||
Row {
|
Row {
|
||||||
id: workspaceRow
|
id: workspaceRow
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user