mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-10 06:16:32 +00:00
fac0e50e37
This component introduces `StatusLetterIdenticon`, `StatusImageIdenticon` and `StatusIdenticon`. - `StatusLetterIdenticon` renders an identicon with a single letter based on a name. - `StatusImageIdenticon` renders an actual image based on an identicon URL - `StatusIdenticon` is a composition of the former both, but with a loading mechanism to decide which should be rendered The commit also ensures all of these components are used respectively throughout the application.
27 lines
878 B
QML
27 lines
878 B
QML
import QtQuick 2.13
|
|
import "../../imports"
|
|
import "../../shared"
|
|
|
|
Rectangle {
|
|
id: root
|
|
property url source:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAg0lEQVR4nOzXwQmAMBAFURV7sQybsgybsgyr0QYUlE1g+Mw7ioQMe9lMQwhDaAyhMYTGEJqYkPnrj/t5XE/ft2UdW1yken7MRAyhMYTGEBpDaAyhKe9JbzvSX9WdLWYihtAYQuMLkcYQGkPUScxEDKExhMYQGkNoDKExhMYQmjsAAP//ZfIUZgXTZXQAAAAASUVORK5CYII="
|
|
width: 40
|
|
height: 40
|
|
color: Style.current.background
|
|
radius: width / 2
|
|
border.width: 1
|
|
border.color: Style.current.borderSecondary
|
|
|
|
Image {
|
|
width: parent.width
|
|
height: parent.height
|
|
fillMode: Image.PreserveAspectFit
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
source: root.source
|
|
mipmap: true
|
|
smooth: false
|
|
antialiasing: true
|
|
}
|
|
}
|