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