move notifications to top overlay
This commit is contained in:
parent
90b3cc22e2
commit
021c82f438
12 changed files with 106 additions and 172 deletions
|
|
@ -2,7 +2,7 @@ import Quickshell
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import qs.settings
|
||||
import qs.modules.applets
|
||||
import qs.widgets
|
||||
import qs
|
||||
|
||||
Variants {
|
||||
|
|
@ -19,13 +19,13 @@ Variants {
|
|||
|
||||
color: 'transparent'
|
||||
implicitHeight: Config.cfg.bar.height
|
||||
margins.top: Config.cfg.bar.floating ? 10 : 0
|
||||
margins.left: Config.cfg.bar.floating ? 10 : 0
|
||||
margins.right: Config.cfg.bar.floating ? 10 : 0
|
||||
margins.top: Config.cfg.bar.floating ?? 10
|
||||
margins.left: Config.cfg.bar.floating ?? 10
|
||||
margins.right: Config.cfg.bar.floating ?? 10
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: Colors.barBg
|
||||
radius: Config.cfg.bar.floating ? Config.cfg.appearance.rounding : 0
|
||||
radius: Config.cfg.bar.floating ?? Config.cfg.appearance.rounding
|
||||
RowLayout {
|
||||
anchors.leftMargin: 4
|
||||
anchors.left: parent.left
|
||||
|
|
@ -33,7 +33,9 @@ Variants {
|
|||
Ws {
|
||||
barScreen: root.modelData
|
||||
}
|
||||
ActiveWindow {screen: root.modelData}
|
||||
ActiveWindow {
|
||||
screen: root.modelData
|
||||
}
|
||||
}
|
||||
RowLayout {
|
||||
anchors.centerIn: parent
|
||||
|
|
@ -43,15 +45,46 @@ Variants {
|
|||
anchors.rightMargin: 4
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
Mpris {}
|
||||
Bat {}
|
||||
Tray {}
|
||||
WallPickerButton {barScreen: root.modelData}
|
||||
|
||||
Pw {
|
||||
Mpris {
|
||||
id: mpris
|
||||
}
|
||||
StyledText {
|
||||
text: "|"
|
||||
visible: mpris.visible
|
||||
}
|
||||
Bat {
|
||||
id: bat
|
||||
|
||||
}
|
||||
StyledText {
|
||||
text: "|"
|
||||
visible: bat.visible
|
||||
}
|
||||
Tray {
|
||||
id: tray
|
||||
}
|
||||
StyledText {
|
||||
text: "|"
|
||||
visible: tray.visible
|
||||
}
|
||||
WallPickerButton {
|
||||
id: wpButton
|
||||
barScreen: root.modelData
|
||||
}
|
||||
Netstatus {}
|
||||
StyledText {
|
||||
text: "|"
|
||||
}
|
||||
|
||||
Pw {
|
||||
id: pw
|
||||
barScreen: root.modelData
|
||||
}
|
||||
StyledText {
|
||||
text: "|"
|
||||
}
|
||||
Netstatus {
|
||||
id: net
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,25 +11,17 @@ BarComponent {
|
|||
required property ShellScreen barScreen
|
||||
implicitWidth: wsLayout.implicitWidth
|
||||
RowLayout {
|
||||
|
||||
id: wsLayout
|
||||
anchors.centerIn: parent
|
||||
spacing: 0
|
||||
spacing: 4
|
||||
Repeater {
|
||||
model: WindowManager.screenProjection(root.barScreen).windowsets
|
||||
delegate: BarComponent {
|
||||
id: wsContainer
|
||||
required property var modelData
|
||||
visible: modelData.shouldDisplay
|
||||
implicitWidth: modelData.active ? root.implicitHeight * 2.2 : root.implicitHeight
|
||||
implicitWidth: root.implicitHeight / 1.5
|
||||
implicitHeight: implicitWidth
|
||||
color: modelData.active ? Colors.accent : 'transparent'
|
||||
Behavior on implicitWidth {
|
||||
PropertyAnimation {
|
||||
duration: 350
|
||||
easing.type: Easing.InOutBack
|
||||
easing.overshoot: 1.2
|
||||
}
|
||||
}
|
||||
MouseArea {
|
||||
id: clickHandler
|
||||
anchors.fill: parent
|
||||
|
|
@ -41,7 +33,8 @@ BarComponent {
|
|||
id: wsText
|
||||
anchors.centerIn: parent
|
||||
text: parent.modelData.name
|
||||
color: parent.modelData.active ? Colors.base00 : Colors.text
|
||||
color: parent.modelData.shouldDisplay ? parent.modelData.active ? Colors.base00 : Colors.base05 : Colors.base03
|
||||
font.bold: parent.modelData.active
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue