87 lines
1.6 KiB
QML
87 lines
1.6 KiB
QML
import Quickshell
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
import ZShell
|
|
import ZShell.Config
|
|
import ZShell.Components
|
|
import qs.Helpers
|
|
import qs.Components
|
|
import qs.Modules
|
|
import qs.Modules.Dashboard.Dash
|
|
import qs.Services
|
|
|
|
SnapLayout {
|
|
orientation: Qt.Vertical
|
|
id: root
|
|
|
|
readonly property bool dashboardVisible: screenState.dashboard
|
|
required property int radius
|
|
required property ScreenState screenState
|
|
|
|
spacing: ZUtils.snap(Tokens.spacing.small, root)
|
|
|
|
height: ZUtils.snap(implicitHeight, root)
|
|
width: ZUtils.snap(implicitWidth, root)
|
|
|
|
SnapLayout {
|
|
Layout.fillWidth: true
|
|
spacing: parent.spacing
|
|
|
|
Rect {
|
|
id: weatherRect
|
|
Layout.fillHeight: true
|
|
Layout.preferredWidth: ZUtils.snap(Tokens.sizes.dashboard.weatherWidth, root)
|
|
radius: root.radius
|
|
|
|
Weather {}
|
|
}
|
|
|
|
Rect {
|
|
id: userRect
|
|
Layout.preferredHeight: ZUtils.snap(user.implicitHeight, root)
|
|
Layout.preferredWidth: ZUtils.snap(user.implicitWidth, root)
|
|
radius: root.radius
|
|
|
|
User {
|
|
id: user
|
|
|
|
screenState: root.screenState
|
|
}
|
|
}
|
|
}
|
|
|
|
SnapLayout {
|
|
Layout.fillWidth: true
|
|
spacing: parent.spacing
|
|
|
|
Rect {
|
|
id: calendarRect
|
|
Layout.fillWidth: true
|
|
Layout.fillHeight: true
|
|
implicitHeight: ZUtils.snap(calendar.implicitHeight, root)
|
|
radius: root.radius
|
|
|
|
Calendar {
|
|
id: calendar
|
|
|
|
screenState: root.screenState
|
|
}
|
|
}
|
|
|
|
Rect {
|
|
id: resourcesRect
|
|
Layout.fillHeight: true
|
|
implicitWidth: ZUtils.snap(resources.implicitWidth, root)
|
|
radius: root.radius
|
|
|
|
Resources {
|
|
id: resources
|
|
}
|
|
}
|
|
}
|
|
|
|
component Rect: CustomRect {
|
|
color: Colors.tPalette.m3surfaceContainer
|
|
}
|
|
}
|