2020-05-20 01:39:57 +00:00
|
|
|
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
|
|
|
|
|
2020-05-20 20:49:00 +00:00
|
|
|
import "../opaque" as Opaque
|
2020-05-20 02:39:01 +00:00
|
|
|
import "../opaque/styles"
|
|
|
|
import "../opaque/theme"
|
2020-05-20 01:39:57 +00:00
|
|
|
|
2020-11-20 19:06:41 +00:00
|
|
|
RowLayout {
|
2020-09-03 22:42:46 +00:00
|
|
|
id: root
|
2020-11-20 19:06:41 +00:00
|
|
|
property alias handle: prow.handle
|
|
|
|
property alias displayName: prow.displayName
|
|
|
|
property alias image: prow.image
|
|
|
|
property alias tag: prow.tag
|
|
|
|
property alias badgeColor: prow.badgeColor
|
|
|
|
property var rowClicked: {}
|
|
|
|
property var editClicked: {}
|
|
|
|
|
|
|
|
Opaque.PortraitRow {
|
|
|
|
id: prow
|
|
|
|
badgeColor: Theme.portraitProfileBadgeColor
|
|
|
|
Layout.fillWidth: true
|
|
|
|
portraitBorderColor: Theme.portraitOnlineBorderColor
|
|
|
|
portraitColor: Theme.portraitOnlineBackgroundColor
|
|
|
|
nameColor: Theme.portraitOnlineTextColor
|
|
|
|
onionColor: Theme.portraitOnlineTextColor
|
|
|
|
|
|
|
|
badgeContent: Image {// Profle Type
|
|
|
|
id: profiletype
|
|
|
|
source: tag == "v1-userPassword" ? gcd.assetPath + "core/lock-24px.webp" : gcd.assetPath + "core/lock_open-24px.webp"
|
|
|
|
height: Theme.badgeTextSize * gcd.themeScale
|
|
|
|
width: height
|
|
|
|
}
|
2020-05-20 01:39:57 +00:00
|
|
|
|
2020-11-20 19:06:41 +00:00
|
|
|
onClicked: rowClicked(handle)
|
2020-05-20 01:39:57 +00:00
|
|
|
}
|
|
|
|
|
2020-09-03 22:42:46 +00:00
|
|
|
Opaque.Icon {// Edit BUTTON
|
2020-05-20 01:39:57 +00:00
|
|
|
id: btnEdit
|
2020-11-20 19:06:41 +00:00
|
|
|
source: gcd.assetPath + "core/edit-24px.webp"
|
|
|
|
Layout.minimumWidth: 80
|
|
|
|
Layout.fillHeight: true
|
|
|
|
backgroundColor: Theme.backgroundMainColor
|
|
|
|
hilightBackgroundColor: Theme.backgroundHilightElementColor
|
2020-09-03 22:42:46 +00:00
|
|
|
iconColor: Theme.altTextColor
|
2020-05-20 01:39:57 +00:00
|
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
2020-11-20 19:06:41 +00:00
|
|
|
// Layout.alignment: Qt.AlignVCenter
|
2020-05-20 01:39:57 +00:00
|
|
|
|
|
|
|
|
2020-11-20 19:06:41 +00:00
|
|
|
height: root.height / 2
|
|
|
|
width: root.height / 2
|
|
|
|
size: root.height / 2
|
2020-09-03 22:42:46 +00:00
|
|
|
|
2020-11-20 19:06:41 +00:00
|
|
|
onClicked: editClicked(handle, displayName, tag, image)
|
2020-05-20 01:39:57 +00:00
|
|
|
}
|
|
|
|
}
|
2020-11-20 19:06:41 +00:00
|
|
|
|