diff options
author | Matias De lellis <mati86dl@gmail.com> | 2021-08-06 09:09:31 -0300 |
---|---|---|
committer | Matias De lellis <mati86dl@gmail.com> | 2021-08-06 09:09:31 -0300 |
commit | ff843ff6c16f552cb2a7d594bcd100490f7e45f1 (patch) | |
tree | eb42c5a301f879078d93d6b20442713cdaf47d52 /src | |
parent | b6b100e345ab7d041e13ea915bb7e8aa8eb6c871 (diff) | |
download | lightdm-gtk-greeter-git-ff843ff6c16f552cb2a7d594bcd100490f7e45f1.tar.gz |
Change the hardcoded icon size around the code, to use a unique define.
It allows to change it easier if necessary. It could probably be
configurable, but it is outside of this PR.
Diffstat (limited to 'src')
-rw-r--r-- | src/greeteruserimage.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/greeteruserimage.c b/src/greeteruserimage.c index 64666b1..5ce7ad4 100644 --- a/src/greeteruserimage.c +++ b/src/greeteruserimage.c @@ -19,6 +19,8 @@ #include "greeterconfiguration.h" #include "greeteruserimage.h" +#define USER_IMAGE_SIZE 80 + static GdkPixbuf * round_image (GdkPixbuf *pixbuf) { @@ -60,7 +62,8 @@ get_default_user_image_from_settings (void) if (value[0] == '/') { image = gdk_pixbuf_new_from_file_at_scale (value, - 80, 80, + USER_IMAGE_SIZE, + USER_IMAGE_SIZE, FALSE, &error); @@ -74,7 +77,7 @@ get_default_user_image_from_settings (void) { image = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), value + 1, - 80, + USER_IMAGE_SIZE, GTK_ICON_LOOKUP_FORCE_SIZE, &error); @@ -104,7 +107,7 @@ get_default_user_image (void) { image = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), "avatar-default", - 80, + USER_IMAGE_SIZE, GTK_ICON_LOOKUP_FORCE_SIZE, &error); @@ -120,7 +123,7 @@ get_default_user_image (void) { image = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), "stock_person", - 80, + USER_IMAGE_SIZE, GTK_ICON_LOOKUP_FORCE_SIZE, &error); @@ -159,7 +162,8 @@ get_user_image (const gchar *username) if (path) { image = gdk_pixbuf_new_from_file_at_scale (path, - 80, 80, + USER_IMAGE_SIZE, + USER_IMAGE_SIZE, FALSE, &error); if (!image) |