1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-09-10 12:03:18 +02:00

customizetipbox: fix editline and avatar button size

Change-Id: I22484eca75f32c20127868efeed02d2f5c59396c
This commit is contained in:
Aline Gondim Santos 2022-11-30 11:45:32 -03:00
parent 29207d7315
commit 4379e45c05
10 changed files with 49 additions and 34 deletions

2
daemon

@ -1 +1 @@
Subproject commit ebcfa3eadac3ed44c8487f0f631e104614382282
Subproject commit b2937e7a60da94e31d501b37e9240a7fc88a8b71

View file

@ -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
}
}
}

View file

@ -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

View file

@ -111,6 +111,8 @@ Rectangle {
Layout.alignment: Qt.AlignCenter
darkTheme: UtilsAdapter.luma(root.color)
width: avatarSize
height: avatarSize
newItem: true
imageId: root.visible ? "temp" : ""

View file

@ -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 {

View file

@ -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 {

View file

@ -58,6 +58,8 @@ ColumnLayout {
PhotoboothView {
id: currentAccountAvatar
darkTheme: UtilsAdapter.luma(JamiTheme.primaryBackgroundColor)
width: avatarSize
height: avatarSize
Layout.alignment: Qt.AlignCenter

View file

@ -429,6 +429,8 @@ Rectangle {
PhotoboothView {
id: currentAccountAvatar
width: avatarSize
height: avatarSize
darkTheme: UtilsAdapter.luma(JamiTheme.primaryBackgroundColor)
visible: openedNickname

View file

@ -275,6 +275,8 @@ Rectangle {
PhotoboothView {
id: currentAccountAvatar
darkTheme: UtilsAdapter.luma(JamiTheme.primaryBackgroundColor)
width: avatarSize
height: avatarSize
Layout.alignment: Qt.AlignCenter
Layout.topMargin: 50

View file

@ -99,6 +99,8 @@ Rectangle {
id: setAvatarWidget
objectName: "setAvatarWidget"
width: avatarSize
height: avatarSize
Layout.alignment: Qt.AlignCenter
darkTheme: UtilsAdapter.luma(JamiTheme.primaryBackgroundColor)