[calls] new-call-box: Tweak the UI



commit 2c06497b08fbd9d67481d56fee09df3a220e8e1d
Author: Evangelos Ribeiro Tzaras <devrtz fortysixandtwo eu>
Date:   Sat Aug 14 19:17:39 2021 +0200

    new-call-box: Tweak the UI
    
    - Fills horizontally now
    - Make sure the "dial" and "backspace" button are still properly aligned
      by using HdyClamp with the keypads typical size (rougly 250)
    - Remove unnecessary default values from the xml
      (f.e. "can-focus" on GtkEntry or GtkButton)

 src/ui/new-call-box.ui | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/src/ui/new-call-box.ui b/src/ui/new-call-box.ui
index 920a0c93..7f9b4da8 100644
--- a/src/ui/new-call-box.ui
+++ b/src/ui/new-call-box.ui
@@ -5,13 +5,11 @@
   <requires lib="libhandy" version="1.0"/>
   <template class="CallsNewCallBox" parent="GtkBox">
     <property name="can_focus">False</property>
-    <property name="halign">center</property>
     <property name="margin_bottom">16</property>
     <property name="margin_left">24</property>
     <property name="margin_right">24</property>
     <property name="margin_top">16</property>
     <property name="orientation">vertical</property>
-    <property name="valign">center</property>
     <property name="visible">True</property>
 
     <child>
@@ -19,6 +17,7 @@
         <property name="visible">True</property>
         <property name="selection-mode">none</property>
         <property name="margin-bottom">6</property>
+        <property name="halign">center</property>
         <child>
           <object class="HdyComboRow" id="origin_list">
             <property name="visible">True</property>
@@ -41,7 +40,6 @@
     <child>
       <object class="GtkEntry" id="keypad_entry">
         <property name="visible" bind-source="CallsNewCallBox" bind-property="numeric-input-only" 
bind-flags="sync-create"/>
-        <property name="can_focus">True</property>
         <property name="hexpand">True</property>
         <property name="xalign">0.5</property>
         <style>
@@ -65,6 +63,10 @@
       </packing>
     </child>
     <child>
+      <object class="HdyClamp">
+        <property name="visible">True</property>
+        <property name="maximum-size">250</property>
+        <child>
       <object class="GtkBox">
         <property name="visible" bind-source="CallsNewCallBox" bind-property="numeric-input-only" 
bind-flags="sync-create"/>
         <property name="can_focus">False</property>
@@ -94,15 +96,10 @@
               </object>
             </child>
           </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-          </packing>
         </child>
         <child>
           <object class="GtkButton" id="backspace">
             <property name="always_show_image">True</property>
-            <property name="can_focus">True</property>
             <property name="visible">True</property>
             <property name="focus-on-click">False</property>
             <property name="margin_right">15</property>
@@ -129,6 +126,8 @@
           </packing>
         </child>
       </object>
+        </child>
+      </object>
     </child>
 
     <child>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]