2019-12-08 13:32:22 +03:00
|
|
|
import QtQml 2.0
|
|
|
|
import QtQuick 2.9
|
|
|
|
import QtQuick.Window 2.2
|
|
|
|
import QtQuick.Controls 2.2
|
|
|
|
import QtQuick.Layouts 1.2
|
|
|
|
import QtGraphicalEffects 1.0
|
|
|
|
|
|
|
|
Window {
|
|
|
|
|
|
|
|
id: trayWindow
|
|
|
|
visible: true
|
|
|
|
width: 400
|
|
|
|
height: 500
|
|
|
|
color: "transparent"
|
|
|
|
flags: Qt.FramelessWindowHint
|
|
|
|
|
2019-12-30 13:39:21 +03:00
|
|
|
onActiveChanged: {
|
|
|
|
if(!active) {
|
|
|
|
trayWindow.hide();
|
2020-01-05 18:25:32 +03:00
|
|
|
systrayBackend.setClosed();
|
2019-12-30 13:39:21 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-01-03 15:09:29 +03:00
|
|
|
onVisibleChanged: {
|
|
|
|
currentAccountAvatar.source = ""
|
|
|
|
currentAccountAvatar.source = "image://avatars/currentUser"
|
|
|
|
currentAccountUser.text = userModelBackend.currentUserName();
|
|
|
|
currentAccountServer.text = userModelBackend.currentUserServer();
|
|
|
|
trayWindowTalkButton.visible = userModelBackend.currentServerHasTalk() ? true : false;
|
2020-01-11 17:05:37 +03:00
|
|
|
|
|
|
|
userLineInstantiator.active = false;
|
|
|
|
userLineInstantiator.active = true;
|
2020-01-03 15:09:29 +03:00
|
|
|
}
|
|
|
|
|
2019-12-08 13:32:22 +03:00
|
|
|
Connections {
|
2019-12-30 13:52:07 +03:00
|
|
|
target: userModelBackend
|
2019-12-08 13:32:22 +03:00
|
|
|
onRefreshCurrentUserGui: {
|
2020-01-03 15:09:29 +03:00
|
|
|
currentAccountAvatar.source = ""
|
|
|
|
currentAccountAvatar.source = "image://avatars/currentUser"
|
|
|
|
currentAccountUser.text = userModelBackend.currentUserName();
|
|
|
|
currentAccountServer.text = userModelBackend.currentUserServer();
|
2019-12-08 13:32:22 +03:00
|
|
|
}
|
|
|
|
onNewUserSelected: {
|
2020-01-03 15:09:29 +03:00
|
|
|
accountMenu.close();
|
|
|
|
trayWindowTalkButton.visible = userModelBackend.currentServerHasTalk() ? true : false;
|
2019-12-08 13:32:22 +03:00
|
|
|
}
|
2019-12-30 13:52:07 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
Connections {
|
|
|
|
target: systrayBackend
|
2019-12-30 13:39:21 +03:00
|
|
|
onShowWindow: {
|
2020-01-05 18:25:32 +03:00
|
|
|
accountMenu.close();
|
2019-12-30 13:39:21 +03:00
|
|
|
trayWindow.show();
|
2020-01-05 18:25:32 +03:00
|
|
|
trayWindow.raise();
|
2019-12-30 13:39:21 +03:00
|
|
|
trayWindow.requestActivate();
|
2019-12-30 16:14:28 +03:00
|
|
|
trayWindow.setX( systrayBackend.calcTrayWindowX());
|
|
|
|
trayWindow.setY( systrayBackend.calcTrayWindowY());
|
2020-01-05 18:25:32 +03:00
|
|
|
systrayBackend.setOpened();
|
2019-12-30 13:39:21 +03:00
|
|
|
}
|
|
|
|
onHideWindow: {
|
|
|
|
trayWindow.hide();
|
2020-01-05 18:25:32 +03:00
|
|
|
systrayBackend.setClosed();
|
2019-12-30 13:39:21 +03:00
|
|
|
}
|
2019-12-08 13:32:22 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
id: trayWindowBackground
|
|
|
|
anchors.fill: parent
|
|
|
|
radius: 10
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
id: trayWindowHeaderBackground
|
|
|
|
anchors.left: trayWindowBackground.left
|
|
|
|
anchors.top: trayWindowBackground.top
|
|
|
|
height: 60
|
|
|
|
width: parent.width
|
|
|
|
radius: 9
|
|
|
|
color: "#0082c9"
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
anchors.left: trayWindowHeaderBackground.left
|
|
|
|
anchors.bottom: trayWindowHeaderBackground.bottom
|
|
|
|
height: 30
|
|
|
|
width: parent.width
|
|
|
|
color: "#0082c9"
|
|
|
|
}
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
id: trayWindowHeaderLayout
|
|
|
|
spacing: 0
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
Button {
|
|
|
|
id: currentAccountButton
|
|
|
|
Layout.preferredWidth: 220
|
|
|
|
Layout.preferredHeight: (trayWindowHeaderBackground.height)
|
|
|
|
display: AbstractButton.IconOnly
|
|
|
|
flat: true
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
id: accountBtnMouseArea
|
|
|
|
anchors.fill: parent
|
|
|
|
hoverEnabled: true
|
|
|
|
onClicked:
|
|
|
|
{
|
2020-01-05 23:06:42 +03:00
|
|
|
syncPauseButton.text = systrayBackend.syncIsPaused() ? "Resume sync for all" : "Pause sync for all"
|
2019-12-08 13:32:22 +03:00
|
|
|
accountMenu.open()
|
|
|
|
}
|
|
|
|
|
|
|
|
Menu {
|
|
|
|
id: accountMenu
|
|
|
|
x: (currentAccountButton.x + 2)
|
|
|
|
y: (currentAccountButton.y + currentAccountButton.height + 2)
|
2020-01-10 18:28:53 +03:00
|
|
|
width: (currentAccountButton.width - 2)
|
2020-01-05 23:06:42 +03:00
|
|
|
closePolicy: "CloseOnPressOutside"
|
2019-12-08 13:32:22 +03:00
|
|
|
|
|
|
|
background: Rectangle {
|
|
|
|
border.color: "#0082c9"
|
|
|
|
radius: 2
|
|
|
|
}
|
|
|
|
|
|
|
|
Instantiator {
|
2020-01-10 18:28:53 +03:00
|
|
|
id: userLineInstantiator
|
2019-12-30 13:52:07 +03:00
|
|
|
model: userModelBackend
|
2019-12-08 13:32:22 +03:00
|
|
|
delegate: UserLine {}
|
2020-01-05 23:06:42 +03:00
|
|
|
onObjectAdded: accountMenu.insertItem(index, object)
|
2019-12-08 13:32:22 +03:00
|
|
|
onObjectRemoved: accountMenu.removeItem(object)
|
|
|
|
}
|
|
|
|
|
2020-01-04 19:22:56 +03:00
|
|
|
MenuItem {
|
2020-01-11 22:28:00 +03:00
|
|
|
id: addAccountButton
|
|
|
|
height: 60
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
width: addAccountButton.width
|
|
|
|
height: addAccountButton.height
|
|
|
|
spacing: 0
|
|
|
|
|
|
|
|
Image {
|
|
|
|
Layout.leftMargin: 8
|
|
|
|
verticalAlignment: Qt.AlignCenter
|
|
|
|
source: "qrc:///client/theme/black/add.svg"
|
|
|
|
sourceSize.width: addAccountButton.height - 24
|
|
|
|
sourceSize.height: addAccountButton.height - 24
|
|
|
|
}
|
|
|
|
Label {
|
|
|
|
Layout.leftMargin: 10
|
|
|
|
text: "Add account"
|
|
|
|
color: "black"
|
|
|
|
font.pixelSize: 12
|
|
|
|
}
|
|
|
|
Item {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
|
|
|
}
|
|
|
|
}
|
2020-01-04 19:22:56 +03:00
|
|
|
onClicked: userModelBackend.addAccount()
|
|
|
|
}
|
|
|
|
|
2020-01-05 23:06:42 +03:00
|
|
|
MenuSeparator { id: accountMenuSeparator }
|
2020-01-04 19:22:56 +03:00
|
|
|
|
2020-01-05 18:25:32 +03:00
|
|
|
MenuItem {
|
2020-01-05 23:06:42 +03:00
|
|
|
id: syncPauseButton
|
2020-01-05 18:25:32 +03:00
|
|
|
onClicked: systrayBackend.pauseResumeSync()
|
|
|
|
}
|
|
|
|
|
2020-01-04 19:22:56 +03:00
|
|
|
MenuItem {
|
|
|
|
text: "Open settings"
|
|
|
|
onClicked: systrayBackend.openSettings()
|
|
|
|
}
|
|
|
|
|
2020-01-05 23:06:42 +03:00
|
|
|
MenuItem {
|
|
|
|
text: "Help"
|
|
|
|
onClicked: systrayBackend.openHelp()
|
|
|
|
}
|
|
|
|
|
2020-01-04 19:22:56 +03:00
|
|
|
MenuItem {
|
|
|
|
text: "Quit Nextcloud"
|
|
|
|
onClicked: systrayBackend.shutdown()
|
|
|
|
}
|
|
|
|
|
|
|
|
Component.onCompleted: {/*
|
|
|
|
if(userModelBackend.numUsers() === 1) {
|
2019-12-08 13:32:22 +03:00
|
|
|
accountMenuSeparator.height = 0
|
|
|
|
} else {
|
|
|
|
accountMenuSeparator.height = 13
|
2020-01-04 19:22:56 +03:00
|
|
|
}*/
|
2019-12-08 13:32:22 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
background:
|
|
|
|
Item {
|
|
|
|
id: leftHoverContainer
|
|
|
|
height: currentAccountButton.height
|
|
|
|
width: currentAccountButton.width
|
|
|
|
Rectangle {
|
|
|
|
width: currentAccountButton.width / 2
|
|
|
|
height: currentAccountButton.height / 2
|
|
|
|
color: "transparent"
|
|
|
|
clip: true
|
|
|
|
Rectangle {
|
|
|
|
width: currentAccountButton.width
|
|
|
|
height: currentAccountButton.height
|
|
|
|
radius: 10
|
|
|
|
color: "white"
|
|
|
|
opacity: 0.2
|
|
|
|
visible: accountBtnMouseArea.containsMouse
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Rectangle {
|
|
|
|
width: currentAccountButton.width / 2
|
|
|
|
height: currentAccountButton.height / 2
|
|
|
|
anchors.bottom: leftHoverContainer.bottom
|
|
|
|
color: "white"
|
|
|
|
opacity: 0.2
|
|
|
|
visible: accountBtnMouseArea.containsMouse
|
|
|
|
}
|
|
|
|
Rectangle {
|
|
|
|
width: currentAccountButton.width / 2
|
|
|
|
height: currentAccountButton.height / 2
|
|
|
|
anchors.right: leftHoverContainer.right
|
|
|
|
color: "white"
|
|
|
|
opacity: 0.2
|
|
|
|
visible: accountBtnMouseArea.containsMouse
|
|
|
|
}
|
|
|
|
Rectangle {
|
|
|
|
width: currentAccountButton.width / 2
|
|
|
|
height: currentAccountButton.height / 2
|
|
|
|
anchors.right: leftHoverContainer.right
|
|
|
|
anchors.bottom: leftHoverContainer.bottom
|
|
|
|
color: "white"
|
|
|
|
opacity: 0.2
|
|
|
|
visible: accountBtnMouseArea.containsMouse
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
RowLayout {
|
|
|
|
id: accountControlRowLayout
|
|
|
|
height: currentAccountButton.height
|
|
|
|
width: currentAccountButton.width
|
|
|
|
spacing: 0
|
|
|
|
Image {
|
|
|
|
id: currentAccountAvatar
|
|
|
|
Layout.leftMargin: 8
|
|
|
|
verticalAlignment: Qt.AlignCenter
|
2020-01-03 15:09:29 +03:00
|
|
|
cache: false
|
|
|
|
source: "image://avatars/currentUser"
|
2019-12-08 13:32:22 +03:00
|
|
|
Layout.preferredHeight: (trayWindowHeaderBackground.height -16)
|
|
|
|
Layout.preferredWidth: (trayWindowHeaderBackground.height -16)
|
|
|
|
}
|
|
|
|
|
|
|
|
Column {
|
|
|
|
id: accountLabels
|
|
|
|
spacing: 4
|
|
|
|
Layout.alignment: Qt.AlignLeft
|
|
|
|
Layout.leftMargin: 6
|
|
|
|
Label {
|
|
|
|
id: currentAccountUser
|
2020-01-05 23:06:42 +03:00
|
|
|
width: 128
|
2019-12-30 13:52:07 +03:00
|
|
|
text: userModelBackend.currentUserName()
|
2020-01-05 23:06:42 +03:00
|
|
|
elide: Text.ElideRight
|
2019-12-08 13:32:22 +03:00
|
|
|
color: "white"
|
2020-01-04 19:22:56 +03:00
|
|
|
font.pixelSize: 12
|
2019-12-08 13:32:22 +03:00
|
|
|
font.bold: true
|
|
|
|
}
|
|
|
|
Label {
|
|
|
|
id: currentAccountServer
|
2020-01-05 23:06:42 +03:00
|
|
|
width: 128
|
2019-12-30 13:52:07 +03:00
|
|
|
text: userModelBackend.currentUserServer()
|
2020-01-05 23:06:42 +03:00
|
|
|
elide: Text.ElideRight
|
2019-12-08 13:32:22 +03:00
|
|
|
color: "white"
|
2020-01-04 19:22:56 +03:00
|
|
|
font.pixelSize: 10
|
2019-12-08 13:32:22 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Image {
|
2020-01-05 23:06:42 +03:00
|
|
|
Layout.alignment: Qt.AlignRight
|
2019-12-08 13:32:22 +03:00
|
|
|
verticalAlignment: Qt.AlignCenter
|
2020-01-05 23:06:42 +03:00
|
|
|
Layout.margins: 8
|
2019-12-08 13:32:22 +03:00
|
|
|
source: "qrc:///client/theme/white/caret-down.svg"
|
2020-01-04 14:18:06 +03:00
|
|
|
sourceSize.width: 20
|
|
|
|
sourceSize.height: 20
|
2019-12-08 13:32:22 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Item {
|
|
|
|
id: trayWindowHeaderSpacer
|
|
|
|
Layout.fillWidth: true
|
|
|
|
}
|
|
|
|
|
|
|
|
Button {
|
|
|
|
id: openLocalFolderButton
|
|
|
|
Layout.alignment: Qt.AlignRight
|
|
|
|
display: AbstractButton.IconOnly
|
|
|
|
Layout.preferredWidth: (trayWindowHeaderBackground.height)
|
|
|
|
Layout.preferredHeight: (trayWindowHeaderBackground.height)
|
|
|
|
flat: true
|
|
|
|
|
|
|
|
icon.source: "qrc:///client/theme/white/folder.svg"
|
|
|
|
icon.color: "transparent"
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
id: folderBtnMouseArea
|
|
|
|
anchors.fill: parent
|
|
|
|
hoverEnabled: true
|
|
|
|
onClicked:
|
|
|
|
{
|
2020-01-02 11:55:37 +03:00
|
|
|
userModelBackend.openCurrentAccountLocalFolder();
|
2019-12-08 13:32:22 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
background:
|
|
|
|
Rectangle {
|
|
|
|
color: folderBtnMouseArea.containsMouse ? "white" : "transparent"
|
|
|
|
opacity: 0.2
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Button {
|
|
|
|
id: trayWindowTalkButton
|
|
|
|
Layout.alignment: Qt.AlignRight
|
|
|
|
display: AbstractButton.IconOnly
|
|
|
|
Layout.preferredWidth: (trayWindowHeaderBackground.height)
|
|
|
|
Layout.preferredHeight: (trayWindowHeaderBackground.height)
|
|
|
|
flat: true
|
2020-01-03 15:09:29 +03:00
|
|
|
visible: userModelBackend.currentServerHasTalk() ? true : false
|
2019-12-08 13:32:22 +03:00
|
|
|
|
|
|
|
icon.source: "qrc:///client/theme/white/talk-app.svg"
|
|
|
|
icon.color: "transparent"
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
id: talkBtnMouseArea
|
|
|
|
anchors.fill: parent
|
|
|
|
hoverEnabled: true
|
|
|
|
onClicked:
|
|
|
|
{
|
2020-01-03 16:00:07 +03:00
|
|
|
userModelBackend.openCurrentAccountTalk();
|
2019-12-08 13:32:22 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
background:
|
|
|
|
Rectangle {
|
|
|
|
color: talkBtnMouseArea.containsMouse ? "white" : "transparent"
|
|
|
|
opacity: 0.2
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Button {
|
|
|
|
id: trayWindowAppsButton
|
|
|
|
Layout.alignment: Qt.AlignRight
|
|
|
|
display: AbstractButton.IconOnly
|
|
|
|
Layout.preferredWidth: (trayWindowHeaderBackground.height)
|
|
|
|
Layout.preferredHeight: (trayWindowHeaderBackground.height)
|
|
|
|
flat: true
|
|
|
|
|
|
|
|
icon.source: "qrc:///client/theme/white/more-apps.svg"
|
|
|
|
icon.color: "transparent"
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
id: appsBtnMouseArea
|
|
|
|
anchors.fill: parent
|
|
|
|
hoverEnabled: true
|
|
|
|
onClicked:
|
|
|
|
{
|
2020-01-03 16:00:07 +03:00
|
|
|
userModelBackend.openCurrentAccountServer();
|
2019-12-08 13:32:22 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
background:
|
|
|
|
Item {
|
|
|
|
id: rightHoverContainer
|
|
|
|
height: trayWindowAppsButton.height
|
|
|
|
width: trayWindowAppsButton.width
|
|
|
|
Rectangle {
|
|
|
|
width: trayWindowAppsButton.width / 2
|
|
|
|
height: trayWindowAppsButton.height / 2
|
|
|
|
color: "white"
|
|
|
|
opacity: 0.2
|
|
|
|
visible: appsBtnMouseArea.containsMouse
|
|
|
|
}
|
|
|
|
Rectangle {
|
|
|
|
width: trayWindowAppsButton.width / 2
|
|
|
|
height: trayWindowAppsButton.height / 2
|
|
|
|
anchors.bottom: rightHoverContainer.bottom
|
|
|
|
color: "white"
|
|
|
|
opacity: 0.2
|
|
|
|
visible: appsBtnMouseArea.containsMouse
|
|
|
|
}
|
|
|
|
Rectangle {
|
|
|
|
width: trayWindowAppsButton.width / 2
|
|
|
|
height: trayWindowAppsButton.height / 2
|
|
|
|
anchors.bottom: rightHoverContainer.bottom
|
|
|
|
anchors.right: rightHoverContainer.right
|
|
|
|
color: "white"
|
|
|
|
opacity: 0.2
|
|
|
|
visible: appsBtnMouseArea.containsMouse
|
|
|
|
}
|
|
|
|
Rectangle {
|
|
|
|
id: rightHoverContainerClipper
|
|
|
|
anchors.right: rightHoverContainer.right
|
|
|
|
width: trayWindowAppsButton.width / 2
|
|
|
|
height: trayWindowAppsButton.height / 2
|
|
|
|
color: "transparent"
|
|
|
|
clip: true
|
|
|
|
Rectangle {
|
|
|
|
width: trayWindowAppsButton.width
|
|
|
|
height: trayWindowAppsButton.height
|
|
|
|
anchors.right: rightHoverContainerClipper.right
|
|
|
|
radius: 10
|
|
|
|
color: "white"
|
|
|
|
opacity: 0.2
|
|
|
|
visible: appsBtnMouseArea.containsMouse
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} // Rectangle trayWindowHeaderBackground
|
|
|
|
|
|
|
|
ListView {
|
|
|
|
id: activityListView
|
|
|
|
anchors.top: trayWindowHeaderBackground.bottom
|
|
|
|
width: trayWindowBackground.width
|
|
|
|
height: trayWindowBackground.height - trayWindowHeaderBackground.height
|
|
|
|
clip: true
|
|
|
|
|
2020-01-02 12:39:53 +03:00
|
|
|
model: activityModel
|
2019-12-08 13:32:22 +03:00
|
|
|
|
|
|
|
delegate: RowLayout {
|
|
|
|
id: activityItem
|
|
|
|
width: activityListView.width
|
|
|
|
height: trayWindowHeaderLayout.height
|
|
|
|
spacing: 0
|
|
|
|
Image {
|
|
|
|
id: activityIcon
|
|
|
|
Layout.leftMargin: 6
|
|
|
|
Layout.preferredWidth: 48
|
|
|
|
Layout.preferredHeight: 48
|
|
|
|
verticalAlignment: Qt.AlignCenter
|
|
|
|
source: "qrc:///client/theme/black/state-sync.svg"
|
|
|
|
sourceSize.height: 48
|
|
|
|
sourceSize.width: 48
|
|
|
|
}
|
|
|
|
Column {
|
2020-01-03 18:15:15 +03:00
|
|
|
id: activityTextColumn
|
2019-12-08 13:32:22 +03:00
|
|
|
Layout.leftMargin: 6
|
|
|
|
spacing: 4
|
|
|
|
Layout.alignment: Qt.AlignLeft
|
|
|
|
Text {
|
|
|
|
id: activityTextTitle
|
2020-01-03 18:15:15 +03:00
|
|
|
text: subject
|
|
|
|
width: 220
|
|
|
|
elide: Text.ElideRight
|
2019-12-08 13:32:22 +03:00
|
|
|
font.pointSize: 9
|
|
|
|
}
|
|
|
|
Text {
|
|
|
|
id: activityTextInfo
|
2020-01-03 18:15:15 +03:00
|
|
|
text: path
|
|
|
|
width: 220
|
|
|
|
elide: Text.ElideRight
|
2019-12-08 13:32:22 +03:00
|
|
|
font.pointSize: 8
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Item {
|
|
|
|
id: activityItemFiller
|
|
|
|
Layout.fillWidth: true
|
|
|
|
}
|
|
|
|
Button {
|
2020-01-03 18:15:15 +03:00
|
|
|
id: activityButton1
|
2019-12-08 13:32:22 +03:00
|
|
|
Layout.preferredWidth: activityItem.height
|
|
|
|
Layout.preferredHeight: activityItem.height
|
|
|
|
Layout.alignment: Qt.AlignRight
|
|
|
|
flat: true
|
2020-01-03 18:15:15 +03:00
|
|
|
hoverEnabled: false
|
|
|
|
visible: (path === "") ? false : true
|
2019-12-08 13:32:22 +03:00
|
|
|
display: AbstractButton.IconOnly
|
|
|
|
icon.source: "qrc:///client/resources/files.svg"
|
|
|
|
icon.color: "transparent"
|
2020-01-03 18:15:15 +03:00
|
|
|
|
|
|
|
onClicked:
|
|
|
|
{
|
|
|
|
Qt.openUrlExternally(path)
|
|
|
|
}
|
2019-12-08 13:32:22 +03:00
|
|
|
}
|
|
|
|
Button {
|
|
|
|
Layout.preferredWidth: activityItem.height
|
|
|
|
Layout.preferredHeight: activityItem.height
|
|
|
|
Layout.alignment: Qt.AlignRight
|
|
|
|
flat: true
|
2020-01-03 18:15:15 +03:00
|
|
|
hoverEnabled: false
|
2019-12-08 13:32:22 +03:00
|
|
|
display: AbstractButton.IconOnly
|
|
|
|
icon.source: "qrc:///client/resources/public.svg"
|
|
|
|
icon.color: "transparent"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
add: Transition {
|
|
|
|
NumberAnimation { properties: "y"; from: -60; duration: 100; easing.type: Easing.Linear }
|
|
|
|
}
|
|
|
|
|
|
|
|
remove: Transition {
|
|
|
|
NumberAnimation { property: "opacity"; from: 1.0; to: 0; duration: 100 }
|
|
|
|
}
|
|
|
|
|
|
|
|
removeDisplaced: Transition {
|
|
|
|
SequentialAnimation {
|
|
|
|
PauseAnimation { duration: 100}
|
|
|
|
NumberAnimation { properties: "y"; duration: 100; easing.type: Easing.Linear }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
displaced: Transition {
|
|
|
|
NumberAnimation { properties: "y"; duration: 100; easing.type: Easing.Linear }
|
|
|
|
}
|
|
|
|
|
|
|
|
focus: true
|
|
|
|
|
|
|
|
// For interactive ListView/Animation testing only
|
|
|
|
//Keys.onSpacePressed: model.insert(0, { "name": "Item " + model.count })
|
|
|
|
//Keys.onTabPressed: model.remove(3)
|
|
|
|
}
|
|
|
|
|
|
|
|
} // Rectangle trayWindowBackground
|
|
|
|
}
|