[chronojump] Encoder inertial ecc-con phases much clear now with two labels
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Encoder inertial ecc-con phases much clear now with two labels
- Date: Wed, 15 May 2019 18:00:05 +0000 (UTC)
commit 6fa0a70328ae837139b5c0eec8251bbda96a665d
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed May 15 19:42:35 2019 +0200
Encoder inertial ecc-con phases much clear now with two labels
glade/app1.glade | 99 ++++++++++++++++++++++++++++++++++--------------------
src/gui/encoder.cs | 17 ++++++----
2 files changed, 74 insertions(+), 42 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 17b51a9e..62282882 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -24704,14 +24704,6 @@ then click this button.</property>
</child>
<child>
<widget class="GtkVBox" id="vbox_angle_now">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <widget class="GtkHBox" id="hbox35">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <widget class="GtkVBox" id="vbox53">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@@ -24727,28 +24719,53 @@ then click this button.</property>
</packing>
</child>
<child>
- <widget class="GtkLabel"
id="label_encoder_capture_inertial_eccon">
+ <widget class="GtkAlignment" id="alignment20">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="angle">90</property>
+ <property name="top_padding">5</property>
+ <property name="bottom_padding">3</property>
+ <child>
+ <widget class="GtkButton"
id="button_encoder_inertial_recalibrate">
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip"
translatable="yes">Calbrate again</property>
+ <signal name="clicked"
handler="on_button_encoder_inertial_recalibrate_clicked" swapped="no"/>
+ <child>
+ <widget class="GtkImage"
id="image_encoder_recalibrate">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property
name="stock">gtk-missing-image</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
</widget>
<packing>
- <property name="expand">True</property>
+ <property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
- <widget class="GtkImage"
id="image_inertial_rolled">
+ <widget class="GtkHBox" id="hbox35">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property
name="stock">gtk-missing-image</property>
+ <child>
+ <widget class="GtkVBox" id="vbox53">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkLabel"
id="label_encoder_capture_inertial_ecc">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Eccentric</property>
+ <property name="angle">90</property>
</widget>
<packing>
- <property name="expand">False</property>
+ <property name="expand">True</property>
<property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">2</property>
+ <property name="position">0</property>
</packing>
</child>
</widget>
@@ -24776,11 +24793,36 @@ then click this button.</property>
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <widget class="GtkVBox" id="vbox140">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkLabel"
id="label_encoder_capture_inertial_con">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Concentric</property>
+ <property name="angle">90</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">0</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
@@ -24791,35 +24833,20 @@ then click this button.</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">1</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
- <widget class="GtkAlignment" id="alignment20">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="top_padding">5</property>
- <property name="bottom_padding">3</property>
- <child>
- <widget class="GtkButton"
id="button_encoder_inertial_recalibrate">
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="tooltip"
translatable="yes">Calbrate again</property>
- <signal name="clicked"
handler="on_button_encoder_inertial_recalibrate_clicked" swapped="no"/>
- <child>
- <widget class="GtkImage"
id="image_encoder_recalibrate">
+ <widget class="GtkImage"
id="image_inertial_rolled">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property
name="stock">gtk-missing-image</property>
</widget>
- </child>
- </widget>
- </child>
- </widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">2</property>
+ <property name="pack_type">end</property>
+ <property name="position">4</property>
</packing>
</child>
</widget>
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index a6cc1249..a972108a 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -75,7 +75,8 @@ public partial class ChronoJumpWindow
[Widget] Gtk.VScale vscale_encoder_capture_inertial_angle_now;
[Widget] Gtk.VBox vbox_angle_now;
[Widget] Gtk.Label label_encoder_capture_inertial_angle_now;
- [Widget] Gtk.Label label_encoder_capture_inertial_eccon;
+ [Widget] Gtk.Label label_encoder_capture_inertial_ecc;
+ [Widget] Gtk.Label label_encoder_capture_inertial_con;
[Widget] Gtk.RadioButton radio_encoder_capture_1set;
[Widget] Gtk.RadioButton radio_encoder_capture_cont;
@@ -2706,7 +2707,8 @@ public partial class ChronoJumpWindow
EncoderCaptureInertialBackgroundStatic.Abort();
eCaptureInertialBG = null;
vscale_encoder_capture_inertial_angle_now.Value = 0;
- label_encoder_capture_inertial_eccon.Text = "";
+ label_encoder_capture_inertial_ecc.Sensitive = false;
+ label_encoder_capture_inertial_con.Sensitive = false;
}
//this is called by non gtk thread. Don't do gtk stuff here
@@ -6271,10 +6273,13 @@ public partial class ChronoJumpWindow
}
int newValue = eCaptureInertialBG.AngleNow;
- if(newValue > 0)
- label_encoder_capture_inertial_eccon.Text = Catalog.GetString("Concentric");
- else
- label_encoder_capture_inertial_eccon.Text = Catalog.GetString("Eccentric");
+ if(newValue > 0) {
+ label_encoder_capture_inertial_ecc.Sensitive = false;
+ label_encoder_capture_inertial_con.Sensitive = true;
+ } else {
+ label_encoder_capture_inertial_ecc.Sensitive = true;
+ label_encoder_capture_inertial_con.Sensitive = false;
+ }
//resize vscale if needed
//0 is at the graphical top. abs(+-100) is on the bottom, but is called adjustment Upper
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]