[chronojump] top rest times with buttons done for contacts
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] top rest times with buttons done for contacts
- Date: Wed, 8 Apr 2020 10:51:38 +0000 (UTC)
commit 2d7140d017cee1bea89ae923be6b3676b0feec39
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Apr 8 12:51:15 2020 +0200
top rest times with buttons done for contacts
glade/app1.glade | 268 +++++++++++++++++++++++++++++++--------------
src/gui/app1/chronojump.cs | 12 +-
src/gui/app1/icons.cs | 2 +
src/gui/app1/menu_tiny.cs | 3 +-
src/gui/restTime.cs | 117 ++++++++++++++------
5 files changed, 283 insertions(+), 119 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index ed52e0c8..eb8f73b9 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -6150,6 +6150,7 @@ EncoderInertialCapture</property>
<widget class="GtkHBox" id="hbox78">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="spacing">50</property>
<child>
<widget class="GtkHBox"
id="hbox_contacts_sup_capture_analyze_two_buttons">
<property name="visible">True</property>
@@ -6543,8 +6544,8 @@ EncoderInertialCapture</property>
<property name="can_focus">False</property>
</widget>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
@@ -6554,142 +6555,237 @@ EncoderInertialCapture</property>
<property name="label" translatable="yes">Please,
Wait!</property>
</widget>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">3</property>
</packing>
</child>
<child>
- <widget class="GtkTable" id="table_rest_times">
+ <widget class="GtkHBox"
id="hbox_rest_time_stuff_contacts">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">2</property>
- <property name="n_columns">5</property>
- <property name="column_spacing">8</property>
+ <property name="spacing">2</property>
<child>
- <widget class="GtkLabel"
id="label_contacts_rest_time_1_name">
- <property name="visible">True</property>
+ <widget class="GtkHBox"
id="hbox_contacts_rest_time_sofas">
<property name="can_focus">False</property>
+ <child>
+ <widget class="GtkImage"
id="image_contacts_rest_time_dark_blue">
+ <property name="can_focus">False</property>
+ <property
name="stock">gtk-missing-image</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkImage"
id="image_contacts_rest_time_clear_yellow">
+ <property name="can_focus">False</property>
+ <property
name="stock">gtk-missing-image</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</widget>
<packing>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkLabel"
id="label_contacts_rest_time_2_name">
+ <widget class="GtkButton"
id="button_scrolled_rest_time_contacts_left">
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <signal name="clicked"
handler="on_scrolled_rest_time_contacts_left" swapped="no"/>
+ <child>
+ <widget class="GtkArrow" id="arrow23">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="arrow_type">left</property>
+ </widget>
+ </child>
</widget>
<packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkScrolledWindow"
id="scrolled_rest_time_contacts">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property
name="hscrollbar_policy">never</property>
+ <property
name="vscrollbar_policy">never</property>
+ <child>
+ <widget class="GtkViewport"
id="viewport_rest_time_contacts">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkTable"
id="table_rest_time_contacts">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">5</property>
+ <property name="column_spacing">8</property>
+ <child>
+ <widget class="GtkLabel"
id="label_contacts_rest_time_1_name">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </widget>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_contacts_rest_time_2_name">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </widget>
+ <packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel"
id="label_contacts_rest_time_3_name">
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_contacts_rest_time_3_name">
<property name="visible">True</property>
<property name="can_focus">False</property>
- </widget>
- <packing>
+ </widget>
+ <packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel"
id="label_contacts_rest_time_4_name">
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_contacts_rest_time_4_name">
<property name="visible">True</property>
<property name="can_focus">False</property>
- </widget>
- <packing>
+ </widget>
+ <packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel"
id="label_contacts_rest_time_5_name">
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_contacts_rest_time_5_name">
<property name="visible">True</property>
<property name="can_focus">False</property>
- </widget>
- <packing>
+ </widget>
+ <packing>
<property name="left_attach">4</property>
<property name="right_attach">5</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel"
id="label_contacts_rest_time_1_time">
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_contacts_rest_time_1_time">
<property name="visible">True</property>
<property name="can_focus">False</property>
- </widget>
- <packing>
+ </widget>
+ <packing>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel"
id="label_contacts_rest_time_2_time">
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_contacts_rest_time_2_time">
<property name="visible">True</property>
<property name="can_focus">False</property>
- </widget>
- <packing>
+ </widget>
+ <packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel"
id="label_contacts_rest_time_3_time">
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_contacts_rest_time_3_time">
<property name="visible">True</property>
<property name="can_focus">False</property>
- </widget>
- <packing>
+ </widget>
+ <packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel"
id="label_contacts_rest_time_4_time">
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_contacts_rest_time_4_time">
<property name="visible">True</property>
<property name="can_focus">False</property>
- </widget>
- <packing>
+ </widget>
+ <packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel"
id="label_contacts_rest_time_5_time">
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_contacts_rest_time_5_time">
<property name="visible">True</property>
<property name="can_focus">False</property>
- </widget>
- <packing>
+ </widget>
+ <packing>
<property name="left_attach">4</property>
<property name="right_attach">5</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton"
id="button_scrolled_rest_time_contacts_right">
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <signal name="clicked"
handler="on_scrolled_rest_time_contacts_right" swapped="no"/>
+ <child>
+ <widget class="GtkArrow" id="arrow24">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
</packing>
</child>
</widget>
@@ -6702,7 +6798,7 @@ EncoderInertialCapture</property>
</widget>
<packing>
<property name="expand">True</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
@@ -24730,6 +24826,9 @@ Concentric</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -25536,12 +25635,12 @@ Concentric</property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox402">
+ <widget class="GtkHBox"
id="hbox_rest_time_stuff_encoder">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">2</property>
<child>
- <widget class="GtkHBox"
id="hbox_encoder_rest_time">
+ <widget class="GtkHBox"
id="hbox_encoder_rest_time_sofas">
<property name="can_focus">False</property>
<child>
<widget class="GtkImage"
id="image_encoder_rest_time_dark_blue">
@@ -25573,10 +25672,10 @@ Concentric</property>
</packing>
</child>
<child>
- <widget class="GtkButton"
id="button_scrolled_rest_times_encoder_left">
+ <widget class="GtkButton"
id="button_scrolled_rest_time_encoder_left">
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <signal name="clicked"
handler="on_scrolled_rest_times_encoder_left" swapped="no"/>
+ <signal name="clicked"
handler="on_scrolled_rest_time_encoder_left" swapped="no"/>
<child>
<widget class="GtkArrow" id="arrow22">
<property name="visible">True</property>
@@ -25592,17 +25691,17 @@ Concentric</property>
</packing>
</child>
<child>
- <widget class="GtkScrolledWindow"
id="scrolled_rest_times_encoder">
+ <widget class="GtkScrolledWindow"
id="scrolled_rest_time_encoder">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property
name="hscrollbar_policy">never</property>
<property
name="vscrollbar_policy">never</property>
<child>
- <widget class="GtkViewport"
id="viewport_rest_times_encoder">
+ <widget class="GtkViewport"
id="viewport_rest_time_encoder">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <widget class="GtkTable"
id="table_rest_times_encoder">
+ <widget class="GtkTable"
id="table_rest_time_encoder">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="n_rows">2</property>
@@ -25746,10 +25845,10 @@ Concentric</property>
</packing>
</child>
<child>
- <widget class="GtkButton"
id="button_scrolled_rest_times_encoder_right">
+ <widget class="GtkButton"
id="button_scrolled_rest_time_encoder_right">
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <signal name="clicked"
handler="on_scrolled_rest_times_encoder_right" swapped="no"/>
+ <signal name="clicked"
handler="on_scrolled_rest_time_encoder_right" swapped="no"/>
<child>
<widget class="GtkArrow" id="arrow21">
<property name="visible">True</property>
@@ -26976,6 +27075,18 @@ Concentric</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
+ <widget class="GtkLabel"
id="label_video_encoder_tests_will_be_filmed">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Tests
will be filmed</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
<widget class="GtkHBox"
id="hbox_video_encoder_capturing">
<property name="can_focus">False</property>
<property name="spacing">4</property>
@@ -27012,18 +27123,6 @@ Concentric</property>
</packing>
</child>
<child>
- <widget class="GtkLabel"
id="label_video_encoder_tests_will_be_filmed">
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Tests
will be filmed</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
<widget class="GtkHBox"
id="hbox_video_encoder_no_capturing">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -34760,6 +34859,9 @@ then click this button.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 80978a4d..12a11e93 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -492,7 +492,7 @@ public partial class ChronoJumpWindow
private Threshold threshold;
RestTime restTime;
- //to control method that is updating restTimes on treeview_persons
+ //to control method that is updating restTimes on treeview_persons and personsOnTop
bool updatingRestTimes = false;
//only called the first time the software runs
@@ -750,16 +750,21 @@ public partial class ChronoJumpWindow
{
UtilGtk.ContrastLabelsHBox (viewport_hpaned_contacts_main, hbox_top_person);
UtilGtk.ContrastLabelsHBox (viewport_hpaned_contacts_main, hbox_top_person_encoder);
- UtilGtk.ContrastLabelsTable (viewport_rest_times_encoder, table_rest_times_encoder);
+ UtilGtk.ContrastLabelsTable (viewport_rest_time_contacts, table_rest_time_contacts);
+ UtilGtk.ContrastLabelsTable (viewport_rest_time_encoder, table_rest_time_encoder);
}
UtilGtk.ContrastLabelsNotebook (viewport_hpaned_contacts_main, app1s_notebook);
- if(UtilGtk.ColorIsDark(viewport_rest_times_encoder.Style.Background(StateType.Normal)))
+ if(UtilGtk.ColorIsDark(viewport_rest_time_encoder.Style.Background(StateType.Normal)))
{
+ image_contacts_rest_time_dark_blue.Visible = false;
+ image_contacts_rest_time_clear_yellow.Visible = true;
image_encoder_rest_time_dark_blue.Visible = false;
image_encoder_rest_time_clear_yellow.Visible = true;
} else {
+ image_contacts_rest_time_dark_blue.Visible = true;
+ image_contacts_rest_time_clear_yellow.Visible = false;
image_encoder_rest_time_dark_blue.Visible = true;
image_encoder_rest_time_clear_yellow.Visible = false;
}
@@ -4116,7 +4121,6 @@ public partial class ChronoJumpWindow
return true;
}
-
if(current_menuitem_mode == Constants.Menuitem_modes.POWERGRAVITATORY ||
current_menuitem_mode == Constants.Menuitem_modes.POWERINERTIAL)
{
diff --git a/src/gui/app1/icons.cs b/src/gui/app1/icons.cs
index a304944c..998489ce 100644
--- a/src/gui/app1/icons.cs
+++ b/src/gui/app1/icons.cs
@@ -469,10 +469,12 @@ public partial class ChronoJumpWindow
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_rest.png");
image_rest.Pixbuf = pixbuf;
image_encoder_rhythm_rest.Pixbuf = pixbuf;
+ image_contacts_rest_time_dark_blue.Pixbuf = pixbuf;
image_encoder_rest_time_dark_blue.Pixbuf = pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_rest_yellow.png");
image_encoder_rest_time_clear_yellow.Pixbuf = pixbuf;
+ image_contacts_rest_time_clear_yellow.Pixbuf = pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "folder_check.png");
image_all_persons_events.Pixbuf = pixbuf;
diff --git a/src/gui/app1/menu_tiny.cs b/src/gui/app1/menu_tiny.cs
index 36803bb3..f85691c3 100644
--- a/src/gui/app1/menu_tiny.cs
+++ b/src/gui/app1/menu_tiny.cs
@@ -79,7 +79,8 @@ public partial class ChronoJumpWindow
Gdk.Color color = UtilGtk.ColorParse(preferences.colorBackgroundString);
UtilGtk.ViewportColor(viewport_hpaned_contacts_main, color);
- UtilGtk.ViewportColor(viewport_rest_times_encoder, color);
+ UtilGtk.ViewportColor(viewport_rest_time_contacts, color);
+ UtilGtk.ViewportColor(viewport_rest_time_encoder, color);
UtilGtk.EventBoxColorBackgroundActive (eventbox_button_show_modes1, UtilGtk.YELLOW);
UtilGtk.EventBoxColorBackgroundActive (eventbox_check_menu_session1, UtilGtk.YELLOW);
diff --git a/src/gui/restTime.cs b/src/gui/restTime.cs
index 6ee7c4c9..a64d6394 100644
--- a/src/gui/restTime.cs
+++ b/src/gui/restTime.cs
@@ -15,7 +15,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * Copyright (C) 2017 Xavier de Blas <xaviblas gmail com>
+ * Copyright (C) 2017 Xavier de Blas <xaviblas gmail com>
*/
using System;
@@ -30,12 +30,16 @@ using System.Collections.Generic; //List
public partial class ChronoJumpWindow
{
- [Widget] Gtk.ScrolledWindow scrolled_rest_times_encoder;
- [Widget] Gtk.Button button_scrolled_rest_times_encoder_left;
- [Widget] Gtk.Button button_scrolled_rest_times_encoder_right;
- [Widget] Gtk.HBox hbox_encoder_rest_time;
- [Widget] Gtk.Image image_encoder_rest_time_dark_blue;
- [Widget] Gtk.Image image_encoder_rest_time_clear_yellow;
+ //contacts
+
+ [Widget] Gtk.HBox hbox_contacts_rest_time_sofas;
+ [Widget] Gtk.Image image_contacts_rest_time_dark_blue;
+ [Widget] Gtk.Image image_contacts_rest_time_clear_yellow;
+ [Widget] Gtk.ScrolledWindow scrolled_rest_time_contacts;
+ [Widget] Gtk.Viewport viewport_rest_time_contacts;
+ [Widget] Gtk.Table table_rest_time_contacts;
+ [Widget] Gtk.Button button_scrolled_rest_time_contacts_left;
+ [Widget] Gtk.Button button_scrolled_rest_time_contacts_right;
[Widget] Gtk.Label label_contacts_rest_time_1_name;
[Widget] Gtk.Label label_contacts_rest_time_2_name;
@@ -49,8 +53,20 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Label label_contacts_rest_time_4_time;
[Widget] Gtk.Label label_contacts_rest_time_5_time;
- [Widget] Gtk.Viewport viewport_rest_times_encoder;
- [Widget] Gtk.Table table_rest_times_encoder;
+ List<Gtk.Label> labels_rest_time_contacts_names;
+ List<Gtk.Label> labels_rest_time_contacts_times;
+
+ //encoder
+
+ [Widget] Gtk.HBox hbox_encoder_rest_time_sofas;
+ [Widget] Gtk.Image image_encoder_rest_time_dark_blue;
+ [Widget] Gtk.Image image_encoder_rest_time_clear_yellow;
+ [Widget] Gtk.ScrolledWindow scrolled_rest_time_encoder;
+ [Widget] Gtk.Viewport viewport_rest_time_encoder;
+ [Widget] Gtk.Table table_rest_time_encoder;
+ [Widget] Gtk.Button button_scrolled_rest_time_encoder_left;
+ [Widget] Gtk.Button button_scrolled_rest_time_encoder_right;
+
[Widget] Gtk.Label label_encoder_rest_time_1_name;
[Widget] Gtk.Label label_encoder_rest_time_2_name;
[Widget] Gtk.Label label_encoder_rest_time_3_name;
@@ -63,8 +79,6 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Label label_encoder_rest_time_4_time;
[Widget] Gtk.Label label_encoder_rest_time_5_time;
- List<Gtk.Label> labels_rest_time_contacts_names;
- List<Gtk.Label> labels_rest_time_contacts_times;
List<Gtk.Label> labels_rest_time_encoder_names;
List<Gtk.Label> labels_rest_time_encoder_times;
@@ -119,6 +133,7 @@ public partial class ChronoJumpWindow
{
labels_rest_time_contacts_clean();
List<LastTestTime> listLastMin = restTime.LastMinList();
+ //hbox_contacts_rest_time_sofas.Visible = (listLastMin.Count > 0);
int count = 0;
foreach(LastTestTime ltt in listLastMin)
{
@@ -129,12 +144,38 @@ public partial class ChronoJumpWindow
count ++;
}
}
+
+ //as scrollbar is not usable on tactile screens, and this top rest time are thought for
tactile screens
+ //show left/right buttons if content is bigger than scrollbar
+ if(scrolled_rest_time_contacts.Hadjustment.Upper >
scrolled_rest_time_contacts.Hadjustment.PageSize)
+ {
+ button_scrolled_rest_time_contacts_left.Visible = true;
+ button_scrolled_rest_time_contacts_right.Visible = true;
+
+ //make left arrow sensitive if we are not on totally left
+ button_scrolled_rest_time_contacts_left.Sensitive =
+ (scrolled_rest_time_contacts.Hadjustment.Value >
scrolled_rest_time_contacts.Hadjustment.Lower);
+
+ //make right arrow sensitive if we are not on totally right
+ button_scrolled_rest_time_contacts_right.Sensitive =
+ //(scrolled_rest_time_contacts.Hadjustment.Value <
scrolled_rest_time_contacts.Hadjustment.Upper);
+ ( scrolled_rest_time_contacts.Hadjustment.Value <
+ (scrolled_rest_time_contacts.Hadjustment.Upper -
scrolled_rest_time_contacts.Hadjustment.PageSize) );
+
+ hbox_contacts_rest_time_sofas.Visible = false;
+
+ } else {
+ button_scrolled_rest_time_contacts_left.Visible = false;
+ button_scrolled_rest_time_contacts_right.Visible = false;
+
+ hbox_contacts_rest_time_sofas.Visible = (listLastMin.Count > 0);
+ }
}
private void updateTopRestTimesEncoder()
{
labels_rest_time_encoder_clean();
List<LastTestTime> listLastMin = restTime.LastMinList();
- //hbox_encoder_rest_time.Visible = (listLastMin.Count > 0);
+ //hbox_encoder_rest_time_sofas.Visible = (listLastMin.Count > 0);
int count = 0;
foreach(LastTestTime ltt in listLastMin)
{
@@ -148,41 +189,55 @@ public partial class ChronoJumpWindow
//as scrollbar is not usable on tactile screens, and this top rest time are thought for
tactile screens
//show left/right buttons if content is bigger than scrollbar
- if(scrolled_rest_times_encoder.Hadjustment.Upper >
scrolled_rest_times_encoder.Hadjustment.PageSize)
+ if(scrolled_rest_time_encoder.Hadjustment.Upper >
scrolled_rest_time_encoder.Hadjustment.PageSize)
{
- button_scrolled_rest_times_encoder_left.Visible = true;
- button_scrolled_rest_times_encoder_right.Visible = true;
+ button_scrolled_rest_time_encoder_left.Visible = true;
+ button_scrolled_rest_time_encoder_right.Visible = true;
//make left arrow sensitive if we are not on totally left
- button_scrolled_rest_times_encoder_left.Sensitive =
- (scrolled_rest_times_encoder.Hadjustment.Value >
scrolled_rest_times_encoder.Hadjustment.Lower);
+ button_scrolled_rest_time_encoder_left.Sensitive =
+ (scrolled_rest_time_encoder.Hadjustment.Value >
scrolled_rest_time_encoder.Hadjustment.Lower);
//make right arrow sensitive if we are not on totally right
- button_scrolled_rest_times_encoder_right.Sensitive =
- //(scrolled_rest_times_encoder.Hadjustment.Value <
scrolled_rest_times_encoder.Hadjustment.Upper);
- ( scrolled_rest_times_encoder.Hadjustment.Value <
- (scrolled_rest_times_encoder.Hadjustment.Upper -
scrolled_rest_times_encoder.Hadjustment.PageSize) );
+ button_scrolled_rest_time_encoder_right.Sensitive =
+ //(scrolled_rest_time_encoder.Hadjustment.Value <
scrolled_rest_time_encoder.Hadjustment.Upper);
+ ( scrolled_rest_time_encoder.Hadjustment.Value <
+ (scrolled_rest_time_encoder.Hadjustment.Upper -
scrolled_rest_time_encoder.Hadjustment.PageSize) );
- hbox_encoder_rest_time.Visible = false;
+ hbox_encoder_rest_time_sofas.Visible = false;
} else {
- button_scrolled_rest_times_encoder_left.Visible = false;
- button_scrolled_rest_times_encoder_right.Visible = false;
+ button_scrolled_rest_time_encoder_left.Visible = false;
+ button_scrolled_rest_time_encoder_right.Visible = false;
- hbox_encoder_rest_time.Visible = (listLastMin.Count > 0);
+ hbox_encoder_rest_time_sofas.Visible = (listLastMin.Count > 0);
}
}
- private void on_scrolled_rest_times_encoder_right (object o, EventArgs args)
+ // left/right buttons
+
+ private void on_scrolled_rest_time_contacts_right (object o, EventArgs args)
+ {
+ //scrolled_rest_time_contacts.Hadjustment.Value =
scrolled_rest_time_contacts.Hadjustment.Upper; //go to the end
+ scrolled_rest_time_contacts.Hadjustment.Value +=
scrolled_rest_time_contacts.Hadjustment.PageSize; //one page to the right
+ updateTopRestTimesContacts(); //make the update because if not it looks weird
+ }
+ private void on_scrolled_rest_time_contacts_left (object o, EventArgs args)
+ {
+ //scrolled_rest_time_contacts.Hadjustment.Value =
scrolled_rest_time_contacts.Hadjustment.Lower; //go to the beginning
+ scrolled_rest_time_contacts.Hadjustment.Value -=
scrolled_rest_time_contacts.Hadjustment.PageSize; //one page to the right
+ updateTopRestTimesContacts(); //make the update because if not it looks weird
+ }
+ private void on_scrolled_rest_time_encoder_right (object o, EventArgs args)
{
- //scrolled_rest_times_encoder.Hadjustment.Value =
scrolled_rest_times_encoder.Hadjustment.Upper; //go to the end
- scrolled_rest_times_encoder.Hadjustment.Value +=
scrolled_rest_times_encoder.Hadjustment.PageSize; //one page to the right
+ //scrolled_rest_time_encoder.Hadjustment.Value =
scrolled_rest_time_encoder.Hadjustment.Upper; //go to the end
+ scrolled_rest_time_encoder.Hadjustment.Value +=
scrolled_rest_time_encoder.Hadjustment.PageSize; //one page to the right
updateTopRestTimesEncoder(); //make the update because if not it looks weird
}
- private void on_scrolled_rest_times_encoder_left (object o, EventArgs args)
+ private void on_scrolled_rest_time_encoder_left (object o, EventArgs args)
{
- //scrolled_rest_times_encoder.Hadjustment.Value =
scrolled_rest_times_encoder.Hadjustment.Lower; //go to the beginning
- scrolled_rest_times_encoder.Hadjustment.Value -=
scrolled_rest_times_encoder.Hadjustment.PageSize; //one page to the right
+ //scrolled_rest_time_encoder.Hadjustment.Value =
scrolled_rest_time_encoder.Hadjustment.Lower; //go to the beginning
+ scrolled_rest_time_encoder.Hadjustment.Value -=
scrolled_rest_time_encoder.Hadjustment.PageSize; //one page to the right
updateTopRestTimesEncoder(); //make the update because if not it looks weird
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]