use wrapper rect
This commit is contained in:
parent
112ed0d6de
commit
351fb82ac7
12 changed files with 75 additions and 91 deletions
|
|
@ -1,12 +1,9 @@
|
|||
import qs.config
|
||||
import QtQuick
|
||||
import Quickshell.Widgets
|
||||
|
||||
WrapperRectangle {
|
||||
id: root
|
||||
margin: 8
|
||||
Rectangle {
|
||||
radius: Styling.theme.radiusBox
|
||||
color: Styling.theme.base200
|
||||
color: Styling.theme.base100
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: Styling.animations.speed.normal
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import QtQuick
|
|||
import Quickshell.Widgets
|
||||
|
||||
WrapperRectangle {
|
||||
margin: 8
|
||||
radius: Styling.theme.radiusBox
|
||||
color: Styling.theme.base100
|
||||
Behavior on color {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ StyledWrapperRectangle {
|
|||
border.color: Styling.theme.base200
|
||||
|
||||
margin: 4
|
||||
color: Styling.theme.base100
|
||||
|
||||
RowLayout {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,10 @@
|
|||
import qs.components
|
||||
import Quickshell
|
||||
|
||||
StyledRectangle {
|
||||
StyledText {
|
||||
text: ` ${Qt.formatDateTime(clock.date, "hh:mm:ss AP")}`
|
||||
SystemClock {
|
||||
id: clock
|
||||
precision: SystemClock.Seconds
|
||||
}
|
||||
StyledText {
|
||||
text: ` ${Qt.formatDateTime(clock.date, "hh:mm:ss AP")}`
|
||||
SystemClock {
|
||||
id: clock
|
||||
precision: SystemClock.Seconds
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,20 +5,17 @@ import qs.utils
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
StyledRectangle {
|
||||
RowLayout {
|
||||
|
||||
RowLayout {
|
||||
Ref {
|
||||
service: SystemInfo
|
||||
}
|
||||
|
||||
Ref {
|
||||
service: SystemInfo
|
||||
}
|
||||
LucideIcon {
|
||||
text: Styling.lucide.icons.memoryStick
|
||||
}
|
||||
|
||||
LucideIcon {
|
||||
text: Styling.lucide.icons.memoryStick
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: ` ${(SystemInfo.memPerc * 100).toFixed()}%`
|
||||
}
|
||||
StyledText {
|
||||
text: ` ${(SystemInfo.memPerc * 100).toFixed()}%`
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,51 +5,48 @@ import qs.utils
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
StyledRectangle {
|
||||
RowLayout {
|
||||
|
||||
RowLayout {
|
||||
Ref {
|
||||
service: NetworkService
|
||||
}
|
||||
|
||||
Ref {
|
||||
service: NetworkService
|
||||
}
|
||||
|
||||
LucideIcon {
|
||||
id: icon
|
||||
text: Styling.lucide.icons.wifiOff
|
||||
states: [
|
||||
State {
|
||||
name: "high"
|
||||
when: NetworkService.active?.strength > 50
|
||||
PropertyChanges {
|
||||
icon {
|
||||
text: Styling.lucide.icons.wifi
|
||||
}
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "medium"
|
||||
when: NetworkService.active?.strength > 25
|
||||
PropertyChanges {
|
||||
icon {
|
||||
text: Styling.lucide.icons.wifiHigh
|
||||
}
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "low"
|
||||
when: NetworkService.active?.strength > 0
|
||||
PropertyChanges {
|
||||
icon {
|
||||
text: Styling.lucide.icons.wifiLow
|
||||
}
|
||||
LucideIcon {
|
||||
id: icon
|
||||
text: Styling.lucide.icons.wifiOff
|
||||
states: [
|
||||
State {
|
||||
name: "high"
|
||||
when: NetworkService.active?.strength > 50
|
||||
PropertyChanges {
|
||||
icon {
|
||||
text: Styling.lucide.icons.wifi
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "medium"
|
||||
when: NetworkService.active?.strength > 25
|
||||
PropertyChanges {
|
||||
icon {
|
||||
text: Styling.lucide.icons.wifiHigh
|
||||
}
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "low"
|
||||
when: NetworkService.active?.strength > 0
|
||||
PropertyChanges {
|
||||
icon {
|
||||
text: Styling.lucide.icons.wifiLow
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
StyledText {
|
||||
id: text
|
||||
text: ` ${(NetworkService.active?.strength ?? 0).toFixed()}%`
|
||||
}
|
||||
StyledText {
|
||||
id: text
|
||||
text: ` ${(NetworkService.active?.strength ?? 0).toFixed()}%`
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,22 +5,19 @@ import qs.utils
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
StyledRectangle {
|
||||
RowLayout {
|
||||
|
||||
RowLayout {
|
||||
Ref {
|
||||
service: SystemInfo
|
||||
}
|
||||
|
||||
Ref {
|
||||
service: SystemInfo
|
||||
}
|
||||
LucideIcon {
|
||||
text: Styling.lucide.icons.hardDrive
|
||||
}
|
||||
|
||||
LucideIcon {
|
||||
text: Styling.lucide.icons.hardDrive
|
||||
}
|
||||
StyledText {
|
||||
id: text
|
||||
|
||||
StyledText {
|
||||
id: text
|
||||
|
||||
text: ` ${(SystemInfo.storagePerc * 100).toFixed()}%`
|
||||
}
|
||||
text: ` ${(SystemInfo.storagePerc * 100).toFixed()}%`
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,20 +1,21 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
|
||||
import qs.components
|
||||
import qs.config
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Quickshell.Bluetooth
|
||||
import Quickshell.Widgets
|
||||
|
||||
StyledRectangle {
|
||||
StyledWrapperRectangle {
|
||||
id: root
|
||||
required property BluetoothDevice modelData
|
||||
|
||||
RowLayout {
|
||||
id: row
|
||||
|
||||
spacing: 8
|
||||
spacing: Styling.layout.spacing.base
|
||||
|
||||
Loader {
|
||||
active: root.modelData?.icon != undefined
|
||||
|
|
|
|||
|
|
@ -8,14 +8,14 @@ import Quickshell
|
|||
import Quickshell.Bluetooth
|
||||
import Quickshell.Widgets
|
||||
|
||||
StyledRectangle {
|
||||
StyledWrapperRectangle {
|
||||
id: root
|
||||
required property BluetoothDevice modelData
|
||||
|
||||
RowLayout {
|
||||
id: row
|
||||
|
||||
spacing: 8
|
||||
spacing: Styling.layout.spacing.base
|
||||
|
||||
Loader {
|
||||
active: root.modelData?.icon != undefined
|
||||
|
|
|
|||
|
|
@ -2,21 +2,20 @@ pragma ComponentBehavior: Bound
|
|||
|
||||
import qs.components
|
||||
import qs.config
|
||||
import qs.widgets
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Quickshell.Bluetooth
|
||||
import Quickshell.Widgets
|
||||
|
||||
StyledRectangle {
|
||||
StyledWrapperRectangle {
|
||||
id: root
|
||||
required property BluetoothDevice modelData
|
||||
|
||||
RowLayout {
|
||||
id: row
|
||||
|
||||
spacing: 8
|
||||
spacing: Styling.layout.spacing.base
|
||||
|
||||
Loader {
|
||||
active: root.modelData?.icon != undefined
|
||||
|
|
|
|||
|
|
@ -1,18 +1,16 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
|
||||
import qs.components
|
||||
import qs.widgets
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Quickshell.Widgets
|
||||
|
||||
StyledRectangle {
|
||||
StyledWrapperRectangle {
|
||||
id: root
|
||||
|
||||
required property var modelData
|
||||
|
||||
margin: 16
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
pragma ComponentBehavior: Bound
|
||||
|
||||
import qs.components
|
||||
import qs.config
|
||||
import qs.services
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
|
@ -25,9 +24,8 @@ StyledPopupWindow {
|
|||
onClicked: Notifications.clear()
|
||||
}
|
||||
|
||||
StyledRectangle {
|
||||
StyledWrapperRectangle {
|
||||
Layout.columnSpan: 2
|
||||
color: Styling.theme.base200
|
||||
StyledListView {
|
||||
id: notifications
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue