mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-09-21 03:20:59 +00:00
Remove binary state from high-level API and use Jinja templates (#3147)
Signed-off-by: Jared Van Bortel <jared@nomic.ai> Signed-off-by: Adam Treat <treat.adam@gmail.com> Co-authored-by: Adam Treat <treat.adam@gmail.com>
This commit is contained in:
@@ -17,13 +17,42 @@ ColumnLayout {
|
||||
property alias color: mainTextLabel.color
|
||||
property alias linkColor: mainTextLabel.linkColor
|
||||
|
||||
Label {
|
||||
id: mainTextLabel
|
||||
color: theme.settingsTitleTextColor
|
||||
font.pixelSize: theme.fontSizeLarger
|
||||
font.bold: true
|
||||
onLinkActivated: function(link) {
|
||||
root.linkActivated(link);
|
||||
property var onReset: null
|
||||
property alias canReset: resetButton.enabled
|
||||
property bool resetClears: false
|
||||
|
||||
Item {
|
||||
anchors.margins: 5
|
||||
width: childrenRect.width
|
||||
height: mainTextLabel.contentHeight
|
||||
|
||||
Label {
|
||||
id: mainTextLabel
|
||||
anchors.left: parent.left
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
color: theme.settingsTitleTextColor
|
||||
font.pixelSize: theme.fontSizeLarger
|
||||
font.bold: true
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
onLinkActivated: function(link) {
|
||||
root.linkActivated(link);
|
||||
}
|
||||
}
|
||||
|
||||
MySettingsButton {
|
||||
id: resetButton
|
||||
anchors.baseline: mainTextLabel.baseline
|
||||
anchors.left: mainTextLabel.right
|
||||
height: mainTextLabel.contentHeight
|
||||
anchors.leftMargin: 10
|
||||
padding: 2
|
||||
leftPadding: 10
|
||||
rightPadding: 10
|
||||
backgroundRadius: 5
|
||||
text: resetClears ? qsTr("Clear") : qsTr("Reset")
|
||||
visible: root.onReset !== null
|
||||
onClicked: root.onReset()
|
||||
}
|
||||
}
|
||||
Label {
|
||||
|
Reference in New Issue
Block a user