Settings: better looking settings panel on 1080p

This commit is contained in:
quadbyte 2025-09-01 00:15:49 -04:00
parent 6bcb85137b
commit e8c2042290
2 changed files with 15 additions and 10 deletions

View file

@ -11,8 +11,8 @@ import qs.Widgets
NPanel { NPanel {
id: root id: root
panelWidth: Math.max(screen?.width * 0.4, 768) * scaling panelWidth: Math.round(Math.max(screen?.width * 0.4, 1000) * scaling)
panelHeight: Math.max(screen?.height * 0.75, 810) * scaling panelHeight: Math.round(Math.max(screen?.height * 0.75, 800) * scaling)
panelAnchorHorizontalCenter: true panelAnchorHorizontalCenter: true
panelAnchorVerticalCenter: true panelAnchorVerticalCenter: true

View file

@ -247,38 +247,43 @@ ColumnLayout {
// Color swatches // Color swatches
RowLayout { RowLayout {
id: swatches
spacing: Style.marginS * scaling spacing: Style.marginS * scaling
Layout.fillWidth: true Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
readonly property int swatchSize: 20 * scaling
// Primary color swatch // Primary color swatch
Rectangle { Rectangle {
width: 28 * scaling width: swatches.swatchSize
height: 28 * scaling height: swatches.swatchSize
radius: width * 0.5 radius: width * 0.5
color: getSchemeColor(modelData, "mPrimary") color: getSchemeColor(modelData, "mPrimary")
} }
// Secondary color swatch // Secondary color swatch
Rectangle { Rectangle {
width: 28 * scaling width: swatches.swatchSize
height: 28 * scaling height: swatches.swatchSize
radius: width * 0.5 radius: width * 0.5
color: getSchemeColor(modelData, "mSecondary") color: getSchemeColor(modelData, "mSecondary")
} }
// Tertiary color swatch // Tertiary color swatch
Rectangle { Rectangle {
width: 28 * scaling width: swatches.swatchSize
height: 28 * scaling height: swatches.swatchSize
radius: width * 0.5 radius: width * 0.5
color: getSchemeColor(modelData, "mTertiary") color: getSchemeColor(modelData, "mTertiary")
} }
// Error color swatch // Error color swatch
Rectangle { Rectangle {
width: 28 * scaling width: swatches.swatchSize
height: 28 * scaling height: swatches.swatchSize
radius: width * 0.5 radius: width * 0.5
color: getSchemeColor(modelData, "mError") color: getSchemeColor(modelData, "mError")
} }