settings: fix for hostname and username line edit size

- The checkbox for Ring account have a large text in french
 and cannot be wrapped in QCheckbox
- Also suppress the username being displayed twice

Issue: #80646
Issue: #80644
Change-Id: I22f8630e3a19ed5cce4910c9ee265543e27da746
diff --git a/accountdetails.cpp b/accountdetails.cpp
index 4366ded..5cafd9a 100644
--- a/accountdetails.cpp
+++ b/accountdetails.cpp
@@ -308,12 +308,6 @@
 }
 
 void
-AccountDetails::on_usernameEdit_editingFinished()
-{
-    currentAccount_->setUsername(ui->usernameEdit->text());
-}
-
-void
 AccountDetails::on_tabWidget_currentChanged(int index)
 {
     if (index == 1) {
diff --git a/accountdetails.h b/accountdetails.h
index 88f1052..1f4983b 100644
--- a/accountdetails.h
+++ b/accountdetails.h
@@ -55,7 +55,6 @@
     void on_downVideoButton_clicked();
     void on_audioCodecView_itemSelectionChanged();
     void on_videoCodecView_itemSelectionChanged();
-    void on_usernameEdit_editingFinished();
     void on_tabWidget_currentChanged(int index);
 
 private slots:
diff --git a/accountdetails.ui b/accountdetails.ui
index 4d9cad5..8c46b87 100644
--- a/accountdetails.ui
+++ b/accountdetails.ui
@@ -55,8 +55,8 @@
            <rect>
             <x>0</x>
             <y>0</y>
-            <width>733</width>
-            <height>667</height>
+            <width>746</width>
+            <height>645</height>
            </rect>
           </property>
           <layout class="QVBoxLayout" name="verticalLayout_12">
@@ -95,13 +95,6 @@
                <property name="verticalSpacing">
                 <number>10</number>
                </property>
-               <item row="1" column="0">
-                <widget class="QLabel" name="typeLabel">
-                 <property name="text">
-                  <string>Type</string>
-                 </property>
-                </widget>
-               </item>
                <item row="0" column="0">
                 <widget class="QLabel" name="aliasLabel">
                  <property name="text">
@@ -122,26 +115,10 @@
                  </property>
                 </widget>
                </item>
-               <item row="2" column="0">
-                <widget class="QLabel" name="hashLabel">
+               <item row="1" column="0">
+                <widget class="QLabel" name="typeLabel">
                  <property name="text">
-                  <string>Hash</string>
-                 </property>
-                 <property name="buddy">
-                  <cstring>lrcfg_username</cstring>
-                 </property>
-                </widget>
-               </item>
-               <item row="2" column="1">
-                <widget class="QLineEdit" name="lrcfg_username">
-                 <property name="sizePolicy">
-                  <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
-                   <horstretch>0</horstretch>
-                   <verstretch>0</verstretch>
-                  </sizepolicy>
-                 </property>
-                 <property name="readOnly">
-                  <bool>true</bool>
+                  <string>Type</string>
                  </property>
                 </widget>
                </item>
@@ -163,7 +140,7 @@
             </layout>
            </item>
            <item>
-            <layout class="QVBoxLayout" name="verticalLayout_6" stretch="0,0,0">
+            <layout class="QVBoxLayout" name="verticalLayout_6" stretch="0,0,0,0,0,0,0">
              <property name="spacing">
               <number>5</number>
              </property>
@@ -196,6 +173,12 @@
                </property>
                <item row="0" column="0">
                 <widget class="QLabel" name="hostnameLabel">
+                 <property name="sizePolicy">
+                  <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+                   <horstretch>0</horstretch>
+                   <verstretch>0</verstretch>
+                  </sizepolicy>
+                 </property>
                  <property name="text">
                   <string>Hostname</string>
                  </property>
@@ -214,32 +197,6 @@
                  </property>
                 </widget>
                </item>
-               <item row="1" column="0">
-                <widget class="QLabel" name="usernameLabel">
-                 <property name="sizePolicy">
-                  <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
-                   <horstretch>0</horstretch>
-                   <verstretch>0</verstretch>
-                  </sizepolicy>
-                 </property>
-                 <property name="text">
-                  <string>Username</string>
-                 </property>
-                 <property name="buddy">
-                  <cstring>usernameEdit</cstring>
-                 </property>
-                </widget>
-               </item>
-               <item row="1" column="1">
-                <widget class="QLineEdit" name="usernameEdit">
-                 <property name="sizePolicy">
-                  <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
-                   <horstretch>0</horstretch>
-                   <verstretch>0</verstretch>
-                  </sizepolicy>
-                 </property>
-                </widget>
-               </item>
                <item row="2" column="0">
                 <widget class="QLabel" name="passwordLabel">
                  <property name="sizePolicy">
@@ -385,46 +342,72 @@
                  </item>
                 </layout>
                </item>
-               <item row="9" column="0">
-                <widget class="QCheckBox" name="lrcfg_allowIncomingFromUnknown">
-                 <property name="text">
-                  <string>Allow Call From Unknown</string>
-                 </property>
-                </widget>
-               </item>
-               <item row="11" column="0">
-                <widget class="QCheckBox" name="lrcfg_allowIncomingFromContact">
-                 <property name="text">
-                  <string>Allow Call From Contact</string>
-                 </property>
-                </widget>
-               </item>
-               <item row="10" column="0">
-                <widget class="QCheckBox" name="lrcfg_allowIncomingFromHistory">
-                 <property name="text">
-                  <string>Allow Call From History</string>
-                 </property>
-                </widget>
-               </item>
-               <item row="8" column="0">
-                <widget class="QLabel" name="label_27">
-                 <property name="font">
-                  <font>
-                   <weight>75</weight>
-                   <bold>true</bold>
-                  </font>
+               <item row="1" column="0">
+                <widget class="QLabel" name="usernameLabel">
+                 <property name="sizePolicy">
+                  <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
+                   <horstretch>0</horstretch>
+                   <verstretch>0</verstretch>
+                  </sizepolicy>
                  </property>
                  <property name="text">
-                  <string>Ring Account Settings</string>
+                  <string>Username</string>
                  </property>
                  <property name="buddy">
-                  <cstring>lrcfg_allowIncomingFromUnknown</cstring>
+                  <cstring>lrcfg_username</cstring>
+                 </property>
+                </widget>
+               </item>
+               <item row="1" column="1">
+                <widget class="QLineEdit" name="lrcfg_username">
+                 <property name="sizePolicy">
+                  <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+                   <horstretch>0</horstretch>
+                   <verstretch>0</verstretch>
+                  </sizepolicy>
                  </property>
                 </widget>
                </item>
               </layout>
              </item>
              <item>
+              <widget class="QLabel" name="label_27">
+               <property name="font">
+                <font>
+                 <weight>75</weight>
+                 <bold>true</bold>
+                </font>
+               </property>
+               <property name="text">
+                <string>Ring Account Settings</string>
+               </property>
+               <property name="buddy">
+                <cstring>lrcfg_allowIncomingFromUnknown</cstring>
+               </property>
+              </widget>
+             </item>
+             <item>
+              <widget class="QCheckBox" name="lrcfg_allowIncomingFromUnknown">
+               <property name="text">
+                <string>Allow Call From Unknown</string>
+               </property>
+              </widget>
+             </item>
+             <item>
+              <widget class="QCheckBox" name="lrcfg_allowIncomingFromHistory">
+               <property name="text">
+                <string>Allow Call From History</string>
+               </property>
+              </widget>
+             </item>
+             <item>
+              <widget class="QCheckBox" name="lrcfg_allowIncomingFromContact">
+               <property name="text">
+                <string>Allow Call From Contact</string>
+               </property>
+              </widget>
+             </item>
+             <item>
               <spacer name="verticalSpacer">
                <property name="orientation">
                 <enum>Qt::Vertical</enum>
@@ -1921,7 +1904,7 @@
   </connection>
  </connections>
  <buttongroups>
-  <buttongroup name="publishGroup"/>
   <buttongroup name="dtmfGroup"/>
+  <buttongroup name="publishGroup"/>
  </buttongroups>
 </ui>