[chronojump] color on person_show_all_events
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] color on person_show_all_events
- Date: Thu, 20 Aug 2020 02:40:10 +0000 (UTC)
commit 37446d0ed1d9a1fb43669eebe1ef6ac37e9b61e6
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Aug 20 03:39:54 2020 +0100
color on person_show_all_events
glade/person_show_all_events.glade | 22 ++++++++++++++++++----
src/gui/app1/chronojumpPersons.cs | 6 ++++--
src/gui/person/showAllEvents.cs | 13 ++++++++++---
3 files changed, 32 insertions(+), 9 deletions(-)
---
diff --git a/glade/person_show_all_events.glade b/glade/person_show_all_events.glade
index 4190e448..89d2f3c6 100644
--- a/glade/person_show_all_events.glade
+++ b/glade/person_show_all_events.glade
@@ -19,7 +19,6 @@
<property name="spacing">6</property>
<child>
<widget class="GtkCheckButton" id="checkbutton_only_current_session">
- <property name="label" translatable="yes">show only persons in current session</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -27,6 +26,13 @@
<property name="active">True</property>
<property name="draw_indicator">True</property>
<signal name="clicked" handler="on_checkbutton_only_current_session_clicked" swapped="no"/>
+ <child>
+ <widget class="GtkLabel" id="label_checkbutton_only_current_session">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">show only persons in current session</property>
+ </widget>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -40,7 +46,7 @@
<property name="can_focus">False</property>
<property name="spacing">10</property>
<child>
- <widget class="GtkLabel" id="label166">
+ <widget class="GtkLabel" id="label_person">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Person:</property>
@@ -88,11 +94,19 @@
<widget class="GtkScrolledWindow" id="scrolledwindow20">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="shadow_type">in</property>
<child>
- <widget class="GtkTreeView" id="treeview_person_show_all_events">
+ <widget class="GtkViewport" id="viewport1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="headers_clickable">False</property>
+ <property name="border_width">4</property>
+ <child>
+ <widget class="GtkTreeView" id="treeview_person_show_all_events">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="headers_clickable">False</property>
+ </widget>
+ </child>
</widget>
</child>
</widget>
diff --git a/src/gui/app1/chronojumpPersons.cs b/src/gui/app1/chronojumpPersons.cs
index 575a0db5..b6075cc2 100644
--- a/src/gui/app1/chronojumpPersons.cs
+++ b/src/gui/app1/chronojumpPersons.cs
@@ -359,7 +359,8 @@ public partial class ChronoJumpWindow
private void on_show_all_person_events_activate (object o, EventArgs args)
{
- personShowAllEventsWin = PersonShowAllEventsWindow.Show(app1, currentSession.UniqueID,
currentPerson, true);
+ personShowAllEventsWin = PersonShowAllEventsWindow.Show(app1,
+ currentSession.UniqueID, currentPerson, true, preferences.colorBackground);
}
@@ -449,7 +450,8 @@ public partial class ChronoJumpWindow
}
private void on_button_top_person_show_all_events (object o, EventArgs args)
{
- personShowAllEventsWin = PersonShowAllEventsWindow.Show(app1, currentSession.UniqueID,
currentPerson, false);
+ personShowAllEventsWin = PersonShowAllEventsWindow.Show(app1,
+ currentSession.UniqueID, currentPerson, false, preferences.colorBackground);
personShowAllEventsWin.FakeButtonDone.Clicked -= new
EventHandler(on_person_show_all_persons_event_close);
personShowAllEventsWin.FakeButtonDone.Clicked += new
EventHandler(on_person_show_all_persons_event_close);
}
diff --git a/src/gui/person/showAllEvents.cs b/src/gui/person/showAllEvents.cs
index 5582a8b3..e2628c0b 100644
--- a/src/gui/person/showAllEvents.cs
+++ b/src/gui/person/showAllEvents.cs
@@ -31,6 +31,8 @@ public class PersonShowAllEventsWindow
[Widget] Gtk.Window person_show_all_events;
[Widget] Gtk.CheckButton checkbutton_only_current_session;
+ [Widget] Gtk.Label label_checkbutton_only_current_session;
+ [Widget] Gtk.Label label_person;
[Widget] Gtk.Label label_person_name;
[Widget] Gtk.TreeView treeview_person_show_all_events;
@@ -46,7 +48,7 @@ public class PersonShowAllEventsWindow
protected Person currentPerson;
- PersonShowAllEventsWindow (Gtk.Window parent, int sessionID, Person currentPerson)
+ PersonShowAllEventsWindow (Gtk.Window parent, int sessionID, Person currentPerson, Gdk.Color
colorBackground)
{
Glade.XML gladeXML;
gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "person_show_all_events.glade",
"person_show_all_events", "chronojump");
@@ -54,6 +56,10 @@ public class PersonShowAllEventsWindow
//put an icon to window
UtilGtk.IconWindow(person_show_all_events);
+ UtilGtk.WindowColor(person_show_all_events, colorBackground);
+ UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground),
label_checkbutton_only_current_session);
+ UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label_person);
+ UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), label_person_name);
person_show_all_events.Parent = parent;
this.sessionID = sessionID;
@@ -71,10 +77,11 @@ public class PersonShowAllEventsWindow
fillTreeView(treeview_person_show_all_events,store, currentPerson.UniqueID);
}
- static public PersonShowAllEventsWindow Show (Gtk.Window parent, int sessionID, Person currentPerson,
bool allowChangePerson)
+ static public PersonShowAllEventsWindow Show (Gtk.Window parent,
+ int sessionID, Person currentPerson, bool allowChangePerson, Gdk.Color
colorBackground)
{
if (PersonShowAllEventsWindowBox == null) {
- PersonShowAllEventsWindowBox = new PersonShowAllEventsWindow (parent, sessionID,
currentPerson);
+ PersonShowAllEventsWindowBox = new PersonShowAllEventsWindow (parent, sessionID,
currentPerson, colorBackground);
}
if(allowChangePerson)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]