[chronojump] Better gui for encoder capture buttons, specially on CustomButtons (tablets)



commit 1fc68635f78216cce1d266161f0dcee2beeb2908
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Jul 13 11:14:13 2016 +0200

    Better gui for encoder capture buttons, specially on CustomButtons (tablets)

 glade/chronojump.glade |   77 +++++++++++++++++++----------------------------
 src/gui/networks.cs    |    4 +--
 2 files changed, 32 insertions(+), 49 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index cc3779c..cc3cefc 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -14385,10 +14385,13 @@ low ressistance</property>
                                                             </packing>
                                                             </child>
                                                             <child>
-                                                            <widget class="GtkVBox" id="vbox57">
+                                                            <widget class="GtkTable" id="table3">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="spacing">8</property>
+                                                            <property name="n_rows">2</property>
+                                                            <property name="n_columns">2</property>
+                                                            <property name="column_spacing">8</property>
+                                                            <property name="row_spacing">8</property>
                                                             <child>
                                                             <widget class="GtkButton" 
id="button_encoder_recalculate">
                                                             <property name="width_request">60</property>
@@ -14409,11 +14412,6 @@ low ressistance</property>
                                                             </widget>
                                                             </child>
                                                             </widget>
-                                                            <packing>
-                                                            <property name="expand">True</property>
-                                                            <property name="fill">True</property>
-                                                            <property name="position">0</property>
-                                                            </packing>
                                                             </child>
                                                             <child>
                                                             <widget class="GtkButton" 
id="button_encoder_load_signal">
@@ -14436,24 +14434,36 @@ low ressistance</property>
                                                             </child>
                                                             </widget>
                                                             <packing>
-                                                            <property name="expand">True</property>
-                                                            <property name="fill">True</property>
-                                                            <property name="position">1</property>
+                                                            <property name="top_attach">1</property>
+                                                            <property name="bottom_attach">2</property>
                                                             </packing>
                                                             </child>
+                                                            <child>
+                                                            <widget class="GtkButton" 
id="button_encoder_delete_signal">
+                                                            <property name="visible">True</property>
+                                                            <property name="sensitive">False</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="receives_default">True</property>
+                                                            <property name="has_tooltip">True</property>
+                                                            <property name="tooltip" 
translatable="yes">Delete set</property>
+                                                            <signal name="clicked" 
handler="on_button_encoder_delete_signal_clicked" swapped="no"/>
+                                                            <child>
+                                                            <widget class="GtkImage" 
id="image_encoder_signal_delete">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="stock">gtk-delete</property>
+                                                            <property name="icon-size">2</property>
+                                                            </widget>
+                                                            </child>
                                                             </widget>
                                                             <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="position">1</property>
+                                                            <property name="left_attach">1</property>
+                                                            <property name="right_attach">2</property>
+                                                            <property name="top_attach">1</property>
+                                                            <property name="bottom_attach">2</property>
                                                             </packing>
                                                             </child>
                                                             <child>
-                                                            <widget class="GtkVBox" id="vbox60">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="spacing">8</property>
-                                                            <child>
                                                             <widget class="GtkHBox" id="hbox189">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
@@ -14511,40 +14521,15 @@ low ressistance</property>
                                                             </child>
                                                             </widget>
                                                             <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="position">0</property>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
-                                                            <widget class="GtkButton" 
id="button_encoder_delete_signal">
-                                                            <property name="visible">True</property>
-                                                            <property name="sensitive">False</property>
-                                                            <property name="can_focus">True</property>
-                                                            <property name="receives_default">True</property>
-                                                            <property name="has_tooltip">True</property>
-                                                            <property name="tooltip" 
translatable="yes">Delete set</property>
-                                                            <signal name="clicked" 
handler="on_button_encoder_delete_signal_clicked" swapped="no"/>
-                                                            <child>
-                                                            <widget class="GtkImage" 
id="image_encoder_signal_delete">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="stock">gtk-delete</property>
-                                                            <property name="icon-size">2</property>
-                                                            </widget>
-                                                            </child>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">True</property>
-                                                            <property name="fill">True</property>
-                                                            <property name="position">1</property>
+                                                            <property name="left_attach">1</property>
+                                                            <property name="right_attach">2</property>
                                                             </packing>
                                                             </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
                                                             <property name="fill">False</property>
-                                                            <property name="position">2</property>
+                                                            <property name="position">1</property>
                                                             </packing>
                                                             </child>
                                                             </widget>
diff --git a/src/gui/networks.cs b/src/gui/networks.cs
index ff5615c..277a292 100644
--- a/src/gui/networks.cs
+++ b/src/gui/networks.cs
@@ -98,9 +98,7 @@ public partial class ChronoJumpWindow
                
                        button_encoder_select.HeightRequest = 40;
                        //this will make all encoder capture controls taller    
-                       //88 then buttons will be the same height than button_encoder_select. The 8 extra is 
for the vertical space
-                       button_encoder_capture.SetSizeRequest(125,88);
-                       //button_encoder_capture.HeightRequest = 88;
+                       button_encoder_capture.SetSizeRequest(125,60);
 
                        spin_encoder_im_weights_n.Visible = false;
                        hbox_encoder_im_weights_n.Visible = true;


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