<file>src/gui/tray/ActivityItemContent.qml</file>
<file>src/gui/tray/TalkReplyTextField.qml</file>
<file>src/gui/tray/CallNotificationDialog.qml</file>
+ <file>src/gui/tray/NCBusyIndicator.qml</file>
</qresource>
</RCC>
--- /dev/null
+/*
+ * Copyright (C) 2022 by Claudio Cambra <claudio.cambra@nextcloud.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ */
+
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+import Style 1.0
+
+BusyIndicator {
+ id: root
+
+ property color color: Style.ncSecondaryTextColor
+ property string imageSource: "image://svgimage-custom-color/change.svg/"
+
+ contentItem: Image {
+ id: contentImage
+
+ property bool colourableImage: root.color && root.imageSource.startsWith("image://svgimage-custom-color/")
+
+ horizontalAlignment: Image.AlignHCenter
+ verticalAlignment: Image.AlignVCenter
+
+ source: colourableImage ? root.imageSource + root.color : root.imageSource
+ sourceSize.width: 64
+ sourceSize.height: 64
+ fillMode: Image.PreserveAspectFit
+
+ mipmap: true
+
+ RotationAnimator {
+ target: contentImage
+ running: root.running
+ onRunningChanged: contentImage.rotation = 0
+ from: 0
+ to: 360
+ loops: Animation.Infinite
+ duration: 3000
+ }
+ }
+}
id: syncStatus
}
- Image {
+ NCBusyIndicator {
id: syncIcon
property int size: Style.trayListItemIconSize * 0.6
property int whiteSpace: (Style.trayListItemIconSize - size)
Layout.bottomMargin: 16
Layout.leftMargin: Style.trayHorizontalMargin + (whiteSpace * (0.5 - Style.thumbnailImageSizeReduction))
- source: syncStatus.syncIcon
- sourceSize.width: 64
- sourceSize.height: 64
- rotation: syncStatus.syncing ? 0 : 0
- }
-
- RotationAnimator {
- target: syncIcon
- running: syncStatus.syncing
- from: 0
- to: 360
- loops: Animation.Infinite
- duration: 3000
+ padding: 0
+
+ imageSource: syncStatus.syncIcon
+ running: syncStatus.syncing
}
ColumnLayout {
sourceSize: Qt.size(parent.height * parent.textFieldIconsScaleFactor, parent.height * parent.textFieldIconsScaleFactor)
}
- BusyIndicator {
- id: trayWindowUnifiedSearchTextFieldIconInProgress
- running: visible
- visible: trayWindowUnifiedSearchTextField.isSearchInProgress
+ NCBusyIndicator {
+ id: busyIndicator
+
anchors {
left: trayWindowUnifiedSearchTextField.left
bottom: trayWindowUnifiedSearchTextField.bottom
bottomMargin: 4
verticalCenter: trayWindowUnifiedSearchTextField.verticalCenter
}
+
width: height
+ color: trayWindowUnifiedSearchTextField.textFieldIconsColor
+ visible: trayWindowUnifiedSearchTextField.isSearchInProgress
+ running: visible
}
Image {