[chronojump] Ensure contrast of no_image icon for person



commit 44a99a1d09e92518dedcfe82a66ae6942e595de1
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Jul 21 16:28:55 2021 +0200

    Ensure contrast of no_image icon for person

 images/md/ic_photo_camera_yellow_24dp_2x.png | Bin 0 -> 9371 bytes
 src/Makefile.am                              |   1 +
 src/gui/app1/chronojump.cs                   |   5 +++++
 src/gui/app1/chronojumpPersons.cs            |   3 +++
 src/gui/app1/icons.cs                        |   2 ++
 src/gui/person/personSelect.cs               |   8 ++++++--
 6 files changed, 17 insertions(+), 2 deletions(-)
---
diff --git a/images/md/ic_photo_camera_yellow_24dp_2x.png b/images/md/ic_photo_camera_yellow_24dp_2x.png
new file mode 100644
index 000000000..496f7b131
Binary files /dev/null and b/images/md/ic_photo_camera_yellow_24dp_2x.png differ
diff --git a/src/Makefile.am b/src/Makefile.am
index 2f041aa70..a0cbce137 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -500,6 +500,7 @@ RESOURCES = \
        ../images/md/ic_person_blue_24dp_1x.png,image_person.png \
        ../images/md/ic_person_logout_blue_24dp_1x.png,image_person_logout.png \
        ../images/md/ic_photo_camera_blue_24dp_2x.png,image_no_photo.png \
+       ../images/md/ic_photo_camera_yellow_24dp_2x.png,image_no_photo_yellow.png \
        ../images/md/ic_select_blue_24dp_3x.png,image_selected.png \
        ../images/md/ic_cached_blue_24dp_1x.png,image_recalculate.png \
        ../images/md/ic_delete_blue_24dp_1x.png,stock_delete.png \
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 609b0ac8d..818eeb793 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -875,6 +875,11 @@ public partial class ChronoJumpWindow
                                UtilGtk.ContrastLabelsVBox (Config.ColorBackgroundIsDark, 
vbox_person_manage_load);
                                UtilGtk.ContrastLabelsVBox (Config.ColorBackgroundIsDark, 
vbox_persons_bottom_no_photo);
                        }
+
+                       Pixbuf pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_no_photo.png");
+                       if(Config.ColorBackgroundIsDark)
+                               pixbuf = new Pixbuf (null, Util.GetImagePath(false) + 
"image_no_photo_yellow.png");
+                       image_current_person.Pixbuf = pixbuf;
                }
 
                if(! Config.UseSystemColor)
diff --git a/src/gui/app1/chronojumpPersons.cs b/src/gui/app1/chronojumpPersons.cs
index 2fab16c8b..247fd131c 100644
--- a/src/gui/app1/chronojumpPersons.cs
+++ b/src/gui/app1/chronojumpPersons.cs
@@ -90,7 +90,10 @@ public partial class ChronoJumpWindow
                } else {
                        //image_current_person.Pixbuf = null;
                        Pixbuf pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_no_photo.png");
+                       if(Config.ColorBackgroundIsDark)
+                               pixbuf = new Pixbuf (null, Util.GetImagePath(false) + 
"image_no_photo_yellow.png");
                        image_current_person.Pixbuf = pixbuf;
+
                        button_image_current_person_zoom.Sensitive = false;
                        button_image_current_person_zoom_h.Sensitive = false;
                }
diff --git a/src/gui/app1/icons.cs b/src/gui/app1/icons.cs
index 954b290af..70e9999c2 100644
--- a/src/gui/app1/icons.cs
+++ b/src/gui/app1/icons.cs
@@ -366,6 +366,8 @@ public partial class ChronoJumpWindow
                image_current_person_zoom_h.Pixbuf = pixbuf;
 
                pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_no_photo.png");
+               if(Config.ColorBackgroundIsDark)
+                       pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_no_photo_yellow.png");
                image_current_person.Pixbuf = pixbuf;
 
                pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "image_weight.png");
diff --git a/src/gui/person/personSelect.cs b/src/gui/person/personSelect.cs
index e6797bacc..3d617f29c 100644
--- a/src/gui/person/personSelect.cs
+++ b/src/gui/person/personSelect.cs
@@ -622,8 +622,12 @@ public class PersonPhotoButton
 
                if(photoFile != "" && File.Exists(photoFile))
                        assignPhotoToPixbuf(image, true, photoFile);
-               else
-                       assignPhotoToPixbuf(image, false, Util.GetImagePath(false) + "image_no_photo.png");
+               else {
+                       if(Config.ColorBackgroundIsDark)
+                               assignPhotoToPixbuf(image, false, Util.GetImagePath(false) + 
"image_no_photo_yellow.png");
+                       else
+                               assignPhotoToPixbuf(image, false, Util.GetImagePath(false) + 
"image_no_photo.png");
+               }
        }
 
        private void assignPhotoToPixbuf (Gtk.Image image, bool fromFile, string photoFile)


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