refactor: replace all the StatusImageIdenticon with StatusQ's StatusSmartIdenticon
closes #3848
This commit is contained in:
parent
7114240e72
commit
be7a56cc27
|
@ -6,6 +6,8 @@ import Qt.labs.platform 1.1
|
|||
import utils 1.0
|
||||
|
||||
import StatusQ.Controls 0.1 as StatusQControls
|
||||
import StatusQ.Components 0.1
|
||||
|
||||
import "../../../../shared/panels"
|
||||
import "../../../../shared/status"
|
||||
|
||||
|
@ -36,12 +38,13 @@ Rectangle {
|
|||
radius: Style.current.radius
|
||||
color: isHovered ? Style.current.backgroundHover : Style.current.transparent
|
||||
|
||||
StatusImageIdenticon {
|
||||
StatusSmartIdenticon {
|
||||
id: accountImage
|
||||
anchors.left: parent.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
source: identicon
|
||||
anchors.leftMargin: Style.current.padding
|
||||
image.source: identicon
|
||||
image.isIdenticon: true
|
||||
}
|
||||
|
||||
StyledText {
|
||||
|
|
|
@ -5,7 +5,8 @@ import QtQuick.Layouts 1.13
|
|||
import utils 1.0
|
||||
import "../../../../shared"
|
||||
import "../../../../shared/panels"
|
||||
import "../../../../shared/status"
|
||||
|
||||
import StatusQ.Components 0.1
|
||||
|
||||
Rectangle {
|
||||
property string name
|
||||
|
@ -26,12 +27,13 @@ Rectangle {
|
|||
radius: Style.current.radius
|
||||
color: isHovered ? Style.current.backgroundHover : Style.current.transparent
|
||||
|
||||
StatusImageIdenticon {
|
||||
StatusSmartIdenticon {
|
||||
id: accountImage
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Style.current.padding
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
source: identicon
|
||||
image.source: identicon
|
||||
image.isIdenticon: true
|
||||
}
|
||||
|
||||
StyledText {
|
||||
|
|
|
@ -5,7 +5,7 @@ import QtQml.Models 2.3
|
|||
import QtQuick.Dialogs 1.0
|
||||
|
||||
import StatusQ.Popups 0.1
|
||||
|
||||
import StatusQ.Components 0.1
|
||||
|
||||
import utils 1.0
|
||||
import "../../../../shared"
|
||||
|
@ -116,12 +116,14 @@ StatusPopupMenu {
|
|||
visible: mouseArea.containsMouse
|
||||
color: Style.current.backgroundHover
|
||||
}
|
||||
StatusImageIdenticon {
|
||||
|
||||
StatusSmartIdenticon {
|
||||
id: profileImage
|
||||
source: identicon
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 4
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
image.source: identicon
|
||||
image.isIdenticon: true
|
||||
}
|
||||
|
||||
StyledText {
|
||||
|
|
|
@ -23,10 +23,12 @@ import QtGraphicalEffects 1.13
|
|||
import QtQml.Models 2.13
|
||||
|
||||
import utils 1.0
|
||||
|
||||
import StatusQ.Components 0.1
|
||||
|
||||
import "../../../../shared"
|
||||
import "../../../../shared/panels"
|
||||
import "../../../../shared/controls"
|
||||
import "../../../../shared/status"
|
||||
|
||||
Rectangle {
|
||||
id: container
|
||||
|
@ -184,14 +186,15 @@ Rectangle {
|
|||
height: 42
|
||||
radius: Style.current.radius
|
||||
|
||||
StatusImageIdenticon {
|
||||
StatusSmartIdenticon {
|
||||
id: accountImage
|
||||
width: 32
|
||||
height: 32
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Style.current.smallPadding
|
||||
source: model.identicon
|
||||
image.width: 32
|
||||
image.height: 32
|
||||
image.source: model.identicon
|
||||
image.isIdenticon: true
|
||||
}
|
||||
|
||||
StyledText {
|
||||
|
|
|
@ -289,10 +289,11 @@ ModalPopup {
|
|||
|
||||
property string nickname: appMain.getUserNickname(model.publicKey)
|
||||
|
||||
StatusImageIdenticon {
|
||||
StatusQ.StatusSmartIdenticon {
|
||||
id: identicon
|
||||
anchors.left: parent.left
|
||||
source: appMain.getProfileImage(model.publicKey) || model.identicon
|
||||
image.source: appMain.getProfileImage(model.publicKey)|| model.identicon
|
||||
image.isIdenticon: true
|
||||
}
|
||||
|
||||
StyledText {
|
||||
|
|
|
@ -8,6 +8,7 @@ import "../../../../shared/panels"
|
|||
import "../../../../shared/status"
|
||||
|
||||
import StatusQ.Controls 0.1 as StatusQControls
|
||||
import StatusQ.Components 0.1
|
||||
|
||||
Rectangle {
|
||||
id: accountViewDelegate
|
||||
|
@ -36,13 +37,15 @@ Rectangle {
|
|||
return Style.current.transparent
|
||||
}
|
||||
|
||||
StatusImageIdenticon {
|
||||
StatusSmartIdenticon {
|
||||
id: accountImage
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Style.current.padding
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
source: identicon
|
||||
image.source : identicon
|
||||
image.isIdenticon: true
|
||||
}
|
||||
|
||||
StyledText {
|
||||
id: usernameText
|
||||
text: username
|
||||
|
|
|
@ -11,6 +11,8 @@ import "../../../../shared/panels"
|
|||
import "../../../../shared/popups"
|
||||
import "../stores"
|
||||
|
||||
import StatusQ.Components 0.1
|
||||
|
||||
// TODO: replace with StatusModal
|
||||
ModalPopup {
|
||||
id: popup
|
||||
|
@ -36,14 +38,14 @@ ModalPopup {
|
|||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
|
||||
StatusImageIdenticon {
|
||||
StatusSmartIdenticon {
|
||||
id: identicon
|
||||
source: OnboardingStore.currentAccount.identicon
|
||||
anchors.top: info.bottom
|
||||
anchors.topMargin: Style.current.bigPadding
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
width: 60
|
||||
height: 60
|
||||
image.source: OnboardingStore.currentAccount.identicon
|
||||
image.width: 60
|
||||
image.height: 60
|
||||
}
|
||||
|
||||
StyledText {
|
||||
|
|
|
@ -13,6 +13,8 @@ import "../../../../shared/status"
|
|||
import "../popups"
|
||||
import "../stores"
|
||||
|
||||
import StatusQ.Components 0.1
|
||||
|
||||
import utils 1.0
|
||||
|
||||
Item {
|
||||
|
@ -94,10 +96,11 @@ Item {
|
|||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
StatusImageIdenticon {
|
||||
StatusSmartIdenticon {
|
||||
id: userImage
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
source: LoginStore.currentAccount.thumbnailImage
|
||||
image.source : LoginStore.currentAccount.thumbnailImage
|
||||
image.isIdenticon: true
|
||||
}
|
||||
|
||||
StyledText {
|
||||
|
|
|
@ -8,6 +8,8 @@ import "../../../../shared/popups"
|
|||
import "../../../../shared/panels"
|
||||
import "../../../../shared/status"
|
||||
|
||||
import StatusQ.Components 0.1
|
||||
|
||||
Rectangle {
|
||||
property string name: "Jotaro Kujo"
|
||||
property string address: "0x04d8c07dd137bd1b73a6f51df148b4f77ddaa11209d36e43d8344c0a7d6db1cad6085f27cfb75dd3ae21d86ceffebe4cf8a35b9ce8d26baa19dc264efe6d8f221b"
|
||||
|
@ -35,12 +37,13 @@ Rectangle {
|
|||
radius: Style.current.radius
|
||||
color: isHovered ? Style.current.backgroundHover : Style.current.transparent
|
||||
|
||||
StatusImageIdenticon {
|
||||
StatusSmartIdenticon {
|
||||
id: accountImage
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Style.current.padding
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
source: identicon
|
||||
image.source: identicon
|
||||
image.isIdenticon: true
|
||||
}
|
||||
|
||||
StyledText {
|
||||
|
|
|
@ -7,9 +7,10 @@ import utils 1.0
|
|||
import "../"
|
||||
import "../views"
|
||||
import "../panels"
|
||||
import "../status"
|
||||
import "."
|
||||
|
||||
import StatusQ.Components 0.1
|
||||
|
||||
Item {
|
||||
id: root
|
||||
property var contacts
|
||||
|
@ -91,17 +92,17 @@ Item {
|
|||
menuAlignment: Select.MenuAlignment.Left
|
||||
selectedItemView: Item {
|
||||
anchors.fill: parent
|
||||
StatusImageIdenticon {
|
||||
StatusSmartIdenticon {
|
||||
id: iconImg
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 14
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
height: 32
|
||||
width: (!!selectedContact && !!selectedContact.identicon) ? 32 : 0
|
||||
visible: !!selectedContact && !!selectedContact.identicon
|
||||
source: (!!selectedContact && !!selectedContact.identicon) ? selectedContact.identicon : ""
|
||||
image.width: (!!selectedContact && !!selectedContact.identicon) ? 32 : 0
|
||||
image.height: 32
|
||||
image.source: (!!selectedContact && !!selectedContact.identicon) ? selectedContact.identicon : ""
|
||||
image.isIdenticon: true
|
||||
active: !!selectedContact && !!selectedContact.identicon
|
||||
}
|
||||
|
||||
StyledText {
|
||||
id: selectedTextField
|
||||
text: !!selectedContact ? selectedContact.name : ""
|
||||
|
@ -159,12 +160,13 @@ Item {
|
|||
|
||||
width: parent.width
|
||||
height: visible ? 72 : 0
|
||||
StatusImageIdenticon {
|
||||
StatusSmartIdenticon {
|
||||
id: iconImg
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Style.current.padding
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
source: identicon
|
||||
image.source: identicon
|
||||
image.isIdenticon: true
|
||||
}
|
||||
Column {
|
||||
anchors.left: iconImg.right
|
||||
|
|
|
@ -4,10 +4,11 @@ import QtQuick.Layouts 1.3
|
|||
import QtQml.Models 2.3
|
||||
|
||||
import utils 1.0
|
||||
import "../status"
|
||||
import "../panels"
|
||||
import "."
|
||||
|
||||
import StatusQ.Components 0.1
|
||||
|
||||
// TODO: replace with StatusPopupMenu
|
||||
PopupMenu {
|
||||
id: root
|
||||
|
@ -23,14 +24,14 @@ PopupMenu {
|
|||
visible: mouseArea.containsMouse
|
||||
color: Style.current.backgroundHover
|
||||
}
|
||||
StatusImageIdenticon {
|
||||
StatusSmartIdenticon {
|
||||
id: profileImage
|
||||
source: profileModel.profile.thumbnailImage || ""
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 4
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
image.source: profileModel.profile.thumbnailImage || ""
|
||||
image.isIdenticon: true
|
||||
}
|
||||
|
||||
StyledText {
|
||||
id: username
|
||||
text: Utils.removeStatusEns(profileModel.ens.preferredUsername || profileModel.profile.username)
|
||||
|
|
|
@ -15,6 +15,7 @@ import "../../app/AppLayouts/Chat/panels"
|
|||
import "./emojiList.js" as EmojiJSON
|
||||
|
||||
import StatusQ.Core.Theme 0.1
|
||||
import StatusQ.Components 0.1
|
||||
import StatusQ.Controls 0.1 as StatusQ
|
||||
|
||||
Rectangle {
|
||||
|
@ -851,13 +852,14 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
|
||||
StatusImageIdenticon {
|
||||
StatusSmartIdenticon {
|
||||
id: profileImage
|
||||
source: profileModel.profile.thumbnailImage || profileModel.profile.identicon
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Style.current.smallPadding
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: Style.current.halfPadding
|
||||
image.source: profileModel.profile.thumbnailImage || profileModel.profile.identicon
|
||||
image.isIdenticon: true
|
||||
visible: control.isStatusUpdateInput
|
||||
}
|
||||
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
import QtQuick 2.13
|
||||
|
||||
import utils 1.0
|
||||
import "../panels"
|
||||
|
||||
RoundedImage {
|
||||
id: root
|
||||
noHover: true
|
||||
source:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAg0lEQVR4nOzXwQmAMBAFURV7sQybsgybsgyr0QYUlE1g+Mw7ioQMe9lMQwhDaAyhMYTGEJqYkPnrj/t5XE/ft2UdW1yken7MRAyhMYTGEBpDaAyhKe9JbzvSX9WdLWYihtAYQuMLkcYQGkPUScxEDKExhMYQGkNoDKExhMYQmjsAAP//ZfIUZgXTZXQAAAAASUVORK5CYII="
|
||||
width: 40
|
||||
height: 40
|
||||
border.width: 1
|
||||
border.color: Style.current.borderSecondary
|
||||
smooth: false
|
||||
antialiasing: true
|
||||
}
|
|
@ -6,7 +6,6 @@ StatusEmojiPopup 1.0 StatusEmojiPopup.qml
|
|||
StatusEmojiSection 1.0 StatusEmojiSection.qml
|
||||
StatusGifPopup 1.0 StatusGifPopup.qml
|
||||
StatusGifColumn 1.0 StatusGifColumn.qml
|
||||
StatusImageIdenticon 1.0 StatusImageIdenticon.qml
|
||||
StatusSectionHeadline 1.0 StatusSectionHeadline.qml
|
||||
StatusStickerButton 1.0 StatusStickerButton.qml
|
||||
StatusStickerList 1.0 StatusStickerList.qml
|
||||
|
|
|
@ -13,6 +13,8 @@ import "../panels"
|
|||
import "../../app/AppLayouts/Chat/controls"
|
||||
import "./"
|
||||
|
||||
import StatusQ.Components 0.1
|
||||
|
||||
Item {
|
||||
id: root
|
||||
height: 64
|
||||
|
@ -73,12 +75,13 @@ Item {
|
|||
height: 64
|
||||
visible: root.pubKey !== "" && !root.loading
|
||||
|
||||
StatusImageIdenticon {
|
||||
StatusSmartIdenticon {
|
||||
id: contactIdenticon
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: Style.current.padding
|
||||
source: utilsModel.generateIdenticon(root.pubKey)
|
||||
image.source: utilsModel.generateIdenticon(root.pubKey)
|
||||
image.isIdenticon: true
|
||||
}
|
||||
|
||||
StyledText {
|
||||
|
|
|
@ -11,6 +11,8 @@ import "../panels"
|
|||
import "../controls"
|
||||
import "../popups"
|
||||
|
||||
import StatusQ.Components 0.1
|
||||
|
||||
Item {
|
||||
id: root
|
||||
property var fromAccount
|
||||
|
@ -253,14 +255,14 @@ Item {
|
|||
visible: false
|
||||
source: imgToWallet
|
||||
}
|
||||
StatusImageIdenticon {
|
||||
StatusSmartIdenticon {
|
||||
id: idtToContact
|
||||
visible: false
|
||||
anchors.right: toInvalid.visible ? toInvalid.left : parent.right
|
||||
anchors.rightMargin: toInvalid.visible ? Style.current.halfPadding : 0
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: 32
|
||||
height: 32
|
||||
image.width: 32
|
||||
image.height: 32
|
||||
}
|
||||
SVGImage {
|
||||
id: toInvalid
|
||||
|
|
Loading…
Reference in New Issue