[chronojump] dialog about with background color
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] dialog about with background color
- Date: Wed, 19 Aug 2020 14:55:50 +0000 (UTC)
commit ec0087013a35d2cddfaeb605d83867f257b383fc
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Aug 19 15:55:35 2020 +0100
dialog about with background color
glade/dialog_about.glade | 467 ++++++++++++++++++++++++---------------------
src/gui/about.cs | 8 +-
src/gui/app1/chronojump.cs | 2 +-
src/preferences.cs | 5 +
src/utilGtk.cs | 5 +
5 files changed, 262 insertions(+), 225 deletions(-)
---
diff --git a/glade/dialog_about.glade b/glade/dialog_about.glade
index ed12e5e8..4e52c8ca 100644
--- a/glade/dialog_about.glade
+++ b/glade/dialog_about.glade
@@ -63,7 +63,7 @@
<property name="can_focus">False</property>
<property name="spacing">10</property>
<child>
- <widget class="GtkLabel" id="label201">
+ <widget class="GtkLabel" id="dialog_about_label_chronojump">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
@@ -117,252 +117,275 @@
</packing>
</child>
<child>
- <widget class="GtkNotebook" id="notebook4">
+ <widget class="GtkFrame" id="frame1">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="tab_hborder">10</property>
- <property name="tab_vborder">4</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="GtkScrolledWindow" id="scrolledwindow1">
+ <widget class="GtkViewport" id="viewport1">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">4</property>
<child>
- <widget class="GtkViewport" id="viewport1">
+ <widget class="GtkNotebook" id="notebook4">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
+ <property name="border_width">6</property>
+ <property name="tab_hborder">10</property>
+ <property name="tab_vborder">4</property>
<child>
- <widget class="GtkVBox" id="vbox1">
+ <widget class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">10</property>
- <property name="spacing">12</property>
- <child>
- <widget class="GtkVBox" id="vbox3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label"
translatable="yes"><b>Software</b></property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="dialog_about_label_developers_software">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="ypad">4</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkVBox" id="vbox2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label"><b>Chronojump Networks</b></property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="dialog_about_label_developers_networks">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="ypad">4</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
<child>
- <widget class="GtkVBox" id="vbox8">
+ <widget class="GtkViewport" id="viewport2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">6</property>
<child>
- <widget class="GtkLabel" id="label7">
+ <widget class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes"><b>Scientific
support</b></property>
- <property name="use_markup">True</property>
+ <property name="border_width">10</property>
+ <property name="spacing">12</property>
+ <child>
+ <widget class="GtkVBox" id="vbox3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label"
translatable="yes"><b>Software</b></property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="dialog_about_label_developers_software">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="ypad">4</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="vbox2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label"><b>Chronojump
Networks</b></property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="dialog_about_label_developers_networks">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="ypad">4</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="vbox8">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkLabel" id="label7">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b>Scientific
support</b></property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="dialog_about_label_developers_scientific">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="ypad">4</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="vbox4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b>Hardware:
Chronopic</b></property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="dialog_about_label_developers_chronopic">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="ypad">4</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
</widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="dialog_about_label_developers_scientific">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="ypad">4</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
</child>
</widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <widget class="GtkVBox" id="vbox4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes"><b>Hardware:
Chronopic</b></property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="dialog_about_label_developers_chronopic">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="ypad">4</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">3</property>
- </packing>
</child>
</widget>
</child>
+ <child>
+ <widget class="GtkLabel" id="label781">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Developers</property>
+ </widget>
+ <packing>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="dialog_about_label_documenters">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="xpad">8</property>
+ <property name="ypad">8</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label782">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Documenters</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="dialog_about_label_translators">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="xpad">8</property>
+ <property name="ypad">8</property>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label783">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Translators</property>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
+ </packing>
+ </child>
</widget>
</child>
</widget>
</child>
<child>
- <widget class="GtkLabel" id="label781">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Developers</property>
- </widget>
- <packing>
- <property name="tab_fill">False</property>
- <property name="type">tab</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="dialog_about_label_documenters">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xpad">8</property>
- <property name="ypad">8</property>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label782">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Documenters</property>
- </widget>
- <packing>
- <property name="position">1</property>
- <property name="tab_fill">False</property>
- <property name="type">tab</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="dialog_about_label_translators">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xpad">8</property>
- <property name="ypad">8</property>
- </widget>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label783">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Translators</property>
- </widget>
+ <placeholder/>
<packing>
- <property name="position">2</property>
- <property name="tab_fill">False</property>
- <property name="type">tab</property>
+ <property name="type">label_item</property>
</packing>
</child>
</widget>
diff --git a/src/gui/about.cs b/src/gui/about.cs
index 6b0814a8..0341dec1 100644
--- a/src/gui/about.cs
+++ b/src/gui/about.cs
@@ -27,6 +27,7 @@ public class About
{
[Widget] Gtk.Dialog dialog_about;
[Widget] Gtk.Image image_logo;
+ [Widget] Gtk.Label dialog_about_label_chronojump;
[Widget] Gtk.Label dialog_about_label_version;
[Widget] Gtk.Label dialog_about_label_developers_software;
@@ -37,7 +38,7 @@ public class About
[Widget] Gtk.Label dialog_about_label_documenters;
[Widget] Gtk.Label dialog_about_label_translators;
- public About (string version, string translators)
+ public About (string version, string translators, Gdk.Color colorBackground)
{
Glade.XML gladeXML;
gladeXML = Glade.XML.FromAssembly (Util.GetGladePath() + "dialog_about.glade",
"dialog_about", "chronojump");
@@ -63,7 +64,10 @@ public class About
dialog_about_label_translators.Text = translators;
//white bg
- dialog_about.ModifyBg(StateType.Normal, new Gdk.Color(0xff,0xff,0xff));
+ //dialog_about.ModifyBg(StateType.Normal, new Gdk.Color(0xff,0xff,0xff));
+ UtilGtk.DialogColor(dialog_about, colorBackground);
+ UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground),
dialog_about_label_chronojump);
+ UtilGtk.ContrastLabelsLabel(UtilGtk.ColorIsDark(colorBackground), dialog_about_label_version);
//put authors
textLabel(Constants.Authors(Constants.AuthorsEnum.SOFTWARE),
dialog_about_label_developers_software);
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 21adc257..b05e82e4 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -6867,7 +6867,7 @@ LogB.Debug("mc finished 5");
if(translator_credits == "translator-credits")
translator_credits = "";
- new About(progVersion, translator_credits);
+ new About(progVersion, translator_credits, preferences.colorBackground);
}
private void on_repetitive_conditions_closed(object o, EventArgs args)
diff --git a/src/preferences.cs b/src/preferences.cs
index 942c8d98..8818b5b9 100644
--- a/src/preferences.cs
+++ b/src/preferences.cs
@@ -459,6 +459,11 @@ public class Preferences
return sNew;
}
+ public Gdk.Color colorBackground
+ {
+ get { return UtilGtk.ColorParse(colorBackgroundString); }
+ }
+
~Preferences() {}
}
diff --git a/src/utilGtk.cs b/src/utilGtk.cs
index 9275826b..fceff205 100644
--- a/src/utilGtk.cs
+++ b/src/utilGtk.cs
@@ -607,6 +607,11 @@ public class UtilGtk
w.ModifyBg(StateType.Normal, color);
}
+ public static void DialogColor(Gtk.Dialog d, Gdk.Color color)
+ {
+ d.ModifyBg(StateType.Normal, color);
+ }
+
public static void ViewportColor(Gtk.Viewport v, Gdk.Color color)
{
v.ModifyBg(StateType.Normal, color);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]