Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reply button size should be same as the input field, smaller + text color #4577

Merged
merged 2 commits into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/gui/tray/ActivityItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ MouseArea {
active: root.isChatActivity && root.isTalkReplyPossible && model.messageSent === ""
visible: root.isTalkReplyOptionVisible

Layout.preferredWidth: Style.talkReplyTextFieldPreferredWidth
Layout.preferredHeight: Style.talkReplyTextFieldPreferredHeight
Layout.leftMargin: Style.trayListItemIconSize + activityContent.spacing
Layout.preferredHeight: root.isTalkReplyOptionVisible ? implicitHeight : 0

sourceComponent: TalkReplyTextField {
onSendReply: {
Expand Down
16 changes: 7 additions & 9 deletions src/gui/tray/TalkReplyTextField.qml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@ Item {
root.sendReply(replyMessageTextField.text);
}

height: 38
width: 250

TextField {
id: replyMessageTextField

height: Style.talkReplyTextFieldPreferredHeight

anchors.fill: parent
topPadding: 4
rightPadding: sendReplyMessageButton.width

visible: model.messageSent === ""

color: Style.ncTextColor
Expand All @@ -42,9 +40,11 @@ Item {
}

Button {
id: sendReplyMessageButton
width: 32
id: sendReplyMessageButton

width: Style.talkReplyTextFieldPreferredWidth * 0.12
height: parent.height
camilasan marked this conversation as resolved.
Show resolved Hide resolved

opacity: 0.8
flat: true
enabled: replyMessageTextField.text !== ""
Expand All @@ -53,8 +53,6 @@ Item {

icon {
source: "image://svgimage-custom-color/send.svg" + "/" + Style.menuBorder
width: 38
height: 38
color: hovered || !sendReplyMessageButton.enabled? Style.menuBorder : UserModel.currentUser.accentColor
}

Expand Down
3 changes: 3 additions & 0 deletions theme/Style/Style.qml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ QtObject {

property int activityLabelBaseWidth: 240

property int talkReplyTextFieldPreferredHeight: 34
property int talkReplyTextFieldPreferredWidth: 250

property int activityItemActionPrimaryButtonMinWidth: 100
property int activityItemActionSecondaryButtonMinWidth: 80

Expand Down