controlcenter: polishing appearance panel

This commit is contained in:
ATMDA 2025-11-10 12:05:02 -05:00
parent 817156aec0
commit f5ca27c967

View file

@ -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,11 +264,6 @@ RowLayout {
spacing: Appearance.spacing.normal spacing: Appearance.spacing.normal
Item {
readonly property real itemHeight: schemeRow.implicitHeight || 50
Layout.preferredWidth: itemHeight * 0.8
Layout.preferredHeight: itemHeight * 0.8
StyledRect { StyledRect {
id: preview id: preview
@ -277,8 +274,15 @@ RowLayout {
color: `#${modelData.colours?.surface}` color: `#${modelData.colours?.surface}`
radius: Appearance.rounding.full radius: Appearance.rounding.full
implicitWidth: parent.itemHeight * 0.8 implicitWidth: iconPlaceholder.implicitWidth
implicitHeight: parent.itemHeight * 0.8 implicitHeight: iconPlaceholder.implicitWidth
MaterialIcon {
id: iconPlaceholder
visible: false
text: "circle"
font.pointSize: Appearance.font.size.large
}
Item { Item {
anchors.top: parent.top anchors.top: parent.top
@ -299,31 +303,38 @@ RowLayout {
} }
} }
} }
}
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
asynchronous: true
sourceComponent: MaterialIcon {
text: "check" text: "check"
color: Colours.palette.m3primary color: Colours.palette.m3onSurfaceVariant
font.pointSize: Appearance.font.size.large font.pointSize: Appearance.font.size.large
} }
} }
}
implicitHeight: schemeRow.implicitHeight + Appearance.padding.normal * 2 implicitHeight: schemeRow.implicitHeight + Appearance.padding.normal * 2
} }