property color textColor: Style.ncTextColor
property color textColorHovered: Style.ncSecondaryTextColor
+ property bool primaryButton: false
+
signal clicked()
Loader {
- active: root.imageSource === ""
+ active: root.imageSource === "" && !primaryButton
anchors.fill: parent
}
Loader {
- active: root.imageSource !== ""
+ active: root.imageSource !== "" || primaryButton
anchors.fill: parent
id: activityActionButton
readonly property string verb: model.modelData.verb
- readonly property bool primary: model.index === 0 && verb !== "DELETE"
+ readonly property bool primary: (model.index === 0 && verb !== "DELETE") || model.modelData.primary
readonly property bool isTalkReplyButton: verb === "REPLY"
Layout.minimumWidth: primary ? Style.activityItemActionPrimaryButtonMinWidth : Style.activityItemActionSecondaryButtonMinWidth
imageSource: model.modelData.imageSource ? model.modelData.imageSource + root.adjustedHeaderColor : ""
imageSourceHover: model.modelData.imageSourceHovered ? model.modelData.imageSourceHovered + UserModel.currentUser.headerTextColor : ""
- textColor: imageSource !== "" ? root.adjustedHeaderColor : Style.ncTextColor
- textColorHovered: imageSource !== "" ? UserModel.currentUser.headerTextColor : Style.ncTextColor
+ textColor: imageSource !== "" || primary ? root.adjustedHeaderColor : Style.ncTextColor
+ textColorHovered: imageSource !== "" || primary ? UserModel.currentUser.headerTextColor : Style.ncTextColor
bold: primary
+ primaryButton: primary
onClicked: !isTalkReplyButton ? root.triggerAction(model.index) : root.showReplyField()
}