Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Addressing PR comments.
Browse files Browse the repository at this point in the history
Signed-off-by: Camila <[email protected]>
Camila committed Sep 27, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 78a0fe7 commit 1f223b0
Showing 2 changed files with 7 additions and 10 deletions.
10 changes: 4 additions & 6 deletions src/gui/tray/ActivityActionButton.qml
Original file line number Diff line number Diff line change
@@ -10,20 +10,18 @@ Item {
property string text: ""
property string toolTipText: ""

property bool bold: false
property bool primaryButton: false

property string imageSource: ""
property string imageSourceHover: ""

property color textColor: Style.ncTextColor
property color textColorHovered: Style.ncSecondaryTextColor

property bool primaryButton: false

signal clicked()

Loader {
active: root.imageSource === "" && !primaryButton
active: !root.primaryButton

anchors.fill: parent

@@ -40,7 +38,7 @@ Item {
}

Loader {
active: root.imageSource !== "" || primaryButton
active: root.primaryButton

anchors.fill: parent

@@ -55,7 +53,7 @@ Item {
textColor: root.textColor
textColorHovered: root.textColorHovered

bold: root.bold
bold: root.primaryButton

imageSource: root.imageSource
imageSourceHover: root.imageSourceHover
7 changes: 3 additions & 4 deletions src/gui/tray/ActivityItemActions.qml
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ RowLayout {
id: activityActionButton

readonly property string verb: model.modelData.verb
readonly property bool primary: (model.index === 0 && verb !== "DELETE") || model.modelData.primary
readonly property bool primary: (model.index === 0 && verb !== "DELETE") || (model.modelData.primary && imageSource !== "")
readonly property bool isTalkReplyButton: verb === "REPLY"

Layout.minimumWidth: primary ? Style.activityItemActionPrimaryButtonMinWidth : Style.activityItemActionSecondaryButtonMinWidth
@@ -46,10 +46,9 @@ RowLayout {
imageSource: model.modelData.imageSource ? model.modelData.imageSource + root.adjustedHeaderColor : ""
imageSourceHover: model.modelData.imageSourceHovered ? model.modelData.imageSourceHovered + UserModel.currentUser.headerTextColor : ""

textColor: imageSource !== "" || primary ? root.adjustedHeaderColor : Style.ncTextColor
textColorHovered: imageSource !== "" || primary ? UserModel.currentUser.headerTextColor : Style.ncTextColor
textColor: primary ? root.adjustedHeaderColor : Style.ncTextColor
textColorHovered: primary ? UserModel.currentUser.headerTextColor : Style.ncTextColor

bold: primary
primaryButton: primary

onClicked: !isTalkReplyButton ? root.triggerAction(model.index) : root.showReplyField()

0 comments on commit 1f223b0

Please sign in to comment.