extract Separator component from applet divider rectangles
This commit is contained in:
parent
2ec24e3075
commit
85e32dcd8c
8 changed files with 17 additions and 43 deletions
|
|
@ -201,13 +201,7 @@ Column {
|
|||
}
|
||||
}
|
||||
|
||||
// Separator
|
||||
Rectangle {
|
||||
width: parent.width - 16
|
||||
height: 1
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: S.Theme.base03
|
||||
}
|
||||
Separator {}
|
||||
|
||||
// Rate row
|
||||
InfoRow {
|
||||
|
|
|
|||
|
|
@ -149,13 +149,7 @@ Column {
|
|||
}
|
||||
}
|
||||
|
||||
// Process list separator
|
||||
Rectangle {
|
||||
width: root.width - 16
|
||||
height: 1
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: S.Theme.base03
|
||||
}
|
||||
Separator {}
|
||||
|
||||
Item {
|
||||
width: root.width
|
||||
|
|
|
|||
|
|
@ -113,12 +113,7 @@ Column {
|
|||
}
|
||||
|
||||
// VRAM section
|
||||
Rectangle {
|
||||
width: parent.width - 16
|
||||
height: 1
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: S.Theme.base03
|
||||
}
|
||||
Separator {}
|
||||
|
||||
Item {
|
||||
width: parent.width
|
||||
|
|
|
|||
|
|
@ -115,13 +115,7 @@ Column {
|
|||
InfoRow { label: "Available"; value: root._fmt(root.availGb) }
|
||||
InfoRow { label: "Total"; value: root._fmt(root.totalGb) }
|
||||
|
||||
// Process list separator
|
||||
Rectangle {
|
||||
width: root.width - 16
|
||||
height: 1
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: S.Theme.base03
|
||||
}
|
||||
Separator {}
|
||||
|
||||
Item {
|
||||
width: root.width
|
||||
|
|
|
|||
9
shell/applets/Separator.qml
Normal file
9
shell/applets/Separator.qml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import QtQuick
|
||||
import "../services" as S
|
||||
|
||||
Rectangle {
|
||||
width: (parent?.width ?? 16) - 16
|
||||
height: 1
|
||||
anchors.horizontalCenter: parent?.horizontalCenter
|
||||
color: S.Theme.base03
|
||||
}
|
||||
|
|
@ -200,11 +200,7 @@ Column {
|
|||
}
|
||||
|
||||
// Per-device breakdown
|
||||
Rectangle {
|
||||
width: root.width - 16
|
||||
height: 1
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: S.Theme.base03
|
||||
Separator {
|
||||
visible: root.devices.length > 0
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -105,12 +105,7 @@ Column {
|
|||
visible: root.sinkList.length > 1
|
||||
width: parent.width
|
||||
|
||||
Rectangle {
|
||||
width: parent.width - 16
|
||||
height: 1
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: S.Theme.base03
|
||||
}
|
||||
Separator {}
|
||||
|
||||
Text {
|
||||
width: parent.width
|
||||
|
|
@ -169,12 +164,8 @@ Column {
|
|||
}
|
||||
|
||||
// Streams section
|
||||
Rectangle {
|
||||
Separator {
|
||||
visible: root.streamList.length > 0
|
||||
width: parent.width - 16
|
||||
height: visible ? 1 : 0
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: S.Theme.base03
|
||||
}
|
||||
|
||||
Text {
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ InfoRow 1.0 InfoRow.qml
|
|||
MemoryApplet 1.0 MemoryApplet.qml
|
||||
MprisApplet 1.0 MprisApplet.qml
|
||||
NetworkApplet 1.0 NetworkApplet.qml
|
||||
Separator 1.0 Separator.qml
|
||||
NotifApplet 1.0 NotifApplet.qml
|
||||
TemperatureApplet 1.0 TemperatureApplet.qml
|
||||
VolumeApplet 1.0 VolumeApplet.qml
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue