diff --git a/src/gui/filedetails/NCInputTextField.qml b/src/gui/filedetails/NCInputTextField.qml index 37a7d23dc8b6f..fa4bef0bfc8a2 100644 --- a/src/gui/filedetails/NCInputTextField.qml +++ b/src/gui/filedetails/NCInputTextField.qml @@ -25,6 +25,7 @@ TextField { readonly property color accentColor: Style.ncBlue readonly property color secondaryColor: palette.dark readonly property alias submitButton: submitButton + property bool validInput: true implicitHeight: Style.talkReplyTextFieldPreferredHeight @@ -36,7 +37,7 @@ TextField { id: textFieldBorder radius: Style.slightlyRoundedButtonRadius border.width: Style.normalBorderWidth - border.color: root.activeFocus ? root.accentColor : root.secondaryColor + border.color: root.activeFocus ? root.validInput ? root.accentColor : Style.errorBoxBackgroundColor : root.secondaryColor color: palette.base } @@ -55,7 +56,7 @@ TextField { icon.source: "image://svgimage-custom-color/confirm.svg" + "/" + root.secondaryColor icon.color: hovered && enabled ? UserModel.currentUser.accentColor : root.secondaryColor - enabled: root.text !== "" + enabled: root.text !== "" && root.validInput onClicked: root.accepted() }