From 1f223b078adef67afb4d762f54245742fc02b70f Mon Sep 17 00:00:00 2001 From: Camila Date: Mon, 26 Sep 2022 17:19:38 +0200 Subject: [PATCH] Addressing PR comments. Signed-off-by: Camila --- src/gui/tray/ActivityActionButton.qml | 10 ++++------ src/gui/tray/ActivityItemActions.qml | 7 +++---- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/gui/tray/ActivityActionButton.qml b/src/gui/tray/ActivityActionButton.qml index 53ae3f40a750b..a6b0d70da297b 100644 --- a/src/gui/tray/ActivityActionButton.qml +++ b/src/gui/tray/ActivityActionButton.qml @@ -10,7 +10,7 @@ Item { property string text: "" property string toolTipText: "" - property bool bold: false + property bool primaryButton: false property string imageSource: "" property string imageSourceHover: "" @@ -18,12 +18,10 @@ Item { 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 diff --git a/src/gui/tray/ActivityItemActions.qml b/src/gui/tray/ActivityItemActions.qml index 40934fea6098a..c4726806ac27d 100644 --- a/src/gui/tray/ActivityItemActions.qml +++ b/src/gui/tray/ActivityItemActions.qml @@ -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()