controlcenter: converted taskbar panel to single pane view
This commit is contained in:
parent
f248051904
commit
2c91bde795
1 changed files with 449 additions and 563 deletions
|
|
@ -13,7 +13,7 @@ import Quickshell.Widgets
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
RowLayout {
|
||||
Item {
|
||||
id: root
|
||||
|
||||
required property Session session
|
||||
|
|
@ -49,8 +49,6 @@ RowLayout {
|
|||
|
||||
anchors.fill: parent
|
||||
|
||||
spacing: 0
|
||||
|
||||
Component.onCompleted: {
|
||||
// Update entries
|
||||
if (Config.bar.entries) {
|
||||
|
|
@ -120,43 +118,31 @@ RowLayout {
|
|||
id: entriesModel
|
||||
}
|
||||
|
||||
Item {
|
||||
id: leftTaskbarItem
|
||||
Layout.preferredWidth: Math.floor(parent.width * 0.4)
|
||||
Layout.minimumWidth: 420
|
||||
Layout.fillHeight: true
|
||||
|
||||
ClippingRectangle {
|
||||
id: leftTaskbarClippingRect
|
||||
id: taskbarClippingRect
|
||||
anchors.fill: parent
|
||||
anchors.margins: Appearance.padding.normal
|
||||
anchors.leftMargin: 0
|
||||
anchors.rightMargin: Appearance.padding.normal / 2
|
||||
|
||||
radius: leftTaskbarBorder.innerRadius
|
||||
radius: taskbarBorder.innerRadius
|
||||
color: "transparent"
|
||||
|
||||
Loader {
|
||||
id: leftTaskbarLoader
|
||||
id: taskbarLoader
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Appearance.padding.large + Appearance.padding.normal
|
||||
anchors.leftMargin: Appearance.padding.large
|
||||
anchors.rightMargin: Appearance.padding.large + Appearance.padding.normal / 2
|
||||
anchors.margins: Appearance.padding.large * 2
|
||||
|
||||
asynchronous: true
|
||||
sourceComponent: leftTaskbarContentComponent
|
||||
sourceComponent: taskbarContentComponent
|
||||
}
|
||||
}
|
||||
|
||||
InnerBorder {
|
||||
id: leftTaskbarBorder
|
||||
leftThickness: 0
|
||||
rightThickness: Appearance.padding.normal / 2
|
||||
id: taskbarBorder
|
||||
}
|
||||
|
||||
Component {
|
||||
id: leftTaskbarContentComponent
|
||||
id: taskbarContentComponent
|
||||
|
||||
StyledFlickable {
|
||||
id: sidebarFlickable
|
||||
|
|
@ -621,103 +607,3 @@ RowLayout {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
id: rightTaskbarItem
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
|
||||
ClippingRectangle {
|
||||
id: rightTaskbarClippingRect
|
||||
anchors.fill: parent
|
||||
anchors.margins: Appearance.padding.normal
|
||||
anchors.leftMargin: 0
|
||||
anchors.rightMargin: Appearance.padding.normal / 2
|
||||
|
||||
radius: rightTaskbarBorder.innerRadius
|
||||
color: "transparent"
|
||||
|
||||
Loader {
|
||||
id: rightTaskbarLoader
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.margins: Appearance.padding.large * 2
|
||||
|
||||
asynchronous: true
|
||||
sourceComponent: rightTaskbarContentComponent
|
||||
}
|
||||
}
|
||||
|
||||
InnerBorder {
|
||||
id: rightTaskbarBorder
|
||||
|
||||
leftThickness: Appearance.padding.normal / 2
|
||||
}
|
||||
|
||||
Component {
|
||||
id: rightTaskbarContentComponent
|
||||
|
||||
StyledFlickable {
|
||||
flickableDirection: Flickable.VerticalFlick
|
||||
contentHeight: contentLayout.height
|
||||
|
||||
StyledScrollBar.vertical: StyledScrollBar {
|
||||
flickable: parent
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: contentLayout
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
|
||||
spacing: Appearance.spacing.normal
|
||||
|
||||
MaterialIcon {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: "task_alt"
|
||||
font.pointSize: Appearance.font.size.extraLarge * 3
|
||||
font.bold: true
|
||||
}
|
||||
|
||||
StyledText {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: qsTr("Taskbar Settings")
|
||||
font.pointSize: Appearance.font.size.large
|
||||
font.bold: true
|
||||
}
|
||||
|
||||
StyledText {
|
||||
Layout.topMargin: Appearance.spacing.large
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: qsTr("Clock")
|
||||
font.pointSize: Appearance.font.size.larger
|
||||
font.weight: 500
|
||||
}
|
||||
|
||||
StyledText {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: root.clockShowIcon ? qsTr("Clock icon enabled") : qsTr("Clock icon disabled")
|
||||
color: Colours.palette.m3outline
|
||||
}
|
||||
|
||||
StyledText {
|
||||
Layout.topMargin: Appearance.spacing.large
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: qsTr("Taskbar Entries")
|
||||
font.pointSize: Appearance.font.size.larger
|
||||
font.weight: 500
|
||||
}
|
||||
|
||||
StyledText {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: qsTr("Configure which entries appear in the taskbar")
|
||||
color: Colours.palette.m3outline
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue