feat(desktop) Added image function in Style

Introduced Style.svg() Style.png() Style.emoji() and
Style.icon() in Style.qml. Those should be used to
set the source in Images instead of using relative
paths. Usage:
Image {
   source: Style.svg("check)
   ....

Also moved all Singletons inside a new "utils"
folder and made it a QML module, to use
import utils 1.0 instead of relative paths

Closes #3678
This commit is contained in:
Alexandra Betouni 2021-09-28 18:04:06 +03:00 committed by Iuri Matias
parent 1ae0b91014
commit 4ee21ada05
11424 changed files with 942 additions and 595 deletions

View File

@ -104,6 +104,7 @@ proc mainProc() =
let engine = newQQmlApplicationEngine()
defer: engine.delete()
engine.addImportPath("qrc:/./StatusQ/src")
engine.addImportPath("qrc:/./imports")
engine.setNetworkAccessManagerFactory(networkAccessFactory)
engine.setRootContextProperty("uiScaleFilePath", newQVariant(uiScaleFilePath))

View File

@ -2,7 +2,7 @@ import QtQuick 2.13
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
import QtGraphicalEffects 1.13
import "../../../imports"
import utils 1.0
import "../../../shared"
import "../../../shared/status"

View File

@ -1,9 +1,9 @@
import QtQuick 2.13
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
import utils 1.0
import "../../../shared"
import "../../../shared/status"
import "../../../imports"
Popup {
property var currentTab
@ -66,13 +66,13 @@ Popup {
SVGImage {
id: dots1
source: "../../img/dots-icon.svg"
source: Style.svg("dots-icon")
width: 20
height: 4
}
RoundedIcon {
source: "../../img/check.svg"
source: Style.svg("check")
iconColor: Style.current.primary
color: Style.current.secondaryBackground
width: 24
@ -81,13 +81,13 @@ Popup {
SVGImage {
id: dots2
source: "../../img/dots-icon.svg"
source: Style.svg("dots-icon")
width: 20
height: 4
}
RoundedIcon {
source: "../../img/walletIcon.svg"
source: Style.svg("walletIcon")
iconHeight: 18
iconWidth: 18
iconColor: accountSelector.selectedAccount.iconColor || Style.current.primary

View File

@ -4,9 +4,9 @@ import QtQuick.Layouts 1.13
import Qt.labs.settings 1.0
import QtQuick.Controls.Styles 1.0
import QtWebEngine 1.10
import utils 1.0
import "../../../shared"
import "../../../shared/status"
import "../../../imports"
Rectangle {
property alias addressBar: addressBar
@ -226,7 +226,7 @@ Rectangle {
id: connectedBtnComponent
StatusButton {
id: accountBtnConnected
icon.source: "../../img/walletIcon.svg"
icon.source: Style.svg("walletIcon")
icon.width: 18
icon.height: 18
icon.color: walletModel.dappBrowserView.dappBrowserAccount.iconColor

View File

@ -7,9 +7,9 @@ import QtWebChannel 1.13
import Qt.labs.settings 1.0
import QtQuick.Controls.Styles 1.0
import QtQuick.Dialogs 1.2
import utils 1.0
import "../../../shared"
import "../../../shared/status"
import "../../../imports"
import "../Chat/ChatColumn/ChatComponents"
import "./components"
@ -211,7 +211,7 @@ Rectangle {
//% "Transaction pending..."
toastMessage.title = qsTrId("ens-transaction-pending")
toastMessage.source = "../../img/loading.svg"
toastMessage.source = Style.svg("loading")
toastMessage.iconColor = Style.current.primary
toastMessage.iconRotates = true
toastMessage.link = `${_walletModel.utilsView.etherscanLink}/${responseObj.result.result}`
@ -665,7 +665,7 @@ Rectangle {
Image {
id: emptyPageImage
source: "../../img/browser/compass.png"
source: Style.png("browser/compass")
width: 294
height: 294
anchors.horizontalCenter: parent.horizontalCenter

View File

@ -1,9 +1,9 @@
import QtQuick 2.13
import QtQuick.Controls 2.3
import QtWebEngine 1.9
import utils 1.0
import "../../../shared"
import "../../../shared/status"
import "../../../imports"
import "../Chat/ChatColumn/ChatComponents"
import "../Profile/LeftTab/constants.js" as ProfileConstants

View File

@ -2,7 +2,8 @@ import QtQuick 2.13
import QtQuick.Controls.Styles 1.0
import "../../../shared"
import "../../../shared/status"
import "../../../imports"
import utils 1.0
TabViewStyle {
property color fillColor: Style.current.background

View File

@ -2,9 +2,9 @@ import QtQuick 2.13
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
import QtGraphicalEffects 1.13
import utils 1.0
import "../../../shared"
import "../../../shared/status"
import "../../../imports"
import "../Wallet"
Popup {

View File

@ -1,8 +1,8 @@
import QtQuick 2.1
import QtGraphicalEffects 1.13
import utils 1.0
import "../../../shared"
import "../../../shared/status"
import "../../../imports"
Rectangle {
property bool isVisible: false

View File

@ -1,10 +1,10 @@
import QtQuick 2.1
import QtQuick.Controls 2.13
import QtGraphicalEffects 1.13
import utils 1.0
import "../../../shared"
import "../../../shared/status/core"
import "../../../shared/status"
import "../../../imports"
Rectangle {
@ -71,7 +71,7 @@ Rectangle {
Component {
id: fileImageComponent
SVGImage {
source: "../../img/browser/file.svg"
source: Style.svg("browser/file")
width: 24
height: 24
ColorOverlay {
@ -139,7 +139,7 @@ Rectangle {
Action {
enabled: downloadComplete
icon.source: "../../img/browser/file.svg"
icon.source: Style.svg("browser/file")
icon.width: 16
icon.height: 16
//% "Open"
@ -147,7 +147,7 @@ Rectangle {
onTriggered: openFile()
}
Action {
icon.source: "../../img/add_watch_only.svg"
icon.source: Style.svg("add_watch_only")
icon.width: 13
icon.height: 9
//% "Show in folder"
@ -156,7 +156,7 @@ Rectangle {
}
Action {
enabled: !downloadComplete && !!downloadModel.downloads[index] && !downloadModel.downloads[index].isPaused
icon.source: "../../img/browser/pause.svg"
icon.source: Style.svg("browser/pause")
icon.width: 16
icon.height: 16
//% "Pause"
@ -167,7 +167,7 @@ Rectangle {
}
Action {
enabled: !downloadComplete && !!downloadModel.downloads[index] && downloadModel.downloads[index].isPaused
icon.source: "../../img/browser/play.svg"
icon.source: Style.svg("browser/play")
icon.width: 16
icon.height: 16
//% "Resume"
@ -183,7 +183,7 @@ Rectangle {
Action {
enabled: !downloadComplete
icon.source: "../../img/block-icon.svg"
icon.source: Style.svg("block-icon")
icon.width: 13
icon.height: 13
//% "Cancel"

View File

@ -5,7 +5,8 @@ import QtWebEngine 1.9
import QtQuick.Layouts 1.0
import "../../../shared"
import "../../../shared/status"
import "../../../imports"
import utils 1.0
Rectangle {
id: downloadView

View File

@ -1,6 +1,7 @@
import QtQuick 2.13
import "../../../shared"
import "../../../imports"
import utils 1.0
Image {
property var currentTab
@ -10,5 +11,5 @@ Image {
height: 24
sourceSize: Qt.size(width, height)
// TODO find a better default favicon
source: faviconImage.currentTab && !!faviconImage.currentTab.icon.toString() ? faviconImage.currentTab.icon : "../../img/compassActive.svg"
source: faviconImage.currentTab && !!faviconImage.currentTab.icon.toString() ? faviconImage.currentTab.icon : Style.svg("compassActive")
}

View File

@ -3,7 +3,8 @@ import QtQuick.Controls 2.3
import QtWebEngine 1.9
import "../../../shared"
import "../../../shared/status"
import "../../../imports"
import utils 1.0
import "../Chat/ChatColumn/ChatComponents"
import "../Profile/LeftTab/constants.js" as ProfileConstants
@ -18,7 +19,7 @@ PopupMenu {
Action {
//% "Open in new Tab"
text: qsTrId("open-in-new-tab")
icon.source: "../../img/generate_account.svg"
icon.source: Style.svg("generate_account")
icon.width: 16
icon.height: 16
onTriggered: {
@ -31,7 +32,7 @@ PopupMenu {
Action {
//% "Edit"
text: qsTrId("edit")
icon.source: "../../img/edit.svg"
icon.source: Style.svg("edit")
icon.width: 16
icon.height: 16
onTriggered: {
@ -45,7 +46,7 @@ PopupMenu {
Action {
//% "Remove"
text: qsTrId("remove")
icon.source: "../../img/remove.svg"
icon.source: Style.svg("remove")
icon.color: Style.current.danger
icon.width: 16
icon.height: 16

View File

@ -2,7 +2,8 @@ import QtQuick 2.13
import QtQuick.Layouts 1.13
import "../../../shared"
import "../../../shared/status"
import "../../../imports"
import utils 1.0
RowLayout {
id: favoritesBar

View File

@ -1,7 +1,8 @@
import QtQuick 2.13
import "../../../shared"
import "../../../shared/status"
import "../../../imports"
import utils 1.0
import "./components"
GridView {

View File

@ -54,7 +54,8 @@ import QtGraphicalEffects 1.13
import QtQuick.Layouts 1.0
import "../../../shared"
import "../../../shared/status"
import "../../../imports"
import utils 1.0
Rectangle {
id: root

View File

@ -4,7 +4,8 @@ import QtQuick.Layouts 1.13
import QtWebEngine 1.10
import "../../../shared"
import "../../../shared/status"
import "../../../imports"
import utils 1.0
ModalPopup {
id: root

View File

@ -3,7 +3,8 @@ import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
import QtQuick.Dialogs 1.3
import QtGraphicalEffects 1.13
import "../../../imports"
import utils 1.0
import "../../../shared"
import "../../../shared/status"
@ -113,7 +114,7 @@ ModalPopup {
width: undefined
anchors.verticalCenter: parent.verticalCenter
fillMode: Image.PreserveAspectFit
source: "../../img/walletIcon.svg"
source: Style.svg("walletIcon")
ColorOverlay {
visible: parent.visible
anchors.fill: parent
@ -174,7 +175,7 @@ ModalPopup {
width: 13
anchors.verticalCenter: parent.verticalCenter
fillMode: Image.PreserveAspectFit
source: "../../img/caret.svg"
source: Style.svg("caret")
rotation: 270
ColorOverlay {
anchors.fill: parent

View File

@ -5,7 +5,8 @@ import StatusQ.Core.Theme 0.1
import "../../../../shared"
import "../../../../shared/status"
import "../../../../imports"
import utils 1.0
Item {
property url webUrl
@ -23,7 +24,7 @@ Item {
width: 48
height: 48
anchors.horizontalCenter: parent.horizontalCenter
source: !!root.source && !!root.source.toString() ? root.source :"../../../img/compassActive.svg"
source: !!root.source && !!root.source.toString() ? root.source : Style.svg("compassActive")
visible: root.source && root.source.toString()
}

View File

@ -10,7 +10,8 @@ import StatusQ.Controls 0.1
import "../../../shared"
import "../../../shared/status"
import "../../../imports"
import utils 1.0
import "./components"
import "./ChatColumn"
import "./ChatColumn/ChatComponents"
@ -636,7 +637,7 @@ Item {
onTransactionWasSent: {
//% "Transaction pending..."
toastMessage.title = qsTr("Transaction pending...")
toastMessage.source = "../../../img/loading.svg"
toastMessage.source = Style.svg("loading")
toastMessage.iconColor = Style.current.primary
toastMessage.iconRotates = true
toastMessage.link = `${walletModel.utilsView.etherscanLink}/${txResult}`
@ -650,10 +651,10 @@ Item {
//% "Stickerpack bought successfully"
qsTrId("stickerpack-bought-successfully");
if (success) {
toastMessage.source = "../../../img/check-circle.svg"
toastMessage.source = Style.svg("check-circle")
toastMessage.iconColor = Style.current.success
} else {
toastMessage.source = "../../../img/block-icon.svg"
toastMessage.source = Style.svg("block-icon")
toastMessage.iconColor = Style.current.danger
}

View File

@ -4,7 +4,8 @@ import QtQml.Models 2.13
import QtGraphicalEffects 1.13
import "../../../../shared"
import "../../../../shared/status"
import "../../../../imports"
import utils 1.0
import "./ChatComponents"
import "../components"
import "./MessageComponents"

View File

@ -1,6 +1,7 @@
import QtQuick 2.13
import QtGraphicalEffects 1.13
import "../../../../../imports"
import utils 1.0
import "../../../../../shared"
import "../../../../../shared/status"
import "../MessageComponents"
@ -69,7 +70,7 @@ Item {
height: 16
anchors.verticalCenter: chatName.verticalCenter
anchors.left: parent.left
source: "../../../../img/channel-icon-group.svg"
source: Style.svg("channel-icon-group")
ColorOverlay {
anchors.fill: parent

View File

@ -1,5 +1,6 @@
import QtQuick 2.13
import "../../../../../imports"
import utils 1.0
import "../../../../../shared"
import "../../../../../shared/status"
import "../../components"

View File

@ -1,6 +1,7 @@
import QtQuick 2.13
import QtQuick.Controls 2.13
import "../../../../../imports"
import utils 1.0
import "../../../../../shared"
import "../../../../../shared/status"
import ".."
@ -99,7 +100,7 @@ Item {
y: moreActionsBtn.height + 4
Action {
icon.source: hideReadNotifications ? "../../../../img/eye.svg" : "../../../../img/eye-barred.svg"
icon.source: hideReadNotifications ? Style.svg("eye") : Style.svg("eye-barred")
icon.width: 16
icon.height: 16
text: hideReadNotifications ?
@ -110,7 +111,7 @@ Item {
onTriggered: hideReadNotifications = !hideReadNotifications
}
Action {
icon.source: "../../../../img/bell.svg"
icon.source: Style.svg("bell")
icon.width: 16
icon.height: 16
//% "Notification settings"

View File

@ -1,6 +1,7 @@
import QtQuick 2.13
import QtGraphicalEffects 1.13
import "../../../../../imports"
import utils 1.0
import "../../../../../shared"
import "../../../../../shared/status"
import ".."
@ -64,7 +65,7 @@ Rectangle {
id: replyIcon
width: 16
height: 16
source: "../../../../img/reply-small-arrow.svg"
source: Style.svg("reply-small-arrow")
anchors.left: parent.left
anchors.verticalCenter:parent.verticalCenter
}

View File

@ -1,13 +1,14 @@
import QtQuick 2.13
import QtQuick.Controls 2.13
import QtGraphicalEffects 1.13
import "../../../../../imports"
import utils 1.0
import "../../../../../shared"
Rectangle {
property color iconColor
property string text: "My command"
property url iconSource: "../../../../img/send.svg"
property url iconSource: Style.svg("send")
property bool rotatedImage: false
property var onClicked: function () {}
@ -30,7 +31,7 @@ Rectangle {
SVGImage {
id: iconImage
source: "../../../../img/send.svg"
source: Style.svg("send")
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
width: 16

View File

@ -2,7 +2,8 @@ import QtQuick 2.13
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
import QtQuick.Dialogs 1.3
import "../../../../../imports"
import utils 1.0
import "../../../../../shared"
import "../../../../../shared/status"

View File

@ -1,11 +1,12 @@
import QtQuick 2.13
import QtQuick.Controls 2.13
import QtGraphicalEffects 1.13
import "../../../../../imports"
import utils 1.0
import "../../../../../shared"
Rectangle {
property url source: "../../../../img/emojiBtn.svg"
property url source: Style.svg("emojiBtn")
property bool hovered: false
property bool opened: false
property var close: function () {}

View File

@ -1,5 +1,6 @@
import QtQuick 2.13
import "../../../../../imports"
import utils 1.0
import "../../../../../shared"
import "../../../../../shared/status"
@ -10,7 +11,7 @@ Item {
Image {
id: waveImg
source: "../../../../img/wave.png"
source: Style.png("wave")
width: 80
height: 80
anchors.horizontalCenter: parent.horizontalCenter

View File

@ -2,7 +2,8 @@ import QtQuick 2.13
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
import QtQuick.Dialogs 1.3
import "../../../../../imports"
import utils 1.0
import "../../../../../shared"
import "../../../../../shared/status"
import "../../../Wallet/"
@ -352,7 +353,7 @@ ModalPopup {
//% "Transaction pending..."
toastMessage.title = qsTrId("ens-transaction-pending")
toastMessage.source = "../../../../img/loading.svg"
toastMessage.source = Style.svg("loading")
toastMessage.iconColor = Style.current.primary
toastMessage.iconRotates = true
toastMessage.link = `${walletModel.utilsView.etherscanLink}/${transactionId}`

View File

@ -7,7 +7,8 @@ import QtGraphicalEffects 1.13
import QtQuick.Dialogs 1.3
import "../../../../shared"
import "../../../../shared/status"
import "../../../../imports"
import utils 1.0
import "../components"
import "./samples/"
import "./MessageComponents"
@ -129,7 +130,7 @@ Item {
height: 24
anchors.verticalCenter: parent.verticalCenter
anchors.left: nbMessages.right
source: "../../../img/leave_chat.svg"
source: Style.svg("leave_chat")
anchors.leftMargin: nbMessages.visible ? scrollDownButton.buttonPadding : 0
rotation: -90

View File

@ -2,7 +2,8 @@ import QtQuick 2.13
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
import "../../../../shared"
import "../../../../imports"
import utils 1.0
import "../components"
Item {
@ -14,7 +15,7 @@ Item {
id: walkieTalkieImage
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
source: "../../../../onboarding/img/chat@2x.png"
source: Style.png("onboarding/chat@2x")
}
Item {

View File

@ -2,7 +2,8 @@ import QtQuick 2.13
import "../../../../shared"
import "../../../../shared/status"
import "../../../../shared/status/core"
import "../../../../imports"
import utils 1.0
import "./MessageComponents"
import "../components"

View File

@ -1,7 +1,8 @@
import QtQuick 2.3
import QtMultimedia 5.14
import "../../../../../shared"
import "../../../../../imports"
import utils 1.0
Item {
property string audioSource: ""
@ -17,7 +18,7 @@ Item {
SVGImage {
id: playButton
source: audioMessage.playbackState == Audio.PlayingState ? "../../../../img/icon-pause.svg" : "../../../../img/icon-play.svg"
source: audioMessage.playbackState == Audio.PlayingState ? Style.svg("icon-pause") : Style.svg("icon-play")
width: 15
height: 15
anchors.left: parent.left
@ -104,4 +105,4 @@ Item {
}
}
}
}
}

View File

@ -1,6 +1,7 @@
import QtQuick 2.14
import "../../../../../shared"
import "../../../../../imports"
import utils 1.0
Column {
property string authorCurrentMsg: "authorCurrentMsg"

View File

@ -2,7 +2,8 @@ import QtQuick 2.13
import QtGraphicalEffects 1.13
import "../../../../../shared"
import "../../../../../shared/status"
import "../../../../../imports"
import utils 1.0
Rectangle {
id: buttonsContainer

View File

@ -3,7 +3,8 @@ import QtQuick.Shapes 1.13
import QtGraphicalEffects 1.13
import "../../../../../shared"
import "../../../../../shared/status"
import "../../../../../imports"
import utils 1.0
Loader {
property int textFieldWidth: item ? item.textField.width : 0

View File

@ -1,6 +1,7 @@
import QtQuick 2.13
import "../../../../../shared"
import "../../../../../imports"
import utils 1.0
import QtGraphicalEffects 1.0
Item {
@ -153,7 +154,7 @@ Item {
width: 256
height: 44
fillMode: Image.PreserveAspectFit
source: "../../../../img/read-more.svg"
source: Style.svg("read-more")
z: 100
rotation: root.readMore ? 180 : 0
MouseArea {

View File

@ -1,7 +1,8 @@
import QtQuick 2.14
import "../../../../../shared"
import "../../../../../shared/status"
import "../../../../../imports"
import utils 1.0
StyledText {
id: chatTime

View File

@ -2,7 +2,8 @@ import QtQuick 2.13
import QtGraphicalEffects 1.13
import "../../../../../shared"
import "../../../../../shared/status"
import "../../../../../imports"
import utils 1.0
Item {
id: root
@ -169,7 +170,7 @@ Item {
SVGImage {
id: pinImage
source: "../../../../img/pin.svg"
source: Style.svg("pin")
anchors.left: parent.left
anchors.leftMargin: 3
width: 16

View File

@ -1,6 +1,7 @@
import QtQuick 2.3
import "../../../../../shared"
import "../../../../../imports"
import utils 1.0
StyledText {
property bool isActivityCenterMessage: false

View File

@ -3,7 +3,8 @@ import QtQuick.Controls 2.13
import QtGraphicalEffects 1.13
import "../../../../../shared"
import "../../../../../shared/status"
import "../../../../../imports"
import utils 1.0
Item {
id: root
@ -131,14 +132,13 @@ Item {
height: 15
fillMode: Image.PreserveAspectFit
source: {
const basePath = "../../../../img/emojiReactions/"
switch (modelData.emojiId) {
case 1: return basePath + "heart.svg"
case 2: return basePath + "thumbsUp.svg"
case 3: return basePath + "thumbsDown.svg"
case 4: return basePath + "laughing.svg"
case 5: return basePath + "sad.svg"
case 6: return basePath + "angry.svg"
case 1: return Style.svg("emojiReactions/heart")
case 2: return Style.svg("emojiReactions/thumbsUp")
case 3: return Style.svg("emojiReactions/thumbsDown")
case 4: return Style.svg("emojiReactions/laughing")
case 5: return Style.svg("emojiReactions/sad")
case 6: return Style.svg("emojiReactions/angry")
default: return ""
}
}
@ -186,7 +186,7 @@ Item {
property bool isHovered: false
id: addEmojiBtn
source: "../../../../img/emoji.svg"
source: Style.svg("emoji")
width: 16.5
height: 16.5
anchors.left: parent.left

View File

@ -2,7 +2,8 @@ import QtQuick 2.3
import QtQuick.Dialogs 1.3
import "../../../../../shared"
import "../../../../../shared/status"
import "../../../../../imports"
import utils 1.0
import "./TransactionComponents"
import "../../../Wallet/data"

View File

@ -1,7 +1,8 @@
import QtQuick 2.13
import QtGraphicalEffects 1.13
import QtQuick.Layouts 1.13
import "../../../../../imports"
import utils 1.0
import "../../../../../shared"
import "../../../../../shared/status"
import "./" as MessageComponents
@ -298,7 +299,7 @@ Column {
Image {
id: unfurlingImage
source: "../../../../img/unfurling-image.png"
source: Style.png("unfurling-image")
width: 132
height: 94
anchors.horizontalCenter: parent.horizontalCenter

View File

@ -2,7 +2,8 @@ import QtQuick 2.13
import QtGraphicalEffects 1.13
import QtQuick.Layouts 1.13
import "./" as MessageComponents
import "../../../../../imports"
import utils 1.0
import "../../../../../shared"
Item {

View File

@ -1,6 +1,7 @@
import QtQuick 2.13
import "../../../../../shared"
import "../../../../../imports"
import utils 1.0
MouseArea {
enabled: !placeholderMessage

View File

@ -1,7 +1,8 @@
import QtQuick 2.13
import "../../../../../shared"
import "../../../../../shared/status"
import "../../../../../imports"
import utils 1.0
Item {
property var clickMessage: function () {}

View File

@ -1,7 +1,8 @@
import QtQuick 2.3
import "../../../../../shared"
import "../../../../../imports"
import utils 1.0
StyledText {
id: retryLbl

View File

@ -1,10 +1,11 @@
import QtQuick 2.3
import "../../../../../shared"
import "../../../../../imports"
import utils 1.0
SVGImage {
id: sentMessage
width: visible ? 9 : 0
height: visible ? 9 : 0
source: visible ? "../../../../img/check.svg" : ""
source: visible ? Style.svg("check") : ""
}

View File

@ -1,7 +1,8 @@
import QtQuick 2.3
import QtGraphicalEffects 1.13
import "../../../../../shared"
import "../../../../../imports"
import utils 1.0
import "../../../../../shared/status"
MouseArea {

View File

@ -1,6 +1,7 @@
import QtQuick 2.3
import "../../../../../shared"
import "../../../../../imports"
import utils 1.0
import "./TransactionComponents"
import "../../../Wallet/data"

View File

@ -1,7 +1,8 @@
import QtQuick 2.3
import "../../ChatComponents"
import "../../../../../../shared"
import "../../../../../../imports"
import utils 1.0
Item {
property int state: Constants.addressRequested

View File

@ -2,7 +2,8 @@ import QtQuick 2.13
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
import QtQuick.Dialogs 1.3
import "../../../../../../imports"
import utils 1.0
import "../../../../../../shared"
import "../../../../../../shared/status"

View File

@ -1,6 +1,7 @@
import QtQuick 2.3
import "../../../../../../shared"
import "../../../../../../imports"
import utils 1.0
import "../../ChatComponents"
Item {

View File

@ -1,7 +1,8 @@
import QtQuick 2.3
import QtGraphicalEffects 1.13
import "../../../../../../shared"
import "../../../../../../imports"
import utils 1.0
Rectangle {
property int state: Constants.pending
@ -22,10 +23,10 @@ Rectangle {
case Constants.pending:
case Constants.addressReceived:
case Constants.transactionRequested:
case Constants.addressRequested: return "../../../../../img/dotsLoadings.svg"
case Constants.confirmed: return "../../../../../img/check.svg"
case Constants.addressRequested: return Style.svg("dotsLoadings")
case Constants.confirmed: return Style.svg("check")
case Constants.transactionDeclined:
case Constants.declined: return "../../../../../img/exclamation.svg"
case Constants.declined: return Style.svg("exclamation")
default: return ""
}
}

View File

@ -1,6 +1,7 @@
import QtQuick 2.3
import "../../../../../shared"
import "../../../../../imports"
import utils 1.0
Loader {
property int imageHeight: 36

View File

@ -1,6 +1,7 @@
import QtQuick 2.3
import "../../../../../shared"
import "../../../../../imports"
import utils 1.0
Item {
id: root

View File

@ -21,7 +21,8 @@ import QtQuick 2.13
import QtQuick.Controls 2.13
import QtGraphicalEffects 1.13
import QtQml.Models 2.13
import "../../../../imports"
import utils 1.0
import "../../../../shared"
import "../../../../shared/status"

View File

@ -2,7 +2,8 @@ import QtQuick 2.13
import QtQuick.Controls 2.13
import "../../../../shared"
import "../../../../shared/status"
import "../../../../imports"
import utils 1.0
import "../components"
import StatusQ.Components 0.1

View File

@ -8,7 +8,8 @@ import QtGraphicalEffects 1.13
import QtQuick.Dialogs 1.3
import "../../../../shared"
import "../../../../shared/status"
import "../../../../imports"
import utils 1.0
import "../components"
import "./samples/"
import "./MessageComponents"

View File

@ -1,7 +1,8 @@
import QtQuick 2.13
import QtQuick.Controls 2.13
import Qt.labs.settings 1.0
import "../../../imports"
import utils 1.0
import "../../../shared"
import "../../../shared/status"
import "."

View File

@ -7,7 +7,8 @@ import QtQuick.Layouts 1.13
import StatusQ.Components 0.1
import StatusQ.Popups 0.1
import "../../../imports"
import utils 1.0
import "../../../shared"
import "../../../shared/status"
import "./components"

View File

@ -2,7 +2,8 @@ import QtQuick 2.12
import QtQuick.Controls 2.3
import QtGraphicalEffects 1.13
import QtQuick.Dialogs 1.3
import "../../../../imports"
import utils 1.0
import "../../../../shared"
import "../../../../shared/status"

View File

@ -2,7 +2,8 @@ import QtQuick 2.13
import QtGraphicalEffects 1.13
import "../../../../shared"
import "../../../../shared/status"
import "../../../../imports"
import utils 1.0
import "."
Rectangle {
@ -29,7 +30,7 @@ Rectangle {
anchors.top: parent.top
anchors.topMargin: -6
anchors.horizontalCenter: parent.horizontalCenter
source: "../../../img/key.svg"
source: Style.svg("key")
width: 40
height: 40
ColorOverlay {

View File

@ -8,7 +8,8 @@ import StatusQ.Controls 0.1
import StatusQ.Components 0.1
import StatusQ.Popups 0.1
import "../../../../imports"
import utils 1.0
import "../../../../shared"
StatusModal {

View File

@ -8,7 +8,8 @@ import StatusQ.Components 0.1
import StatusQ.Controls 0.1
import StatusQ.Popups 0.1
import "../../../../imports"
import utils 1.0
import "../../../../shared"
StatusModal {

View File

@ -4,7 +4,8 @@ import QtQuick.Controls 2.12
import StatusQ.Controls 0.1
import StatusQ.Popups 0.1
import "../../../../imports"
import utils 1.0
StatusModal {

View File

@ -3,7 +3,8 @@ import QtQuick.Controls 2.12
import QtQuick.Dialogs 1.3
import QtQuick.Layouts 1.13
import QtGraphicalEffects 1.13
import "../../../../imports"
import utils 1.0
import "../../../../shared"
import "../../../../shared/status"

View File

@ -8,7 +8,8 @@ import StatusQ.Components 0.1
import StatusQ.Controls 0.1
import StatusQ.Popups 0.1
import "../../../../imports"
import utils 1.0
import "../../../../shared"
import "../components"

View File

@ -7,7 +7,8 @@ import StatusQ.Controls 0.1
import StatusQ.Components 0.1
import StatusQ.Popups 0.1
import "../../../../imports"
import utils 1.0
Column {
id: root
@ -156,7 +157,7 @@ Column {
/* // anchors.verticalCenter: parent.verticalCenter */
/* // anchors.right: parent.right */
/* // anchors.rightMargin: Style.current.padding */
/* // source: "../../../img/caret.svg" */
/* // source: Style.svg("caret") */
/* // width: 13 */
/* // height: 7 */
/* // rotation: -90 */

View File

@ -8,7 +8,8 @@ import QtGraphicalEffects 1.13
import QtQuick.Dialogs 1.3
import "../../../../shared"
import "../../../../shared/status"
import "../../../../imports"
import utils 1.0
import "../components"
import "../ChatColumn/MessageComponents"
import "../ChatColumn/"

View File

@ -3,7 +3,8 @@ import QtQuick.Controls 2.13
import QtGraphicalEffects 1.13
import "../../../../shared"
import "../../../../shared/status"
import "../../../../imports"
import utils 1.0
import "."
Rectangle {
@ -31,7 +32,7 @@ Rectangle {
anchors.top: parent.top
anchors.topMargin: -6
anchors.horizontalCenter: parent.horizontalCenter
source: "../../../img/chatEmptyHeader.svg"
source: Style.svg("chatEmptyHeader")
width: 66
height: 50
}

View File

@ -1,7 +1,8 @@
import QtQuick 2.12
import QtQuick.Controls 2.3
import QtQuick.Dialogs 1.3
import "../../../../imports"
import utils 1.0
import "../../../../shared"
import StatusQ.Core 0.1

View File

@ -1,7 +1,8 @@
import QtQuick 2.12
import QtQuick.Controls 2.3
import QtQuick.Dialogs 1.3
import "../../../../imports"
import utils 1.0
import StatusQ.Core 0.1
import StatusQ.Core.Theme 0.1

View File

@ -2,7 +2,8 @@ import QtQuick 2.12
import QtQuick.Controls 2.3
import QtGraphicalEffects 1.13
import QtQuick.Dialogs 1.3
import "../../../../imports"
import utils 1.0
import "../../../../shared"
import StatusQ.Core 0.1
@ -187,7 +188,7 @@ StatusModal {
SVGImage {
id: imageImg
source: "../../../img/images_icon.svg"
source: Style.svg("images_icon")
width: 20
height: 18
anchors.horizontalCenter: parent.horizontalCenter

View File

@ -7,7 +7,8 @@ import StatusQ.Controls 0.1
import StatusQ.Components 0.1
import StatusQ.Popups 0.1
import "../../../../imports"
import utils 1.0
import "../../../../shared"
import "../components"

View File

@ -3,7 +3,8 @@ import QtQuick.Controls 2.13
import QtGraphicalEffects 1.13
import "../../../../shared"
import "../../../../shared/status"
import "../../../../imports"
import utils 1.0
import "."
Item {

View File

@ -3,7 +3,8 @@ import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
import QtGraphicalEffects 1.13
import "../../../../shared"
import "../../../../imports"
import utils 1.0
import "../components"
import "./"
@ -44,7 +45,7 @@ Rectangle {
SVGImage {
id: caret
source: "../../../img/caret.svg"
source: Style.svg("caret")
fillMode: Image.PreserveAspectFit
rotation: -90
anchors.right: parent.right

View File

@ -7,7 +7,8 @@ import StatusQ.Controls 0.1
import StatusQ.Components 0.1
import StatusQ.Popups 0.1
import "../../../../imports"
import utils 1.0
import "../../../../shared"
StatusModal {

View File

@ -7,7 +7,8 @@ import StatusQ.Components 0.1
import StatusQ.Controls 0.1
import StatusQ.Popups 0.1
import "../../../../imports"
import utils 1.0
StatusModal {
property int checkedMembership: Constants.communityChatPublicAccess

View File

@ -6,7 +6,8 @@ import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
import StatusQ.Popups 0.1
import "../../../../imports"
import utils 1.0
import "../../../../shared"
StatusModal {

View File

@ -2,7 +2,8 @@ import QtQuick 2.13
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
import "../../../imports"
import utils 1.0
import "../../../shared"
import "../../../shared/status"
import "./components"
@ -370,7 +371,7 @@ Item {
toastMessage.uuid = communityImportingProcessId
//% "Importing community is in progress"
toastMessage.title = qsTrId("importing-community-is-in-progress")
toastMessage.source = "../../img/loading.svg"
toastMessage.source = Style.svg("loading")
toastMessage.iconRotates = true
toastMessage.dissapearInMs = -1
}

View File

@ -4,7 +4,8 @@ import QtQuick.Layouts 1.13
import QtGraphicalEffects 1.13
import "../components"
import "../../../../shared"
import "../../../../imports"
import utils 1.0
Item {
id: closedEmptyView

View File

@ -6,7 +6,8 @@ import "../components"
import "../data/channelList.js" as ChannelJSON
import "../../../../shared"
import "../../../../shared/status"
import "../../../../imports"
import utils 1.0
Rectangle {
id: emptyView
@ -37,7 +38,7 @@ Rectangle {
anchors.top: parent.top
anchors.topMargin: -6
anchors.horizontalCenter: parent.horizontalCenter
source: "../../../img/chatEmptyHeader.svg"
source: Style.svg("chatEmptyHeader")
width: 66
height: 50
}

View File

@ -1,7 +1,8 @@
import QtQuick 2.13
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
import "../../../../imports"
import utils 1.0
import "../../../../shared"
import "../../../../shared/status"
@ -60,7 +61,7 @@ Row {
id: contactContextMenu
hasArrow: false
Action {
icon.source: "../../../img/profileActive.svg"
icon.source: Style.svg("profileActive")
icon.width: menuButton.iconSize
icon.height: menuButton.iconSize
//% "View Profile"
@ -70,7 +71,7 @@ Row {
}
Separator {}
Action {
icon.source: "../../../img/block-icon.svg"
icon.source: Style.svg("block-icon")
icon.width: menuButton.iconSize
icon.height: menuButton.iconSize
icon.color: Style.current.danger

View File

@ -1,6 +1,7 @@
import QtQuick 2.13
import QtGraphicalEffects 1.13
import "../../../../imports"
import utils 1.0
import "../../../../shared"
import "../../../../shared/status"
@ -53,7 +54,7 @@ Item {
visible: !hideSecondIcon
width: 16
height: 16
source: "../../../img/communities.svg"
source: Style.svg("communities")
anchors.left: parent.left
anchors.verticalCenter:parent.verticalCenter
@ -126,7 +127,7 @@ Item {
SVGImage {
id: caretImage
source: "../../../img/show-category.svg"
source: Style.svg("show-category")
width: 16
height: 16
anchors.left: communityName.right
@ -181,7 +182,7 @@ Item {
width: 16
height: 16
fillMode: Image.PreserveAspectFit
source: "../../../img/channel-icon-" + (wrapper.realChatType === Constants.chatTypePublic ? "public-chat.svg" : "group.svg")
source: Style.svg("channel-icon-" + (wrapper.realChatType === Constants.chatTypePublic ? "public-chat" : "group"))
anchors.left: parent.left
anchors.verticalCenter:parent.verticalCenter
}

View File

@ -1,7 +1,8 @@
import QtQuick 2.13
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
import "../../../../imports"
import utils 1.0
import "../../../../shared"
Item {

View File

@ -4,7 +4,8 @@ import QtQuick.Layouts 1.13
import Qt.labs.platform 1.1
import "./"
import "../../../../shared"
import "../../../../imports"
import utils 1.0
import StatusQ.Popups 0.1

View File

@ -1,6 +1,7 @@
import QtQuick 2.12
import QtQuick.Controls 2.3
import "../../../../imports"
import utils 1.0
import "../../../../shared"
import "../../../../shared/status"
@ -19,7 +20,7 @@ ModalPopup {
spacing: 20
Image {
source: "../../../img/chooseBrowserImage.png"
source: Style.png("chooseBrowserImage")
width: 240
height: 148
anchors.horizontalCenter: parent.horizontalCenter

View File

@ -2,7 +2,8 @@ import QtQuick 2.3
import QtQuick.Controls 2.3
import QtQuick.Layouts 1.3
import Qt.labs.platform 1.1
import "../../../../imports"
import utils 1.0
import "../../../../shared"
import "../../../../shared/status"

View File

@ -1,6 +1,7 @@
import QtQuick 2.13
import QtQuick.Controls 2.3
import "../../../../imports"
import utils 1.0
import "../../../../shared"
ScrollView {

View File

@ -1,7 +1,8 @@
import QtQuick 2.13
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
import "../../../../imports"
import utils 1.0
import "../../../../shared"
import "../../../../shared/status"

View File

@ -2,7 +2,8 @@ import QtQuick 2.13
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
import QtGraphicalEffects 1.13
import "../../../../imports"
import utils 1.0
import "../../../../shared"
import "../../../../shared/status"
import "../../Profile/Sections/Contacts"

View File

@ -1,5 +1,6 @@
import QtQuick 2.13
import "../../../../imports"
import utils 1.0
import "../../../../shared"
Rectangle {

View File

@ -3,7 +3,8 @@ import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
import "../../../../shared"
import "../../../../shared/status"
import "../../../../imports"
import utils 1.0
PopupMenu {
//% "Fetch Messages"

View File

@ -2,7 +2,8 @@ import QtQuick 2.12
import QtQuick.Controls 2.3
import QtQuick.Layouts 1.3
import QtQml.Models 2.3
import "../../../../imports"
import utils 1.0
import "../../../../shared"
import "../../../../shared/status"
import "./"

View File

@ -1,7 +1,8 @@
import QtQuick 2.13
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
import "../../../../imports"
import utils 1.0
import "../../../../shared"
import "../../../../shared/status"
import "./"
@ -119,7 +120,7 @@ ModalPopup {
SVGImage {
id: editGroupImg
source: "../../../img/edit-group.svg"
source: Style.svg("edit-group")
height: 16
width: 16
anchors.horizontalCenter: parent.horizontalCenter
@ -229,7 +230,7 @@ ModalPopup {
anchors.leftMargin: 0
anchors.rightMargin: 0
onClicked: openPopup(pinnedMessagesPopupComponent)
iconSource: "../../../img/pin.svg"
iconSource: Style.svg("pin")
}
Separator {
@ -343,7 +344,7 @@ ModalPopup {
PopupMenu {
id: contextMenu
Action {
icon.source: "../../../img/make-admin.svg"
icon.source: Style.svg("make-admin")
icon.width: 16
icon.height: 16
//% "Make Admin"
@ -351,7 +352,7 @@ ModalPopup {
onTriggered: chatsModel.groups.makeAdmin(popup.channel.id, model.publicKey)
}
Action {
icon.source: "../../../img/remove-from-group.svg"
icon.source: Style.svg("remove-from-group")
icon.width: 16
icon.height: 16
icon.color: Style.current.red

View File

@ -1,10 +1,11 @@
import QtQuick 2.13
import "../../../../imports"
import utils 1.0
import "../../../../shared"
SVGImage {
id: loadingImg
source: "../../../../app/img/loading.svg"
source: Style.svg("loading")
width: 25
height: 25
fillMode: Image.Stretch

View File

@ -6,7 +6,8 @@ import QtQuick.Dialogs 1.0
import StatusQ.Popups 0.1
import "../../../../imports"
import utils 1.0
import "../../../../shared"
import "../../../../shared/status"
import "./"
@ -91,7 +92,7 @@ StatusPopupMenu {
Repeater {
model: reactionModel
delegate: EmojiReaction {
source: "../../../img/" + filename
source: Style.svg(filename)
emojiId: model.emojiId
reactedByUser: !!messageContextMenu.emojiReactionsReactedByUser[model.emojiId]
closeModal: function () {

View File

@ -2,7 +2,8 @@ import QtQuick 2.13
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
import QtGraphicalEffects 1.13
import "../../../../imports"
import utils 1.0
import "../../../../shared"
import "../../../../shared/status"
import "./"

Some files were not shown because too many files have changed in this diff Show More