From be4025e276c6cd19c66e4534d1b809ba13724251 Mon Sep 17 00:00:00 2001 From: WHC Date: Sun, 11 Oct 2026 12:27:44 +0800 Subject: [PATCH] v0.8.11: theme the settings dialog's fields and buttons The Basic style paints its own controls: the two text fields came out as white boxes on the dark panel and the buttons looked nothing like the rest of the window. Both fields now carry the surface, border and focus colors the chat cards use (same shape as AskDialog's field), and the buttons follow the composer: Close is a quiet bordered button, Use this is the accent one. No behavior change; 36/36 UI checks still pass and the dialog was looked at again through CST_APP_SHOT. Version 0.8.11. --- app/qml/SettingsDialog.qml | 47 +++++++++++++++++++++++++++++++++++++- include/cst_version.h | 2 +- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/app/qml/SettingsDialog.qml b/app/qml/SettingsDialog.qml index 53bd0fb..10d606e 100644 --- a/app/qml/SettingsDialog.qml +++ b/app/qml/SettingsDialog.qml @@ -221,8 +221,18 @@ Dialog { text: dlg.model implicitHeight: Theme.touchTarget selectByMouse: true + color: Theme.text placeholderText: "model name" + placeholderTextColor: Theme.textFaint + selectionColor: Theme.accentDim inputMethodHints: Qt.ImhNoPredictiveText + background: Rectangle { + radius: Theme.radiusSm + color: Theme.bg + border.width: 1 + border.color: modelField.activeFocus ? Theme.accentDim + : Theme.border + } } Text { Layout.preferredWidth: 90 @@ -273,9 +283,18 @@ Dialog { implicitHeight: Theme.touchTarget echoMode: TextInput.Password selectByMouse: true + color: Theme.text placeholderText: "API key (leave empty to keep what is there)" + placeholderTextColor: Theme.textFaint + selectionColor: Theme.accentDim inputMethodHints: Qt.ImhNoPredictiveText | Qt.ImhSensitiveData onAccepted: dlg.applyRequested(dlg.picked, modelField.text, keyField.text) + background: Rectangle { + radius: Theme.radiusSm + color: Theme.bg + border.width: 1 + border.color: keyField.activeFocus ? Theme.accentDim : Theme.border + } } Text { Layout.fillWidth: true @@ -299,17 +318,43 @@ Dialog { elide: Text.ElideRight } Button { + id: closeBtn objectName: "settingsClose" text: "Close" implicitHeight: Theme.touchTarget onClicked: dlg.close() + background: Rectangle { + radius: Theme.radiusSm + color: closeBtn.hovered ? Theme.surfaceHi : Theme.surfaceAlt + border.width: 1 + border.color: Theme.border + } + contentItem: Text { + text: closeBtn.text + color: Theme.textDim + font.pixelSize: Theme.bodySize + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + } } Button { + id: applyBtn objectName: "settingsApply" text: "Use this" - highlighted: true implicitHeight: Theme.touchTarget onClicked: dlg.applyRequested(dlg.picked, modelField.text, keyField.text) + background: Rectangle { + radius: Theme.radiusSm + color: applyBtn.hovered ? "#5cc0f0" : Theme.accent + } + contentItem: Text { + text: applyBtn.text + color: "#12161a" + font.pixelSize: Theme.bodySize + font.bold: true + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + } } } } diff --git a/include/cst_version.h b/include/cst_version.h index ee2419c..6add24a 100644 --- a/include/cst_version.h +++ b/include/cst_version.h @@ -3,7 +3,7 @@ #define CST_VERSION_MAJOR 0 #define CST_VERSION_MINOR 8 -#define CST_VERSION_PATCH 10 +#define CST_VERSION_PATCH 11 #define CST_VERSION_STR_(x) #x #define CST_VERSION_STR(x) CST_VERSION_STR_(x)