Skip to content

Commit

Permalink
Fix height of text input fields and radius.
Browse files Browse the repository at this point in the history
Signed-off-by: Camila Ayres <[email protected]>
  • Loading branch information
camilasan committed Sep 12, 2024
1 parent 9c07d8e commit 2bd355f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
12 changes: 11 additions & 1 deletion src/gui/filedetails/NCInputTextEdit.qml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import Style
TextEdit {
id: root

readonly property color accentColor: Style.ncBlue
readonly property color accentColor: palette.highlight
readonly property color secondaryColor: palette.dark
readonly property alias submitButton: submitButton

Expand All @@ -33,6 +33,16 @@ TextEdit {
selectByMouse: true
height: Math.max(Style.talkReplyTextFieldPreferredHeight, contentHeight)

Rectangle {
id: textFieldBorder
anchors.fill: parent
radius: Style.trayWindowRadius
border.width: Style.normalBorderWidth
border.color: root.activeFocus ? root.accentColor : root.secondaryColor
color: palette.window
z: -1
}

Button {
id: submitButton

Expand Down
9 changes: 8 additions & 1 deletion src/gui/filedetails/NCInputTextField.qml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ TextField {
readonly property alias submitButton: submitButton
property bool validInput: true

implicitHeight: Style.talkReplyTextFieldPreferredHeight
implicitHeight: Math.max(Style.talkReplyTextFieldPreferredHeight, contentHeight)

rightPadding: submitButton.width

Expand All @@ -52,5 +52,12 @@ TextField {

onClicked: root.accepted()
}

verticalAlignment: Qt.AlignVCenter
background: Rectangle {
border.color: palette.dark
radius: Style.trayWindowRadius
color: palette.window
}
}

8 changes: 8 additions & 0 deletions src/gui/filedetails/ShareeSearchField.qml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ TextField {

placeholderText: enabled ? qsTr("Search for users or groups…") : qsTr("Sharing is not available for this folder")
placeholderTextColor: placeholderColor
verticalAlignment: Qt.AlignVCenter
implicitHeight: Math.max(Style.talkReplyTextFieldPreferredHeight, contentHeight)

background: Rectangle {
border.color: palette.dark
radius: Style.trayWindowRadius
color: palette.window
}

onActiveFocusChanged: triggerSuggestionsVisibility()
onTextChanged: triggerSuggestionsVisibility()
Expand Down

0 comments on commit 2bd355f

Please sign in to comment.