controlcenter: polishing appearance panel
This commit is contained in:
parent
817156aec0
commit
f5ca27c967
1 changed files with 46 additions and 35 deletions
|
|
@ -108,6 +108,7 @@ RowLayout {
|
||||||
StyledListView {
|
StyledListView {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
Layout.topMargin: 0
|
||||||
|
|
||||||
model: M3Variants.list
|
model: M3Variants.list
|
||||||
spacing: Appearance.spacing.small / 2
|
spacing: Appearance.spacing.small / 2
|
||||||
|
|
@ -202,6 +203,7 @@ RowLayout {
|
||||||
StyledListView {
|
StyledListView {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
Layout.topMargin: 0
|
||||||
|
|
||||||
model: Schemes.list
|
model: Schemes.list
|
||||||
spacing: Appearance.spacing.small / 2
|
spacing: Appearance.spacing.small / 2
|
||||||
|
|
@ -262,66 +264,75 @@ RowLayout {
|
||||||
|
|
||||||
spacing: Appearance.spacing.normal
|
spacing: Appearance.spacing.normal
|
||||||
|
|
||||||
Item {
|
StyledRect {
|
||||||
readonly property real itemHeight: schemeRow.implicitHeight || 50
|
id: preview
|
||||||
Layout.preferredWidth: itemHeight * 0.8
|
|
||||||
Layout.preferredHeight: itemHeight * 0.8
|
|
||||||
|
|
||||||
StyledRect {
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
id: preview
|
|
||||||
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
border.width: 1
|
||||||
|
border.color: Qt.alpha(`#${modelData.colours?.outline}`, 0.5)
|
||||||
|
|
||||||
border.width: 1
|
color: `#${modelData.colours?.surface}`
|
||||||
border.color: Qt.alpha(`#${modelData.colours?.outline}`, 0.5)
|
radius: Appearance.rounding.full
|
||||||
|
implicitWidth: iconPlaceholder.implicitWidth
|
||||||
|
implicitHeight: iconPlaceholder.implicitWidth
|
||||||
|
|
||||||
color: `#${modelData.colours?.surface}`
|
MaterialIcon {
|
||||||
radius: Appearance.rounding.full
|
id: iconPlaceholder
|
||||||
implicitWidth: parent.itemHeight * 0.8
|
visible: false
|
||||||
implicitHeight: parent.itemHeight * 0.8
|
text: "circle"
|
||||||
|
font.pointSize: Appearance.font.size.large
|
||||||
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.right: parent.right
|
||||||
|
|
||||||
|
implicitWidth: parent.implicitWidth / 2
|
||||||
|
clip: true
|
||||||
|
|
||||||
|
StyledRect {
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
|
||||||
implicitWidth: parent.implicitWidth / 2
|
implicitWidth: preview.implicitWidth
|
||||||
clip: true
|
color: `#${modelData.colours?.primary}`
|
||||||
|
radius: Appearance.rounding.full
|
||||||
StyledRect {
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
anchors.right: parent.right
|
|
||||||
|
|
||||||
implicitWidth: preview.implicitWidth
|
|
||||||
color: `#${modelData.colours?.primary}`
|
|
||||||
radius: Appearance.rounding.full
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
Column {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: modelData.name
|
text: modelData.flavour ?? ""
|
||||||
font.weight: isCurrent ? 500 : 400
|
font.pointSize: Appearance.font.size.normal
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: modelData.flavour
|
text: modelData.name ?? ""
|
||||||
font.pointSize: Appearance.font.size.small
|
font.pointSize: Appearance.font.size.small
|
||||||
color: Colours.palette.m3outline
|
color: Colours.palette.m3outline
|
||||||
|
|
||||||
|
elide: Text.ElideRight
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MaterialIcon {
|
Loader {
|
||||||
visible: isCurrent
|
active: isCurrent
|
||||||
text: "check"
|
asynchronous: true
|
||||||
color: Colours.palette.m3primary
|
|
||||||
font.pointSize: Appearance.font.size.large
|
sourceComponent: MaterialIcon {
|
||||||
|
text: "check"
|
||||||
|
color: Colours.palette.m3onSurfaceVariant
|
||||||
|
font.pointSize: Appearance.font.size.large
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue