67 lines
1.8 KiB
QML
67 lines
1.8 KiB
QML
import QtGraphicalEffects 1.0
|
|
import QtQuick 2.7
|
|
import QtQuick.Controls 2.4
|
|
import QtQuick.Controls.Material 2.0
|
|
import QtQuick.Layouts 1.3
|
|
import CustomQmlTypes 1.0
|
|
import QtQuick.Controls 1.4
|
|
import QtQuick.Controls.Styles 1.4
|
|
|
|
import "../opaque" as Opaque
|
|
import "../opaque/styles"
|
|
import "../opaque/theme"
|
|
|
|
Opaque.PortraitRow {
|
|
id: root
|
|
badgeColor: Theme.portraitProfileBadgeColor
|
|
|
|
portraitBorderColor: Theme.portraitOnlineBorderColor
|
|
portraitColor: Theme.portraitOnlineBackgroundColor
|
|
nameColor: Theme.portraitOnlineTextColor
|
|
onionColor: Theme.portraitOnlineTextColor
|
|
|
|
badgeContent: Image {// Profle Type
|
|
id: profiletype
|
|
source: tag == "v1-userPassword" ? gcd.assetPath + "/fontawesome/solid/lock.svg" : gcd.assetPath + "/fontawesome/solid/lock-open.svg"
|
|
height: Theme.badgeTextSize * gcd.themeScale
|
|
width: height
|
|
}
|
|
|
|
Opaque.Icon {// Edit BUTTON
|
|
id: btnEdit
|
|
source: gcd.assetPath + "core/edit-24px.svg"
|
|
|
|
backgroundColor: root.color
|
|
iconColor: Theme.altTextColor
|
|
|
|
anchors.right: parent.right
|
|
|
|
//rectUnread.left
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
anchors.leftMargin: 1 * gcd.themeScale
|
|
anchors.rightMargin: 20 * gcd.themeScale
|
|
|
|
height: parent.height * 0.5
|
|
width: parent.height * 0.5
|
|
size: parent.height * 0.5
|
|
|
|
onClicked: {
|
|
profileAddEditPane.load(handle, displayName, tag, image)
|
|
parentStack.pane = parentStack.addEditProfilePane
|
|
}
|
|
|
|
onHover: function (hover) {
|
|
root.isHover = hover
|
|
}
|
|
|
|
}
|
|
|
|
onClicked: function openClick(handle) {
|
|
gcd.broadcast("ResetMessagePane");
|
|
gcd.broadcast("ResetProfile");
|
|
gcd.selectedProfile = handle
|
|
gcd.loadProfile(handle)
|
|
parentStack.pane = parentStack.profilePane
|
|
}
|
|
}
|