Skip to content
Snippets Groups Projects
Commit 8e2d1e5c authored by Sébastien Blin's avatar Sébastien Blin
Browse files

jamiidentifier: minor fixes

+ Fix bottom margin
+ Add copy icon from media-resources
+ Wrap ID in read only
+ remove fieldLayoutWidth/fieldLayoutHeight

GitLab: #770
Change-Id: I65743ca488d3bc601ac7d74d920d0944f03e0ace
parent ae7b446d
No related branches found
No related tags found
No related merge requests found
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
<path d="M20.4,2.2H8.5c-0.9,0-1.6,0.7-1.6,1.6v2.9H3.6C2.7,6.7,2,7.4,2,8.3v11.9c0,0.9,0.7,1.6,1.6,1.6h11.9c0.9,0,1.6-0.7,1.6-1.6
v-2.9h3.3c0.9,0,1.6-0.7,1.6-1.6V3.8C22,2.9,21.3,2.2,20.4,2.2z M15.8,20.2c0,0.2-0.1,0.3-0.3,0.3H3.6c-0.2,0-0.3-0.1-0.3-0.3V8.3
C3.3,8.2,3.4,8,3.6,8h11.9c0.2,0,0.3,0.1,0.3,0.3V20.2z M20.7,15.7c0,0.2-0.1,0.3-0.3,0.3h-3.3V8.3c0-0.9-0.7-1.6-1.6-1.6H8.2V3.8
c0-0.2,0.1-0.3,0.3-0.3h11.9c0.2,0,0.3,0.1,0.3,0.3V15.7z"/>
</svg>
\ No newline at end of file
......@@ -37,8 +37,6 @@ Item {
property alias underlined: lineEdit.underlined
property alias wrapMode: lineEdit.wrapMode
property alias padding: lineEdit.padding
property alias fieldLayoutWidth: lineEdit.fieldLayoutWidth
property alias fieldLayoutHeight: lineEdit.fieldLayoutHeight
property alias echoMode: lineEdit.echoMode
property string inactiveColor: JamiTheme.tintedBlue
property string hoveredColor: "#03B9E9"
......@@ -161,16 +159,14 @@ Item {
id: lineEdit
anchors.horizontalCenter: row.horizontalCenter
width: row.width - firstIco_.width - thirdIco_.width - secIco_.width - thirdIco_.anchors.rightMargin
height: row.height
readOnly: !editable || root.readOnly
underlined: true
verticalAlignment: Text.AlignBottom
borderColor: root.editIconColor
fieldLayoutHeight: row.height
placeholderText: readOnly? root.placeholderText : ""
wrapMode: Text.NoWrap
wrapMode: readOnly? TextEdit.WrapAnywhere : TextEdit.NoWrap
horizontalAlignment: !readOnly || text !== "" ? Qt.AlignLeft : Qt.AlignHCenter
onFocusChanged: function(focus) {
......
......@@ -26,8 +26,6 @@ TextField {
id: root
property int fontSize: JamiTheme.materialLineEditPointSize
property int fieldLayoutWidth: 256
property int fieldLayoutHeight: 48
property var backgroundColor: JamiTheme.secondaryBackgroundColor
property var borderColor: JamiTheme.greyBorderColor
......
......@@ -35,9 +35,6 @@ EditableLineEdit {
informationToolTip: JamiStrings.usernameToolTip
fieldLayoutWidth: 200
fieldLayoutHeight: 50
enum NameRegistrationState {
BLANK,
INVALID,
......
......@@ -46,12 +46,10 @@ Rectangle {
Layout.leftMargin: JamiTheme.jamiIdMargins
property var minWidth: mainRectangle.width + secondLine.implicitWidth
width: Math.max(minWidth, jamiRegisteredNameText.width + 2 * JamiTheme.preferredMarginSize)
height: component.implicitHeight
height: firstLine.implicitHeight + jamiRegisteredNameText.height + 12
color: JamiTheme.secondaryBackgroundColor
ColumnLayout {
id: component
RowLayout {
id: firstLine
Layout.alignment: Qt.AlignTop
......
......@@ -128,8 +128,6 @@ Rectangle {
verticalAlignment: Text.AlignVCenter
fieldLayoutWidth: 10
placeholderText: JamiStrings.swarmName
tooltipText: JamiStrings.swarmName
backgroundColor: root.color
......
......@@ -72,9 +72,6 @@ Rectangle {
firstIco: JamiResources.round_edit_24dp_svg
secondIco: editable ? JamiResources.close_black_24dp_svg : ""
fieldLayoutWidth: 15
fieldLayoutHeight: 30
fontSize: 20
borderColor: "transparent"
......@@ -121,9 +118,6 @@ Rectangle {
verticalAlignment: Text.AlignVCenter
Layout.preferredWidth: JamiTheme.preferredFieldWidth
fieldLayoutWidth: 15
fieldLayoutHeight: 30
fontSize: 16
firstIco: JamiResources.round_edit_24dp_svg
......
......@@ -76,6 +76,7 @@ ColumnLayout {
font.pointSize: JamiTheme.textFontSize
font.kerning: true
text: CurrentAccount.alias
placeholderText: JamiStrings.enterNickname
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
......
......@@ -122,12 +122,7 @@ ColumnLayout {
anchors.verticalCenter: parent.verticalCenter
height: JamiTheme.preferredFieldHeight
width: {
var maximumWidth = parent.width - lblRegisteredName.width
- JamiTheme.preferredMarginSize
return fieldLayoutWidth < maximumWidth ?
fieldLayoutWidth : maximumWidth
}
width: JamiTheme.preferredFieldWidth
padding: 8
horizontalAlignment: CurrentAccount.registeredName === "" ? Text.AlignLeft :
......
......@@ -129,8 +129,6 @@ Rectangle {
property string lastFirstChar
Layout.preferredHeight: fieldLayoutHeight
Layout.preferredWidth: fieldLayoutWidth
Layout.alignment: Qt.AlignCenter
focus: visible
......@@ -147,8 +145,6 @@ Rectangle {
font.pointSize: JamiTheme.textFontSize
font.kerning: true
fieldLayoutWidth: saveProfileBtn.width
KeyNavigation.tab: saveProfileBtn
KeyNavigation.down: KeyNavigation.tab
......
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