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.
This commit is contained in:
@@ -221,8 +221,18 @@ Dialog {
|
|||||||
text: dlg.model
|
text: dlg.model
|
||||||
implicitHeight: Theme.touchTarget
|
implicitHeight: Theme.touchTarget
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
|
color: Theme.text
|
||||||
placeholderText: "model name"
|
placeholderText: "model name"
|
||||||
|
placeholderTextColor: Theme.textFaint
|
||||||
|
selectionColor: Theme.accentDim
|
||||||
inputMethodHints: Qt.ImhNoPredictiveText
|
inputMethodHints: Qt.ImhNoPredictiveText
|
||||||
|
background: Rectangle {
|
||||||
|
radius: Theme.radiusSm
|
||||||
|
color: Theme.bg
|
||||||
|
border.width: 1
|
||||||
|
border.color: modelField.activeFocus ? Theme.accentDim
|
||||||
|
: Theme.border
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
Layout.preferredWidth: 90
|
Layout.preferredWidth: 90
|
||||||
@@ -273,9 +283,18 @@ Dialog {
|
|||||||
implicitHeight: Theme.touchTarget
|
implicitHeight: Theme.touchTarget
|
||||||
echoMode: TextInput.Password
|
echoMode: TextInput.Password
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
|
color: Theme.text
|
||||||
placeholderText: "API key (leave empty to keep what is there)"
|
placeholderText: "API key (leave empty to keep what is there)"
|
||||||
|
placeholderTextColor: Theme.textFaint
|
||||||
|
selectionColor: Theme.accentDim
|
||||||
inputMethodHints: Qt.ImhNoPredictiveText | Qt.ImhSensitiveData
|
inputMethodHints: Qt.ImhNoPredictiveText | Qt.ImhSensitiveData
|
||||||
onAccepted: dlg.applyRequested(dlg.picked, modelField.text, keyField.text)
|
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 {
|
Text {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
@@ -299,17 +318,43 @@ Dialog {
|
|||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
|
id: closeBtn
|
||||||
objectName: "settingsClose"
|
objectName: "settingsClose"
|
||||||
text: "Close"
|
text: "Close"
|
||||||
implicitHeight: Theme.touchTarget
|
implicitHeight: Theme.touchTarget
|
||||||
onClicked: dlg.close()
|
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 {
|
Button {
|
||||||
|
id: applyBtn
|
||||||
objectName: "settingsApply"
|
objectName: "settingsApply"
|
||||||
text: "Use this"
|
text: "Use this"
|
||||||
highlighted: true
|
|
||||||
implicitHeight: Theme.touchTarget
|
implicitHeight: Theme.touchTarget
|
||||||
onClicked: dlg.applyRequested(dlg.picked, modelField.text, keyField.text)
|
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#define CST_VERSION_MAJOR 0
|
#define CST_VERSION_MAJOR 0
|
||||||
#define CST_VERSION_MINOR 8
|
#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) #x
|
||||||
#define CST_VERSION_STR(x) CST_VERSION_STR_(x)
|
#define CST_VERSION_STR(x) CST_VERSION_STR_(x)
|
||||||
|
|||||||
Reference in New Issue
Block a user