Skip to content
Snippets Groups Projects
Commit 4379e45c authored by Aline Gondim Santos's avatar Aline Gondim Santos
Browse files

customizetipbox: fix editline and avatar button size

Change-Id: I22484eca75f32c20127868efeed02d2f5c59396c
parent 29207d73
No related branches found
No related tags found
No related merge requests found
daemon @ b2937e7a
Subproject commit ebcfa3eadac3ed44c8487f0f631e104614382282
Subproject commit b2937e7a60da94e31d501b37e9240a7fc88a8b71
......@@ -38,6 +38,7 @@ Item {
property real avatarSize
property real buttonSize: avatarSize
property bool darkTheme: false
property bool doubleEditAvatar: false
signal focusOnPreviousItem
signal focusOnNextItem
......@@ -128,46 +129,47 @@ Item {
id: imageLayer
anchors.centerIn: parent
width: avatarSize
height: avatarSize
anchors.fill: parent
color: "transparent"
Avatar {
id: avatar
anchors.fill: parent
width: avatarSize
height: avatarSize
anchors.centerIn: parent
anchors.margins: 1
mode: newItem? Avatar.Mode.Conversation : Avatar.Mode.Account
fillMode: Image.PreserveAspectCrop
showPresenceIndicator: false
}
PushButton {
id: editImage
PushButton {
id: editImage
width: avatar.width / 4
height: avatar.height / 4
anchors.top: parent.top
anchors.right: parent.right
anchors.margins: avatar.width / 22
width: doubleEditAvatar ? avatar.width / 2 : avatar.width / 4
height: doubleEditAvatar ? avatar.height / 2 : avatar.height / 4
anchors.top: parent.top
anchors.right: parent.right
anchors.margins: doubleEditAvatar ? height / 4 : avatar.width / 22
source: JamiResources.round_edit_24dp_svg
source: JamiResources.round_edit_24dp_svg
preferredSize: avatar.width / 6
preferredSize: doubleEditAvatar ? avatar.width / 3 : avatar.width / 6
border.color: JamiTheme.buttonTintedBlue
normalColor: "white"
imageColor: JamiTheme.buttonTintedBlue
hoveredColor: "#e5eef5"
pressedColor: "#e5eef5"
enabled: avatar.visible && !root.readOnly
border.color: JamiTheme.buttonTintedBlue
normalColor: "white"
imageColor: JamiTheme.buttonTintedBlue
hoveredColor: "#e5eef5"
pressedColor: "#e5eef5"
enabled: avatar.visible && !root.readOnly
onClicked :{
onClicked :{
imageLayer.visible = false
buttonsRowLayout.visible = true
}
imageLayer.visible = false
buttonsRowLayout.visible = true
}
}
}
......
......@@ -81,9 +81,8 @@ ColumnLayout {
PhotoboothView {
id: setAvatarWidget
Layout.preferredWidth: JamiTheme.accountListAvatarSize
Layout.preferredHeight: JamiTheme.accountListAvatarSize
Layout.topMargin: 10
width: avatarSize + avatarSize / 2
height: avatarSize + avatarSize / 2
Layout.alignment: Qt.AlignHCenter
darkTheme: UtilsAdapter.luma(JamiTheme.primaryBackgroundColor)
visible: opened
......@@ -91,6 +90,7 @@ ColumnLayout {
buttonSize: 35
imageId: CurrentAccount.id
avatarSize: 53
doubleEditAvatar: true
cancelButton: false
}
......@@ -103,6 +103,7 @@ ColumnLayout {
Layout.alignment: Qt.AlignCenter
Layout.preferredWidth: root.width - 32
Layout.topMargin: -10
text: CurrentAccount.alias
placeholderText: JamiStrings.enterNickname
......
......@@ -111,6 +111,8 @@ Rectangle {
Layout.alignment: Qt.AlignCenter
darkTheme: UtilsAdapter.luma(root.color)
width: avatarSize
height: avatarSize
newItem: true
imageId: root.visible ? "temp" : ""
......
......@@ -57,12 +57,14 @@ Rectangle {
id: currentAccountAvatar
darkTheme: UtilsAdapter.luma(root.color)
readOnly: !root.isAdmin
width: avatarSize
height: avatarSize
Layout.alignment: Qt.AlignHCenter
newItem: true
imageId: LRCInstance.selectedConvUid
avatarSize: JamiTheme.smartListAvatarSize
avatarSize: JamiTheme.smartListAvatarSize * 3/2
}
EditableLineEdit {
......
......@@ -37,15 +37,15 @@ Item {
property string type : ""
property bool hovered: false
property bool clicked : false
property bool opened: activeFocus
property bool opened: false
property string customizeTip:"CustomizeTipBox {}"
property string backupTip: "BackupTipBox {
onIgnore: {
root.ignoreClicked()
}
}"
property string backupTip: "BackupTipBox {" +
" onIgnore: {" +
" root.ignoreClicked()" +
" }" +
"}"
property string infoTip: "InformativeTipBox {}"
......@@ -89,7 +89,7 @@ Item {
TapHandler {
target: rect
onTapped: opened ? focus = false : root.forceActiveFocus()
onTapped: opened = !opened
}
DropShadow {
......
......@@ -58,6 +58,8 @@ ColumnLayout {
PhotoboothView {
id: currentAccountAvatar
darkTheme: UtilsAdapter.luma(JamiTheme.primaryBackgroundColor)
width: avatarSize
height: avatarSize
Layout.alignment: Qt.AlignCenter
......
......@@ -429,6 +429,8 @@ Rectangle {
PhotoboothView {
id: currentAccountAvatar
width: avatarSize
height: avatarSize
darkTheme: UtilsAdapter.luma(JamiTheme.primaryBackgroundColor)
visible: openedNickname
......
......@@ -275,6 +275,8 @@ Rectangle {
PhotoboothView {
id: currentAccountAvatar
darkTheme: UtilsAdapter.luma(JamiTheme.primaryBackgroundColor)
width: avatarSize
height: avatarSize
Layout.alignment: Qt.AlignCenter
Layout.topMargin: 50
......
......@@ -99,6 +99,8 @@ Rectangle {
id: setAvatarWidget
objectName: "setAvatarWidget"
width: avatarSize
height: avatarSize
Layout.alignment: Qt.AlignCenter
darkTheme: UtilsAdapter.luma(JamiTheme.primaryBackgroundColor)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment