mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-04-28 19:54:21 +00:00
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>
32 lines
871 B
QML
32 lines
871 B
QML
import QtCore
|
|
import QtQuick
|
|
import QtQuick.Controls
|
|
import QtQuick.Controls.Basic
|
|
|
|
TextArea {
|
|
id: myTextArea
|
|
|
|
property string errState: "ok" // one of "ok", "error", "warning"
|
|
|
|
color: enabled ? theme.textColor : theme.mutedTextColor
|
|
placeholderTextColor: theme.mutedTextColor
|
|
font.pixelSize: theme.fontSizeLarge
|
|
background: Rectangle {
|
|
implicitWidth: 150
|
|
color: theme.controlBackground
|
|
border.width: errState === "ok" ? 1 : 2
|
|
border.color: {
|
|
switch (errState) {
|
|
case "ok": return theme.controlBorder;
|
|
case "warning": return theme.textWarningColor;
|
|
case "error": return theme.textErrorColor;
|
|
}
|
|
}
|
|
radius: 10
|
|
}
|
|
padding: 10
|
|
wrapMode: TextArea.Wrap
|
|
|
|
ToolTip.delay: Qt.styleHints.mousePressAndHoldInterval
|
|
}
|