property string imageSource: ""
property string imageSourceHover: ""
- property color adjustedHeaderColor: Style.ncBlue
+ property color adjustedHeaderColor: Style.adjustedCurrentUserHeaderColor
property color textColor: primaryButton ? adjustedHeaderColor : Style.ncTextColor
- property color textColorHovered: primaryButton ? UserModel.currentUser.headerTextColor : Style.ncTextColor
+ property color textColorHovered: primaryButton ? Style.currentUserHeaderTextColor : Style.ncTextColor
property string verb: ""
property bool isTalkReplyButton: false
background: NCButtonBackground {
- color: UserModel.currentUser.headerColor
+ color: Style.currentUserHeaderColor
hovered: root.hovered
visible: root.primaryButton
}
readonly property bool isTalkReplyPossible: model.conversationToken !== ""
property bool isTalkReplyOptionVisible: model.messageSent !== ""
- property color adjustedHeaderColor: Theme.darkMode ? Qt.lighter(UserModel.currentUser.headerColor, 2)
- : Qt.darker(UserModel.currentUser.headerColor, 1.5)
-
enabled: (model.path !== "" || model.link !== "" || model.links.length > 0 || model.isCurrentUserFileActivity === true)
padding: Style.standardSpacing
activityData: model
- adjustedHeaderColor: root.adjustedHeaderColor
-
onShareButtonClicked: Systray.openShareDialog(model.displayPath, model.path)
onDismissButtonClicked: activityModel.slotTriggerDismiss(model.activityIndex)
flickable: root.flickable
- adjustedHeaderColor: root.adjustedHeaderColor
-
onTriggerAction: activityModel.slotTriggerAction(model.activityIndex, actionIndex)
+
onShowReplyField: root.isTalkReplyOptionVisible = true
}
}
property bool displayActions: false
property color moreActionsButtonColor: "transparent"
- property color adjustedHeaderColor: "transparent"
property int maxActionButtons: 0
text: model.modelData.label
- adjustedHeaderColor: root.adjustedHeaderColor
+ adjustedHeaderColor: Style.adjustedCurrentUserHeaderColor
- imageSource: model.modelData.imageSource ? model.modelData.imageSource + root.adjustedHeaderColor : ""
- imageSourceHover: model.modelData.imageSourceHovered ? model.modelData.imageSourceHovered + UserModel.currentUser.headerTextColor : ""
+ imageSource: model.modelData.imageSource ? model.modelData.imageSource + Style.adjustedCurrentUserHeaderColor : ""
+ imageSourceHover: model.modelData.imageSourceHovered ? model.modelData.imageSourceHovered + Style.currentUserHeaderTextColor : ""
onClicked: isTalkReplyButton ? root.showReplyField() : root.triggerAction(model.index)
}
property bool childHovered: shareButton.hovered || dismissActionButton.hovered
- property color adjustedHeaderColor: "transparent"
-
signal dismissButtonClicked()
signal shareButtonClicked()
visible: root.activityData.isShareable
- imageSource: "image://svgimage-custom-color/share.svg" + "/" + root.adjustedHeaderColor
- imageSourceHover: "image://svgimage-custom-color/share.svg" + "/" + UserModel.currentUser.headerTextColor
+ imageSource: "image://svgimage-custom-color/share.svg" + "/" + Style.adjustedCurrentUserHeaderColor
+ imageSourceHover: "image://svgimage-custom-color/share.svg" + "/" + Style.currentUserHeaderTextColor
toolTipText: qsTr("Open share dialog")
- bgColor: UserModel.currentUser.headerColor
+ bgColor: Style.currentUserHeaderColor
onClicked: root.shareButtonClicked()
}
leftPadding: root.text === "" ? 5 : 10
rightPadding: root.text === "" ? 5 : 10
+ implicitWidth: contentItem.implicitWidth + leftPadding + rightPadding
NCToolTip {
text: root.toolTipText
Layout.preferredHeight: Style.trayWindowHeaderHeight
background: Rectangle {
- color: root.hovered || root.visualFocus ? UserModel.currentUser.headerTextColor : "transparent"
+ color: root.hovered || root.visualFocus ? Style.currentUserHeaderTextColor : "transparent"
opacity: 0.2
}
}
anchors.right: trayWindowMainItem.right\r
anchors.top: trayWindowMainItem.top\r
height: Style.trayWindowHeaderHeight\r
- color: UserModel.currentUser.headerColor\r
+ color: Style.currentUserHeaderColor\r
\r
RowLayout {\r
id: trayWindowHeaderLayout\r
}\r
\r
background: Rectangle {\r
- color: parent.hovered || parent.visualFocus ? UserModel.currentUser.headerTextColor : "transparent"\r
+ color: parent.hovered || parent.visualFocus ? Style.currentUserHeaderTextColor : "transparent"\r
opacity: 0.2\r
}\r
\r
height: width\r
anchors.bottom: currentAccountAvatar.bottom\r
anchors.right: currentAccountAvatar.right\r
- color: UserModel.currentUser.headerColor\r
+ color: Style.currentUserHeaderColor\r
radius: width*0.5\r
}\r
\r
height: width\r
anchors.bottom: currentAccountAvatar.bottom\r
anchors.right: currentAccountAvatar.right\r
- color: currentAccountButton.hovered ? UserModel.currentUser.headerTextColor : "transparent"\r
+ color: currentAccountButton.hovered ? Style.currentUserHeaderTextColor : "transparent"\r
opacity: 0.2\r
radius: width*0.5\r
}\r
text: UserModel.currentUser.name\r
textFormat: Text.PlainText\r
elide: Text.ElideRight\r
- color: UserModel.currentUser.headerTextColor\r
+ color: Style.currentUserHeaderTextColor\r
\r
font.pixelSize: Style.topLinePixelSize\r
font.bold: true\r
: UserModel.currentUser.server\r
textFormat: Text.PlainText\r
elide: Text.ElideRight\r
- color: UserModel.currentUser.headerTextColor\r
+ color: Style.currentUserHeaderTextColor\r
font.pixelSize: Style.subLinePixelSize\r
}\r
}\r
\r
ColorOverlay {\r
cached: true\r
- color: UserModel.currentUser.headerTextColor\r
+ color: Style.currentUserHeaderTextColor\r
width: source.width\r
height: source.height\r
source: Image {\r
id: openLocalFolderButton\r
visible: UserModel.currentUser.hasLocalFolder\r
icon.source: "qrc:///client/theme/white/folder.svg"\r
- icon.color: UserModel.currentUser.headerTextColor\r
+ icon.color: Style.currentUserHeaderTextColor\r
onClicked: UserModel.openCurrentAccountLocalFolder()\r
\r
Image {\r
width: Style.folderStateIndicatorSize + 2\r
height: width\r
anchors.centerIn: parent\r
- color: UserModel.currentUser.headerColor\r
+ color: Style.currentUserHeaderColor\r
radius: width*0.5\r
z: -2\r
}\r
width: Style.folderStateIndicatorSize + 2\r
height: width\r
anchors.centerIn: parent\r
- color: openLocalFolderButton.hovered ? UserModel.currentUser.headerTextColor : "transparent"\r
+ color: openLocalFolderButton.hovered ? Style.currentUserHeaderTextColor : "transparent"\r
opacity: 0.2\r
radius: width*0.5\r
z: -1\r
\r
visible: UserModel.currentUser.serverHasTalk\r
icon.source: "qrc:///client/theme/white/talk-app.svg"\r
- icon.color: UserModel.currentUser.headerTextColor\r
+ icon.color: Style.currentUserHeaderTextColor\r
onClicked: UserModel.openCurrentAccountTalk()\r
\r
Accessible.role: Accessible.Button\r
HeaderButton {\r
id: trayWindowAppsButton\r
icon.source: "qrc:///client/theme/white/more-apps.svg"\r
- icon.color: UserModel.currentUser.headerTextColor\r
+ icon.color: Style.currentUserHeaderTextColor\r
\r
onClicked: {\r
if(appsMenuListView.count <= 0) {\r
readonly property color backgroundColor: Theme.systemPalette.base\r
readonly property color buttonBackgroundColor: Theme.systemPalette.button\r
\r
+ readonly property color currentUserHeaderColor: UserModel.currentUser ? UserModel.currentUser.headerColor : ncBlue\r
+ readonly property color currentUserHeaderTextColor: UserModel.currentUser ? UserModel.currentUser.headerTextColor : ncHeaderTextColor\r
+ readonly property color adjustedCurrentUserHeaderColor: Theme.darkMode ? Qt.lighter(currentUserHeaderColor, 2)\r
+ : Qt.darker(currentUserHeaderColor, 1.5)\r
+\r
// ErrorBox colors\r
readonly property color errorBoxBackgroundColor: Qt.rgba(0.89, 0.18, 0.18, 1)\r
readonly property int errorBoxStripeWidth: 4\r