[chronojump] Many tweaks to news gui to align with sidebar menu/menu_tiny. And close in red.
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Many tweaks to news gui to align with sidebar menu/menu_tiny. And close in red.
- Date: Fri, 23 Jul 2021 16:18:21 +0000 (UTC)
commit c31092cd9db2803fec4da64358caa99d872a32e9
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Jul 23 18:17:57 2021 +0200
Many tweaks to news gui to align with sidebar menu/menu_tiny. And close in red.
glade/app1.glade | 90 +++++++++++++++++++++++++++++++++++++--------------
src/gui/app1/icons.cs | 1 +
src/gui/app1/news.cs | 14 ++++++++
3 files changed, 81 insertions(+), 24 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index b80fddab8..460044b29 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -25784,6 +25784,9 @@ Concentric</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -32095,6 +32098,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>
@@ -32131,18 +32146,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>
@@ -41377,6 +41380,9 @@ then click this button.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -47587,15 +47593,12 @@ then click this button.</property>
<child>
<widget class="GtkAlignment" id="alignment_news">
<property name="can_focus">False</property>
- <property name="top_padding">4</property>
<property name="bottom_padding">4</property>
- <property name="left_padding">2</property>
<property name="right_padding">4</property>
<child>
<widget class="GtkVBox" id="vbox_news">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="border_width">4</property>
<child>
<widget class="GtkNotebook" id="notebook_news">
<property name="visible">True</property>
@@ -47732,16 +47735,19 @@ then click this button.</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <widget class="GtkAlignment" id="alignment67">
+ <widget class="GtkAlignment" id="alignment_above_news">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="bottom_padding">2</property>
<child>
<widget class="GtkHBox" id="hbox453">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <widget class="GtkHBox" id="hbox447">
+ <widget class="GtkVBox" id="vbox62">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkHBox" id="hbox447">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
@@ -47780,6 +47786,14 @@ then click this button.</property>
<property name="position">2</property>
</packing>
</child>
+ </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>
</widget>
<packing>
<property name="expand">False</property>
@@ -47788,7 +47802,13 @@ then click this button.</property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox452">
+ <widget class="GtkAlignment"
id="alignment_news_languages">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="bottom_padding">1</property>
+ <property name="right_padding">1</property>
+ <child>
+ <widget class="GtkHBox" id="hbox_news_languages">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">8</property>
@@ -47824,6 +47844,8 @@ then click this button.</property>
<property name="position">1</property>
</packing>
</child>
+ </widget>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -47970,7 +47992,7 @@ then click this button.</property>
</child>
<child>
<widget class="GtkHBox" id="hbox450">
- <property name="height_request">400</property>
+ <property name="height_request">390</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">16</property>
@@ -48103,9 +48125,6 @@ then click this button.</property>
</child>
<child>
<placeholder/>
- <packing>
- <property name="type">label_item</property>
- </packing>
</child>
</widget>
<packing>
@@ -48118,7 +48137,7 @@ then click this button.</property>
<widget class="GtkAlignment" id="alignment65">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="top_padding">4</property>
+ <property name="top_padding">10</property>
<child>
<widget class="GtkHButtonBox" id="hbuttonbox10">
<property name="visible">True</property>
@@ -48136,11 +48155,34 @@ then click this button.</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
+ <widget class="GtkHBox" id="hbox2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkImage" id="image_news_close">
+ <property name="visible">True</property>
+ <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="GtkLabel" id="label412">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label"
translatable="yes">Close</property>
</widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
</child>
</widget>
</child>
diff --git a/src/gui/app1/icons.cs b/src/gui/app1/icons.cs
index 23a517a9d..5c28f5e7d 100644
--- a/src/gui/app1/icons.cs
+++ b/src/gui/app1/icons.cs
@@ -528,6 +528,7 @@ public partial class ChronoJumpWindow
image_encoder_analyze_mode_options_close.Pixbuf = pixbuf;
image_force_sensor_capture_adjust_close.Pixbuf = pixbuf;
app1s_image_button_close.Pixbuf = pixbuf;
+ image_news_close.Pixbuf = pixbuf;
/*
diff --git a/src/gui/app1/news.cs b/src/gui/app1/news.cs
index 83fff46c3..57f2c2135 100644
--- a/src/gui/app1/news.cs
+++ b/src/gui/app1/news.cs
@@ -43,6 +43,9 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Label label_news_description_and_link;
[Widget] Gtk.Label label_news_open_error;
[Widget] Gtk.Image image_news;
+ [Widget] Gtk.Image image_news_close;
+ [Widget] Gtk.Alignment alignment_above_news; //to align vertically with sidebar
+ [Widget] Gtk.HBox hbox_news_languages; //to align vertically with sidebar
Pixbuf image_news_pixbuf;
private int currentNewsPos;
@@ -161,6 +164,17 @@ public partial class ChronoJumpWindow
// 3) show the news tab
notebook_news.Page = 1;
+
+ //align with sidebar
+ if(preferences.personWinHide)
+ alignment_above_news.TopPadding = (uint) (alignment_menu_tiny.TopPadding
+ - hbox_news_languages.SizeRequest().Height
+ -1); //alignment_news_languages.BottomPadding
+ else
+ alignment_above_news.TopPadding = (uint) (alignment_session_persons.TopPadding
+ + hbox_above_frame_session.SizeRequest().Height
+ - hbox_news_languages.SizeRequest().Height
+ -1); //alignment_news_languages.BottomPadding
}
private void news_setup_gui(int currentPos)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]