Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Cambra <claudio.cambra@gmail.com>2022-01-28 19:03:39 +0300
committerClaudio Cambra <claudio.cambra@gmail.com>2022-03-16 15:57:45 +0300
commitf585b8bd489444eed07fa86535a6835b780f237b (patch)
tree6e39ac8982d7166804affdb085705ac1d2c5a3df /src/gui/tray/Window.qml
parent454ae37e8dc27b0749dab2cd34f99c9b1cab8592 (diff)
Add support for server color theming by using server color as accentfeature/accent-color
color Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
Diffstat (limited to 'src/gui/tray/Window.qml')
-rw-r--r--src/gui/tray/Window.qml55
1 files changed, 34 insertions, 21 deletions
diff --git a/src/gui/tray/Window.qml b/src/gui/tray/Window.qml
index fdf1d51c6..a17b3a0fb 100644
--- a/src/gui/tray/Window.qml
+++ b/src/gui/tray/Window.qml
@@ -122,7 +122,7 @@ Window {
anchors.right: trayWindowBackground.right
anchors.top: trayWindowBackground.top
height: Style.trayWindowHeaderHeight
- color: Style.ncBlue
+ color: UserModel.currentUser.headerColor
RowLayout {
id: trayWindowHeaderLayout
@@ -363,7 +363,7 @@ Window {
height: width
anchors.bottom: currentAccountAvatar.bottom
anchors.right: currentAccountAvatar.right
- color: Style.ncBlue
+ color: UserModel.currentUser.headerColor
radius: width*0.5
}
@@ -375,7 +375,7 @@ Window {
height: width
anchors.bottom: currentAccountAvatar.bottom
anchors.right: currentAccountAvatar.right
- color: accountBtnMouseArea.containsMouse ? "white" : "transparent"
+ color: currentAccountButton.hovered ? "white" : "transparent"
opacity: 0.2
radius: width*0.5
}
@@ -410,7 +410,7 @@ Window {
width: Style.currentAccountLabelWidth
text: UserModel.currentUser.name
elide: Text.ElideRight
- color: Style.ncTextColor
+ color: UserModel.currentUser.headerTextColor
font.pixelSize: Style.topLinePixelSize
font.bold: true
}
@@ -438,7 +438,7 @@ Window {
? UserModel.currentUser.statusMessage
: UserModel.currentUser.server
elide: Text.ElideRight
- color: Style.ncTextColor
+ color: UserModel.currentUser.headerTextColor
font.pixelSize: Style.subLinePixelSize
}
}
@@ -446,7 +446,7 @@ Window {
ColorOverlay {
cached: true
- color: Style.ncTextColor
+ color: UserModel.currentUser.headerTextColor
width: source.width
height: source.height
source: Image {
@@ -475,23 +475,16 @@ Window {
Layout.preferredHeight: Style.trayWindowHeaderHeight
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
+ Accessible.role: Accessible.Button
+ Accessible.name: qsTr("Open local folder of current account")
+
HeaderButton {
id: openLocalFolderButton
visible: UserModel.currentUser.hasLocalFolder
icon.source: "qrc:///client/theme/white/folder.svg"
+ icon.color: UserModel.currentUser.headerTextColor
onClicked: UserModel.openCurrentAccountLocalFolder()
- Rectangle {
- id: folderStateIndicatorBackground
- width: Style.folderStateIndicatorSize
- height: width
- anchors.top: openLocalFolderButton.verticalCenter
- anchors.left: openLocalFolderButton.horizontalCenter
- color: Style.ncBlue
- radius: width*0.5
- z: 1
- }
-
Image {
id: folderStateIndicator
visible: UserModel.currentUser.hasLocalFolder
@@ -507,12 +500,30 @@ Window {
Accessible.role: Accessible.Indicator
Accessible.name: UserModel.currentUser.isConnected ? qsTr("Connected") : qsTr("Disconnected")
- z: 2
+ z: 1
+
+ Rectangle {
+ id: folderStateIndicatorBackground
+ width: Style.folderStateIndicatorSize + 2
+ height: width
+ anchors.centerIn: parent
+ color: UserModel.currentUser.headerColor
+ radius: width*0.5
+ z: -2
+ }
+
+ Rectangle {
+ id: folderStateIndicatorBackgroundMouseHover
+ width: Style.folderStateIndicatorSize + 2
+ height: width
+ anchors.centerIn: parent
+ color: openLocalFolderButton.hovered ? "white" : "transparent"
+ opacity: 0.2
+ radius: width*0.5
+ z: -1
+ }
}
}
-
- Accessible.role: Accessible.Button
- Accessible.name: qsTr("Open local folder of current account")
}
HeaderButton {
@@ -520,6 +531,7 @@ Window {
visible: UserModel.currentUser.serverHasTalk
icon.source: "qrc:///client/theme/white/talk-app.svg"
+ icon.color: UserModel.currentUser.headerTextColor
onClicked: UserModel.openCurrentAccountTalk()
Accessible.role: Accessible.Button
@@ -530,6 +542,7 @@ Window {
HeaderButton {
id: trayWindowAppsButton
icon.source: "qrc:///client/theme/white/more-apps.svg"
+ icon.color: UserModel.currentUser.headerTextColor
onClicked: {
if(appsMenu.count <= 0) {