[chronojump] cancel/accept icons for preferences_win



commit ce9cfa2d5e1a294cc27c3056cf28dfbda9593000
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon Jul 26 17:43:06 2021 +0200

    cancel/accept icons for preferences_win

 glade/preferences_win.glade | 66 ++++++++++++++++++++++++++++++++++++++++++---
 src/gui/preferences.cs      |  6 +++++
 2 files changed, 68 insertions(+), 4 deletions(-)
---
diff --git a/glade/preferences_win.glade b/glade/preferences_win.glade
index 065eb066e..0c32a36b0 100644
--- a/glade/preferences_win.glade
+++ b/glade/preferences_win.glade
@@ -7503,14 +7503,43 @@ version:</property>
                 <property name="layout_style">end</property>
                 <child>
                   <widget class="GtkButton" id="button_cancel">
-                    <property name="label">gtk-cancel</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="can_default">True</property>
                     <property name="receives_default">False</property>
-                    <property name="use_stock">True</property>
                     <signal name="clicked" handler="on_button_cancel_clicked" swapped="no"/>
                     <accelerator key="Escape" signal="clicked"/>
+                    <child>
+                      <widget class="GtkHBox" id="hbox30">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="spacing">4</property>
+                        <child>
+                          <widget class="GtkImage" id="image_button_cancel">
+                            <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="label73">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Cancel</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </widget>
+                    </child>
                   </widget>
                   <packing>
                     <property name="expand">False</property>
@@ -7520,13 +7549,42 @@ version:</property>
                 </child>
                 <child>
                   <widget class="GtkButton" id="button_accept">
-                    <property name="label">gtk-ok</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="can_default">True</property>
                     <property name="receives_default">False</property>
-                    <property name="use_stock">True</property>
                     <signal name="clicked" handler="on_button_accept_clicked" swapped="no"/>
+                    <child>
+                      <widget class="GtkHBox" id="hbox53">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="spacing">4</property>
+                        <child>
+                          <widget class="GtkImage" id="image_button_accept">
+                            <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="label92">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="label" translatable="yes">Accept</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </widget>
+                    </child>
                   </widget>
                   <packing>
                     <property name="expand">False</property>
diff --git a/src/gui/preferences.cs b/src/gui/preferences.cs
index e47d5969a..e9fccc4e4 100644
--- a/src/gui/preferences.cs
+++ b/src/gui/preferences.cs
@@ -264,6 +264,8 @@ public class PreferencesWindow
 
        [Widget] Gtk.Button button_accept;
        [Widget] Gtk.Button button_cancel;
+       [Widget] Gtk.Image image_button_accept;
+       [Widget] Gtk.Image image_button_cancel;
        public Gtk.Button FakeButtonConfigurationImported;
        public Gtk.Button FakeButtonDebugModeStart;
        
@@ -355,6 +357,10 @@ public class PreferencesWindow
                PreferencesWindowBox.createComboLanguage();
                Pixbuf pixbuf;
 
+
+               PreferencesWindowBox.image_button_cancel.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) 
+ "image_cancel.png");
+               PreferencesWindowBox.image_button_accept.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) 
+ "image_done_blue.png");
+
                //appearance tab
 
                pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_rest.png");


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