[chronojump] Force sensor graphs have more vertical space (moved buttons to top)



commit fbc58371cd6d701ce008187343f114ac63022bea
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Oct 25 19:03:51 2017 +0200

    Force sensor graphs have more vertical space (moved buttons to top)

 glade/app1.glade      |  222 +++++++++++++++++++++++++------------------------
 src/gui/chronojump.cs |    5 +-
 2 files changed, 116 insertions(+), 111 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index f67656b..8a84cc7 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -1405,6 +1405,9 @@
                                                             <placeholder/>
                                                             </child>
                                                             <child>
+                                                            <placeholder/>
+                                                            </child>
+                                                            <child>
                                                             <widget class="GtkLabel" 
id="label_start_selector_jumps">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
@@ -4602,7 +4605,7 @@ EncoderInertialCapture</property>
                                                             <widget class="GtkHBox" id="hbox152">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="spacing">4</property>
+                                                            <property name="spacing">30</property>
                                                             <child>
                                                             <widget class="GtkButton" 
id="button_force_sensor_load">
                                                             <property name="label" translatable="yes">Load 
file</property>
@@ -4612,13 +4615,98 @@ EncoderInertialCapture</property>
                                                             <signal name="clicked" 
handler="on_button_force_sensor_load_clicked" swapped="no"/>
                                                             </widget>
                                                             <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkButton" 
id="button_force_sensor_tare">
+                                                            <property name="label" 
translatable="yes">Tare</property>
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="receives_default">True</property>
+                                                            <signal name="clicked" 
handler="on_buttons_force_sensor_clicked" swapped="no"/>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">1</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkHBox" id="hbox230">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">10</property>
+                                                            <child>
+                                                            <widget class="GtkHBox" 
id="hbox_spin_force_sensor">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">4</property>
+                                                            <child>
+                                                            <widget class="GtkSpinButton" 
id="spin_force_sensor_calibration_kg_value">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="invisible_char">●</property>
+                                                            <property 
name="invisible_char_set">True</property>
+                                                            <property 
name="primary_icon_activatable">False</property>
+                                                            <property 
name="secondary_icon_activatable">False</property>
+                                                            <property 
name="primary_icon_sensitive">True</property>
+                                                            <property 
name="secondary_icon_sensitive">True</property>
+                                                            <property name="adjustment">20 5 500 1 10 
0</property>
+                                                            <property name="climb_rate">1</property>
+                                                            <property name="digits">2</property>
+                                                            <property name="numeric">True</property>
+                                                            </widget>
+                                                            <packing>
                                                             <property name="expand">False</property>
                                                             <property name="fill">False</property>
-                                                            <property name="padding">20</property>
                                                             <property name="position">0</property>
                                                             </packing>
                                                             </child>
                                                             <child>
+                                                            <widget class="GtkLabel" 
id="calibration_factor_kg_label">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="xalign">0</property>
+                                                            <property name="label">Kg</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">1</property>
+                                                            </packing>
+                                                            </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_force_sensor_calibrate">
+                                                            <property name="label" 
translatable="yes">Calibrate</property>
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="receives_default">True</property>
+                                                            <signal name="clicked" 
handler="on_buttons_force_sensor_clicked" swapped="no"/>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">1</property>
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">2</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
                                                             <widget class="GtkButton" 
id="button_force_sensor_data_folder">
                                                             <property name="label" translatable="yes">Open 
data folder</property>
                                                             <property name="visible">True</property>
@@ -4627,10 +4715,23 @@ EncoderInertialCapture</property>
                                                             <signal name="clicked" 
handler="on_button_force_sensor_data_folder_clicked" swapped="no"/>
                                                             </widget>
                                                             <packing>
-                                                            <property name="expand">False</property>
+                                                            <property name="expand">True</property>
                                                             <property name="fill">False</property>
-                                                            <property name="padding">20</property>
-                                                            <property name="position">1</property>
+                                                            <property name="position">3</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <widget class="GtkButton" 
id="button_force_sensor_check_version">
+                                                            <property name="label" translatable="yes">Check 
version</property>
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property name="receives_default">True</property>
+                                                            <signal name="clicked" 
handler="on_buttons_force_sensor_clicked" swapped="no"/>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">4</property>
                                                             </packing>
                                                             </child>
                                                             </widget>
@@ -5101,7 +5202,7 @@ EncoderInertialCapture</property>
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
                                                             <child>
-                                                            <widget class="GtkHBox" id="hbox17">
+                                                            <widget class="GtkHBox" id="hbox_options_top">
                                                             <property name="can_focus">False</property>
                                                             <property name="spacing">10</property>
                                                             <child>
@@ -6289,112 +6390,10 @@ after time</property>
                                                             <property name="xscale">0</property>
                                                             <property name="top_padding">8</property>
                                                             <child>
-                                                            <widget class="GtkHBox" id="hbox231">
+                                                            <widget class="GtkLabel" id="label51">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
-                                                            <property name="spacing">20</property>
-                                                            <child>
-                                                            <widget class="GtkButton" 
id="button_force_sensor_tare">
-                                                            <property name="label" 
translatable="yes">Tare</property>
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">True</property>
-                                                            <property name="receives_default">True</property>
-                                                            <signal name="clicked" 
handler="on_buttons_force_sensor_clicked" swapped="no"/>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="padding">20</property>
-                                                            <property name="position">0</property>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
-                                                            <widget class="GtkHBox" id="hbox230">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="spacing">10</property>
-                                                            <child>
-                                                            <widget class="GtkHBox" 
id="hbox_spin_force_sensor">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="spacing">4</property>
-                                                            <child>
-                                                            <widget class="GtkSpinButton" 
id="spin_force_sensor_calibration_kg_value">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">True</property>
-                                                            <property name="invisible_char">●</property>
-                                                            <property 
name="invisible_char_set">True</property>
-                                                            <property 
name="primary_icon_activatable">False</property>
-                                                            <property 
name="secondary_icon_activatable">False</property>
-                                                            <property 
name="primary_icon_sensitive">True</property>
-                                                            <property 
name="secondary_icon_sensitive">True</property>
-                                                            <property name="adjustment">20 5 500 1 10 
0</property>
-                                                            <property name="climb_rate">1</property>
-                                                            <property name="digits">2</property>
-                                                            <property name="numeric">True</property>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="position">0</property>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
-                                                            <widget class="GtkLabel" 
id="calibration_factor_kg_label">
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">False</property>
-                                                            <property name="xalign">0</property>
-                                                            <property name="label">Kg</property>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="position">1</property>
-                                                            </packing>
-                                                            </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_force_sensor_calibrate">
-                                                            <property name="label" 
translatable="yes">Calibrate</property>
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">True</property>
-                                                            <property name="receives_default">True</property>
-                                                            <signal name="clicked" 
handler="on_buttons_force_sensor_clicked" swapped="no"/>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="position">1</property>
-                                                            </packing>
-                                                            </child>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="position">1</property>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
-                                                            <widget class="GtkButton" 
id="button_force_sensor_check_version">
-                                                            <property name="label" translatable="yes">Check 
version</property>
-                                                            <property name="visible">True</property>
-                                                            <property name="can_focus">True</property>
-                                                            <property name="receives_default">True</property>
-                                                            <signal name="clicked" 
handler="on_buttons_force_sensor_clicked" swapped="no"/>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="expand">False</property>
-                                                            <property name="fill">False</property>
-                                                            <property name="padding">20</property>
-                                                            <property name="position">2</property>
-                                                            </packing>
-                                                            </child>
+                                                            <property name="label">unused</property>
                                                             </widget>
                                                             </child>
                                                             </widget>
@@ -21627,6 +21626,9 @@ then click this button.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index d791a32..c974255 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -309,6 +309,7 @@ public partial class ChronoJumpWindow
 
        [Widget] Gtk.Notebook notebook_execute;
        [Widget] Gtk.Notebook notebook_results;
+       [Widget] Gtk.HBox hbox_options_top;
        [Widget] Gtk.Notebook notebook_options_top;
                
        [Widget] Gtk.Frame frame_share_data;
@@ -6348,6 +6349,8 @@ LogB.Debug("X");
 
                //on capture, show phases, time, record if we are not on forcesensor mode
                hbox_capture_phases_time_record.Visible = (mode != Constants.Menuitem_modes.FORCESENSOR);
+               hbox_options_top.Visible = (mode != Constants.Menuitem_modes.FORCESENSOR);
+               notebook_options_top.Visible = (mode != Constants.Menuitem_modes.FORCESENSOR);
 
                if(mode == Constants.Menuitem_modes.JUMPSSIMPLE)
                {
@@ -6380,7 +6383,7 @@ LogB.Debug("X");
                } else if(mode == Constants.Menuitem_modes.FORCESENSOR)
                {
                        notebook_execute.CurrentPage = 4;
-                       notebook_options_top.CurrentPage = 4;
+                       notebook_options_top.CurrentPage = 4; //but at FORCESENSOR this notebook is not shown
                        notebook_results.CurrentPage = 4;
                        changeTestImage("", "", "FORCESENSOR");
                        event_execute_button_finish.Sensitive = false;


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