[chronojump] color on person recuperate, person recuperate from other session



commit 00d6ad4fd129c3a5eb86eac280d32e8e5bb09fa9
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Aug 19 19:38:32 2020 +0100

    color on person recuperate, person recuperate from other session

 glade/person_recuperate.glade     | 36 +++++++++++++++++++++++++++++-------
 src/gui/app1/chronojumpPersons.cs |  4 ++--
 src/gui/person/recuperate.cs      | 28 +++++++++++++++++++++-------
 3 files changed, 52 insertions(+), 16 deletions(-)
---
diff --git a/glade/person_recuperate.glade b/glade/person_recuperate.glade
index eee8bf08..7959efbb 100644
--- a/glade/person_recuperate.glade
+++ b/glade/person_recuperate.glade
@@ -37,7 +37,7 @@
             <property name="can_focus">False</property>
             <property name="spacing">6</property>
             <child>
-              <widget class="GtkLabel" id="label157">
+              <widget class="GtkLabel" id="label_from_session">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="label" translatable="yes">From session</property>
@@ -75,7 +75,7 @@
             <property name="can_focus">False</property>
             <property name="spacing">6</property>
             <child>
-              <widget class="GtkLabel" id="label503">
+              <widget class="GtkLabel" id="label_check">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Check</property>
@@ -113,7 +113,7 @@
             <property name="can_focus">False</property>
             <property name="spacing">6</property>
             <child>
-              <widget class="GtkLabel" id="label215">
+              <widget class="GtkLabel" id="label_filter">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="label" translatable="yes">Search filter</property>
@@ -149,16 +149,38 @@
           </packing>
         </child>
         <child>
-          <widget class="GtkScrolledWindow" id="scrolledwindow6">
+          <widget class="GtkFrame" id="frame1">
             <property name="visible">True</property>
-            <property name="can_focus">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0</property>
+            <property name="label_yalign">1</property>
+            <property name="shadow_type">in</property>
             <child>
-              <widget class="GtkTreeView" id="treeview_person_recuperate">
+              <widget class="GtkScrolledWindow" id="scrolledwindow6">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <signal name="row_activated" handler="on_row_double_clicked" swapped="no"/>
+                <child>
+                  <widget class="GtkViewport" id="viewport1">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="border_width">4</property>
+                    <child>
+                      <widget class="GtkTreeView" id="treeview_person_recuperate">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <signal name="row_activated" handler="on_row_double_clicked" swapped="no"/>
+                      </widget>
+                    </child>
+                  </widget>
+                </child>
               </widget>
             </child>
+            <child>
+              <placeholder/>
+              <packing>
+                <property name="type">label_item</property>
+              </packing>
+            </child>
           </widget>
           <packing>
             <property name="expand">True</property>
diff --git a/src/gui/app1/chronojumpPersons.cs b/src/gui/app1/chronojumpPersons.cs
index 7199bbcf..575a0db5 100644
--- a/src/gui/app1/chronojumpPersons.cs
+++ b/src/gui/app1/chronojumpPersons.cs
@@ -104,7 +104,7 @@ public partial class ChronoJumpWindow
        private void person_load_single ()
        {
                LogB.Information("recuperate person");
-               personRecuperateWin = PersonRecuperateWindow.Show(app1, currentSession, 
preferences.digitsNumber);
+               personRecuperateWin = PersonRecuperateWindow.Show(app1, currentSession, 
preferences.digitsNumber, preferences.colorBackground);
                personRecuperateWin.FakeButtonDone.Clicked += new EventHandler(on_recuperate_person_accepted);
        }
 
@@ -138,7 +138,7 @@ public partial class ChronoJumpWindow
 
        private void person_load_multiple () {
                LogB.Information("recuperate persons from other session");
-               personsRecuperateFromOtherSessionWin = PersonsRecuperateFromOtherSessionWindow.Show(app1, 
currentSession);
+               personsRecuperateFromOtherSessionWin = PersonsRecuperateFromOtherSessionWindow.Show(app1, 
currentSession, preferences.colorBackground);
                personsRecuperateFromOtherSessionWin.FakeButtonDone.Clicked += new 
EventHandler(on_recuperate_persons_from_session_accepted);
        }
        
diff --git a/src/gui/person/recuperate.cs b/src/gui/person/recuperate.cs
index 67b65ebc..766e7893 100644
--- a/src/gui/person/recuperate.cs
+++ b/src/gui/person/recuperate.cs
@@ -30,6 +30,11 @@ using Mono.Unix;
 public class PersonRecuperateWindow {
        
        [Widget] protected Gtk.Window person_recuperate;
+
+       [Widget] protected Gtk.Label label_top;
+       [Widget] protected Gtk.Label label_from_session;
+       [Widget] protected Gtk.Label label_check;
+       [Widget] protected Gtk.Label label_filter;
        
        [Widget] protected Gtk.CheckButton checkbutton_sorted_by_creation_date;
        
@@ -61,7 +66,7 @@ public class PersonRecuperateWindow {
        protected PersonRecuperateWindow () {
        }
 
-       PersonRecuperateWindow (Gtk.Window parent, Session currentSession) {
+       PersonRecuperateWindow (Gtk.Window parent, Session currentSession, Gdk.Color colorBackground) {
                Glade.XML gladeXML;
                gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "person_recuperate.glade", 
"person_recuperate", null);
                gladeXML.Autoconnect(this);
@@ -69,6 +74,11 @@ public class PersonRecuperateWindow {
                
                //put an icon to window
                UtilGtk.IconWindow(person_recuperate);
+               UtilGtk.WindowColor(person_recuperate, colorBackground);
+               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label_top);
+               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label_from_session);
+               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label_check);
+               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label_filter);
 
                this.currentSession = currentSession;
                
@@ -91,10 +101,10 @@ public class PersonRecuperateWindow {
                treeview_person_recuperate.Selection.Changed += onSelectionEntry;
        }
        
-       static public PersonRecuperateWindow Show (Gtk.Window parent, Session currentSession, int pDN)
+       static public PersonRecuperateWindow Show (Gtk.Window parent, Session currentSession, int pDN, 
Gdk.Color colorBackground)
        {
                if (PersonRecuperateWindowBox == null) {
-                       PersonRecuperateWindowBox = new PersonRecuperateWindow (parent, currentSession);
+                       PersonRecuperateWindowBox = new PersonRecuperateWindow (parent, currentSession, 
colorBackground);
                }
                PersonRecuperateWindowBox.pDN = pDN;
 
@@ -304,7 +314,7 @@ public class PersonsRecuperateFromOtherSessionWindow : PersonRecuperateWindow
        protected PersonsRecuperateFromOtherSessionWindow () {
        }
 
-       PersonsRecuperateFromOtherSessionWindow (Gtk.Window parent, Session currentSession) {
+       PersonsRecuperateFromOtherSessionWindow (Gtk.Window parent, Session currentSession, Gdk.Color 
colorBackground) {
                Glade.XML gladeXML;
                gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "person_recuperate.glade", 
"person_recuperate", null);
                gladeXML.Autoconnect(this);
@@ -312,6 +322,11 @@ public class PersonsRecuperateFromOtherSessionWindow : PersonRecuperateWindow
                
                //put an icon to window
                UtilGtk.IconWindow(person_recuperate);
+               UtilGtk.WindowColor(person_recuperate, colorBackground);
+               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label_top);
+               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label_from_session);
+               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label_check);
+               UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label_filter);
                person_recuperate.Title = Catalog.GetString("Load persons from other session");
 
        
@@ -350,11 +365,11 @@ public class PersonsRecuperateFromOtherSessionWindow : PersonRecuperateWindow
        }
 
        static public PersonsRecuperateFromOtherSessionWindow Show (
-                       Gtk.Window parent, Session currentSession)
+                       Gtk.Window parent, Session currentSession, Gdk.Color colorBackground)
        {
                if (PersonsRecuperateFromOtherSessionWindowBox == null) {
                        PersonsRecuperateFromOtherSessionWindowBox = 
-                               new PersonsRecuperateFromOtherSessionWindow (parent, currentSession);
+                               new PersonsRecuperateFromOtherSessionWindow (parent, currentSession, 
colorBackground);
                }
                PersonsRecuperateFromOtherSessionWindowBox.person_recuperate.Show ();
                
@@ -637,7 +652,6 @@ public class PersonNotUploadWindow : PersonsRecuperateFromOtherSessionWindow
        static PersonNotUploadWindow PersonNotUploadWindowBox;
        ArrayList initiallyUnchecked;
        
-       [Widget] Gtk.Label label_top;
        [Widget] Gtk.Button button_go_forward;
        [Widget] Gtk.Button button_close;
 


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