[chronojump] Menu width respect persons width
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Menu width respect persons width
- Date: Tue, 24 Mar 2020 13:15:37 +0000 (UTC)
commit cd9a3faab1ced387e558b8c06f7d7ebdacdf4359
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Mar 24 14:10:31 2020 +0100
Menu width respect persons width
glade/app1.glade | 36 +++++++++++++++++++++---------------
src/gui/app1/menu.cs | 24 +++++++++++++++++++++---
2 files changed, 42 insertions(+), 18 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 9e6ce2c2..cddd2538 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -3530,14 +3530,14 @@
</widget>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</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">1</property>
</packing>
</child>
@@ -24553,6 +24553,9 @@ Concentric</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -26867,6 +26870,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>
@@ -26903,18 +26918,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>
@@ -34399,6 +34402,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/menu.cs b/src/gui/app1/menu.cs
index 39cc160e..be1d27e2 100644
--- a/src/gui/app1/menu.cs
+++ b/src/gui/app1/menu.cs
@@ -134,10 +134,28 @@ public partial class ChronoJumpWindow
l.Add(button_menu_help_documents);
l.Add(button_menu_help_accelerators);
l.Add(button_menu_help_about);
- int maxWidth = getMenuButtonsMaxWidth(l);
- viewport_menu_top.SetSizeRequest(maxWidth + 16 + 4 + 6, -1); //16, 4, 6 are alignements
spaces. -1 is height
+ int maxWidth = getMenuButtonsMaxWidth(l) + 16 + 4 + 6; //16, 4, 6 are alignments spaces.
- //TODO: check also viewport_persons.Width (at least at preferences.MenuTypes.ALL and ICONS)
+ /*
+ LogB.Information(string.Format("viewport_persons: {0}",
viewport_persons.SizeRequest().Width));
+ LogB.Information(string.Format("frame_persons: {0}", frame_persons.SizeRequest().Width));
+ LogB.Information(string.Format("frame_exhibition: {0}",
frame_exhibition.SizeRequest().Width));
+ LogB.Information(string.Format("frame_persons_top: {0}",
frame_persons_top.SizeRequest().Width));
+ LogB.Information(string.Format("treeview_persons: {0}",
treeview_persons.SizeRequest().Width));
+ LogB.Information(string.Format("vbox_persons_bottom: {0}",
vbox_persons_bottom.SizeRequest().Width));
+ LogB.Information(string.Format("hbox_persons_bottom_no_photo: {0}",
hbox_persons_bottom_no_photo.SizeRequest().Width));
+ LogB.Information(string.Format("hbox_persons_bottom_photo: {0}",
hbox_persons_bottom_photo.SizeRequest().Width));
+ LogB.Information(string.Format("image_current_person: {0}",
image_current_person.SizeRequest().Width));
+ LogB.Information(string.Format("button_image_current_person_zoom: {0}",
button_image_current_person_zoom.SizeRequest().Width));
+ LogB.Information(string.Format("hbox_rest_time: {0}", hbox_rest_time.SizeRequest().Width));
+ */
+
+ if(viewport_persons.SizeRequest().Width +4 +6 > maxWidth)
+ maxWidth = viewport_persons.SizeRequest().Width +4 + 6; //+4 due to alignment_person,
+6 to alignment_viewport_menu_top
+ //if(frame_persons.SizeRequest().Width > maxWidth)
+ // maxWidth = frame_persons.SizeRequest().Width;
+
+ viewport_menu_top.SetSizeRequest(maxWidth, -1); //-1 is height
}
private void menuSetTextAndIcons ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]