Skip to content

Commit

Permalink
Fix #3067: missing apps icon.
Browse files Browse the repository at this point in the history
Signed-off-by: Camila <hello@camila.codes>
  • Loading branch information
Camila committed Apr 6, 2021
1 parent d99285f commit 79ba65e
Showing 1 changed file with 42 additions and 50 deletions.
92 changes: 42 additions & 50 deletions src/gui/tray/Window.qml
Original file line number Diff line number Diff line change
Expand Up @@ -403,67 +403,59 @@ Window {
}
}

// Filler between account dropdown and header app buttons
Item {
id: trayWindowHeaderSpacer
Layout.fillWidth: true
}

HeaderButton {
id: openLocalFolderButton
RowLayout {
id: openLocalFolderRowLayout
height: Style.trayWindowHeaderHeight
width: height
anchors.left: accountControlRowLayout.right
anchors.top: accountControlRowLayout.top
spacing: 0
Layout.preferredWidth: Style.trayWindowHeaderHeight
Layout.preferredHeight: Style.trayWindowHeaderHeight

HeaderButton {
id: openLocalFolderButton
visible: UserModel.currentUser.hasLocalFolder
icon.source: "qrc:///client/theme/white/folder.svg"
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
}

visible: UserModel.currentUser.hasLocalFolder
icon.source: "qrc:///client/theme/white/folder.svg"
onClicked: UserModel.openCurrentAccountLocalFolder()
Image {
id: folderStateIndicator
source: UserModel.isUserConnected(UserModel.currentUserId)
? Style.stateOnlineImageSource
: Style.stateOfflineImageSource
cache: false
x: folderStateIndicatorBackground.x
y: folderStateIndicatorBackground.y

sourceSize.width: Style.folderStateIndicatorSize
sourceSize.height: Style.folderStateIndicatorSize

Accessible.role: Accessible.Indicator
Accessible.name: UserModel.isUserConnected(UserModel.currentUserId()) ? qsTr("Connected") : qsTr("Disconnected")
}

Accessible.role: Accessible.Button
Accessible.name: qsTr("Open local folder of current account")
Accessible.onPressAction: openLocalFolderButton.clicked()
}

Rectangle {
id: folderStateIndicatorBackground
width: Style.folderStateIndicatorSize
height: width
anchors.top: openLocalFolderButton.verticalCenter
anchors.left: openLocalFolderButton.horizontalCenter
color: Style.ncBlue
radius: width*0.5
}

Rectangle {
id: folderStateRectangle
width: Style.folderStateIndicatorSize
height: width
anchors.bottom: openLocalFolderButton.bottom
anchors.right: openLocalFolderButton.right
color: openLocalFolderButton.containsMouse ? "white" : "transparent"
opacity: 0.2
radius: width*0.5
}

Image {
id: folderStateIndicator
source: UserModel.isUserConnected(UserModel.currentUserId)
? Style.stateOnlineImageSource
: Style.stateOfflineImageSource
cache: false
x: folderStateIndicatorBackground.x
y: folderStateIndicatorBackground.y
sourceSize.width: Style.folderStateIndicatorSize
sourceSize.height: Style.folderStateIndicatorSize

Accessible.role: Accessible.Indicator
Accessible.name: UserModel.isUserConnected(UserModel.currentUserId()) ? qsTr("Connected") : qsTr("Disconnected")
}

HeaderButton {
id: trayWindowTalkButton

visible: UserModel.currentUser.serverHasTalk
icon.source: "qrc:///client/theme/white/talk-app.svg"
onClicked: UserModel.openCurrentAccountTalk()

Accessible.role: Accessible.Button
Accessible.name: qsTr("Open Nextcloud Talk in browser")
Accessible.onPressAction: trayWindowTalkButton.clicked()
Expand Down

0 comments on commit 79ba65e

Please sign in to comment.