fix issue with vertical centering
This commit is contained in:
parent
49308bee1a
commit
5b3d05168a
@ -9,11 +9,11 @@ Rectangle {
|
|||||||
visible: root.spotify != null
|
visible: root.spotify != null
|
||||||
radius: implicitHeight / 2
|
radius: implicitHeight / 2
|
||||||
color: clickHandler.containsMouse ? Colors.color5 : Colors.color6
|
color: clickHandler.containsMouse ? Colors.color5 : Colors.color6
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
implicitWidth: root.implicitWidth + 20
|
implicitWidth: root.implicitWidth + 20
|
||||||
implicitHeight: Settings.config.barHeight - 10
|
implicitHeight: Settings.config.barHeight - 10
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
anchors.centerIn: parent
|
||||||
property var spotify: root.getSpotify()
|
property var spotify: root.getSpotify()
|
||||||
function getSpotify() {
|
function getSpotify() {
|
||||||
for (let i = 0; i < Mpris.players.values.length; i++) {
|
for (let i = 0; i < Mpris.players.values.length; i++) {
|
||||||
@ -23,11 +23,12 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
implicitWidth: statusRow.implicitWidth
|
implicitWidth: statusRow.implicitWidth
|
||||||
|
implicitHeight: statusRow.implicitHeight
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
id: statusRow
|
id: statusRow
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
property var combinedText: root.spotify != null ? root.spotify.trackArtist + " - " + root.spotify.trackTitle + " " : ""
|
property var combinedText: root.spotify != null ? root.spotify.trackArtist + " - " + root.spotify.trackTitle + " " : ""
|
||||||
property var status: root.spotify != null ? !root.spotify.isPlaying ? "play_arrow" : "pause" : ""
|
property var status: root.spotify != null ? !root.spotify.isPlaying ? "play_arrow" : "pause" : ""
|
||||||
CustomText {
|
CustomText {
|
||||||
|
|||||||
@ -13,9 +13,10 @@ Rectangle {
|
|||||||
implicitHeight: Settings.config.barHeight - 10
|
implicitHeight: Settings.config.barHeight - 10
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
anchors.centerIn: parent
|
||||||
readonly property var activeWindow: ToplevelManager.activeToplevel
|
readonly property var activeWindow: ToplevelManager.activeToplevel
|
||||||
implicitWidth: titleText.implicitWidth + 20
|
implicitWidth: titleText.implicitWidth + 20
|
||||||
implicitHeight: Settings.config.barHeight
|
implicitHeight: titleText.implicitHeight
|
||||||
CustomText {
|
CustomText {
|
||||||
id: titleText
|
id: titleText
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|||||||
@ -9,7 +9,8 @@ import qs.reusables
|
|||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
implicitWidth: workspaceRow.implicitWidth
|
implicitWidth: workspaceRow.implicitWidth
|
||||||
height: 30
|
implicitHeight: workspaceRow.implicitHeight
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
Row {
|
Row {
|
||||||
id: workspaceRow
|
id: workspaceRow
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
@ -18,9 +19,9 @@ Item {
|
|||||||
Repeater {
|
Repeater {
|
||||||
id: wsRepeater
|
id: wsRepeater
|
||||||
model: Hyprland.workspaces
|
model: Hyprland.workspaces
|
||||||
anchors.centerIn: parent
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: workspaceNumber
|
id: workspaceNumber
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
radius: 20
|
radius: 20
|
||||||
property bool isOnMon: {
|
property bool isOnMon: {
|
||||||
if (!modelData)
|
if (!modelData)
|
||||||
|
|||||||
@ -5,13 +5,12 @@ import Quickshell
|
|||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
|
|
||||||
Singleton {
|
Singleton {
|
||||||
|
|
||||||
id: settings
|
id: settings
|
||||||
property alias config: settingsAdapter
|
property alias config: settingsAdapter
|
||||||
onConfigChanged: {
|
onConfigChanged: {
|
||||||
console.log('config change detected, writing adapter');
|
console.log('config change detected, writing adapter');
|
||||||
settingsView.writeAdapter();
|
settingsView.writeAdapter();
|
||||||
}
|
}
|
||||||
FileView {
|
FileView {
|
||||||
id: settingsView
|
id: settingsView
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user