Merge settings window to main #23
@@ -8,22 +8,45 @@ import qs.Components
|
||||
import qs.Modules
|
||||
import qs.Helpers
|
||||
|
||||
Item {
|
||||
CustomClippingRect {
|
||||
id: root
|
||||
|
||||
readonly property int itemHeight: 50 + Appearance.padding.smaller * 2
|
||||
required property var wrapper
|
||||
|
||||
implicitHeight: profiles.implicitHeight + Appearance.padding.small
|
||||
implicitWidth: profiles.implicitWidth + Appearance.padding.small * 2
|
||||
color: DynamicColors.tPalette.m3surfaceContainer
|
||||
implicitHeight: updatesList.visible ? updatesList.implicitHeight + Appearance.padding.small * 2 : noUpdates.height
|
||||
implicitWidth: updatesList.visible ? updatesList.contentWidth + Appearance.padding.small * 2 : noUpdates.width
|
||||
radius: Appearance.rounding.small
|
||||
|
||||
CustomRect {
|
||||
id: profiles
|
||||
Item {
|
||||
id: noUpdates
|
||||
|
||||
anchors.centerIn: parent
|
||||
height: 200
|
||||
visible: script.values.length === 0
|
||||
width: 300
|
||||
|
||||
MaterialIcon {
|
||||
id: noUpdatesIcon
|
||||
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: DynamicColors.tPalette.m3surfaceContainer
|
||||
implicitHeight: updatesList.contentHeight + Appearance.padding.small * 2
|
||||
implicitWidth: updatesList.contentWidth + Appearance.padding.small * 2
|
||||
radius: Appearance.rounding.small
|
||||
anchors.top: parent.top
|
||||
color: DynamicColors.tPalette.m3onSurfaceVariant
|
||||
font.pointSize: Appearance.font.size.extraLarge * 3
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: "check"
|
||||
}
|
||||
|
||||
CustomText {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.top: noUpdatesIcon.bottom
|
||||
color: DynamicColors.tPalette.m3onSurfaceVariant
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: qsTr("No updates available")
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
}
|
||||
|
||||
CustomListView {
|
||||
id: updatesList
|
||||
@@ -31,9 +54,10 @@ Item {
|
||||
anchors.centerIn: parent
|
||||
contentHeight: childrenRect.height
|
||||
contentWidth: 600
|
||||
implicitHeight: contentHeight
|
||||
implicitHeight: Math.min(contentHeight, (root.itemHeight + spacing) * 5 - spacing)
|
||||
implicitWidth: contentWidth
|
||||
spacing: Appearance.spacing.normal
|
||||
visible: script.values.length > 0
|
||||
|
||||
delegate: CustomRect {
|
||||
id: update
|
||||
@@ -44,7 +68,7 @@ Item {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
color: DynamicColors.tPalette.m3surfaceContainer
|
||||
implicitHeight: 50 + Appearance.padding.smaller * 2
|
||||
implicitHeight: root.itemHeight
|
||||
radius: Appearance.rounding.small - Appearance.padding.small
|
||||
|
||||
RowLayout {
|
||||
@@ -126,5 +150,4 @@ Item {
|
||||
}))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user