[gnome-photos] Don't frame the thumbnails inside a drop shadow
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] Don't frame the thumbnails inside a drop shadow
- Date: Wed, 15 Feb 2017 17:06:51 +0000 (UTC)
commit 19ca5f214099c22934f6698c487e612867fe7c71
Author: Debarshi Ray <debarshir gnome org>
Date: Wed Feb 15 18:03:07 2017 +0100
Don't frame the thumbnails inside a drop shadow
We are changing the visuals of our thumbnail grid after the port to
GtkFlowBox. Jimmac suggested that we remove the drop shadow.
Since we are using regular GTK+ widgets to display each item, we can
resort to CSS if we change our minds later.
data/Makefile.am | 1 -
data/thumbnail-frame.png | Bin 832 -> 0 bytes
src/photos-base-item.c | 18 +-----------------
src/photos-utils.c | 15 ---------------
src/photos-utils.h | 2 --
src/photos.gresource.xml | 1 -
6 files changed, 1 insertions(+), 36 deletions(-)
---
diff --git a/data/Makefile.am b/data/Makefile.am
index f017816..788bc29 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -34,7 +34,6 @@ EXTRA_DIST = \
sidebar-radio-prelight.svg \
sidebar-radio-selected.svg \
sidebar-radio-selected-prelight.svg \
- thumbnail-frame.png \
vignette.png \
$(NULL)
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index fbd1729..f88704f 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -331,7 +331,6 @@ photos_base_item_check_effects_and_update_info (PhotosBaseItem *self)
GList *emblem_icons = NULL;
GList *windows;
GdkPixbuf *emblemed_pixbuf = NULL;
- GdkPixbuf *thumbnailed_pixbuf = NULL;
GdkWindow *window = NULL;
gint scale;
@@ -406,31 +405,16 @@ photos_base_item_check_effects_and_update_info (PhotosBaseItem *self)
g_clear_pointer (&priv->surface, (GDestroyNotify) cairo_surface_destroy);
- if (priv->thumb_path != NULL)
- {
- GtkBorder *slice;
-
- slice = photos_utils_get_thumbnail_frame_border ();
- thumbnailed_pixbuf = gd_embed_image_in_frame (emblemed_pixbuf,
- "resource:///org/gnome/Photos/thumbnail-frame.png",
- slice,
- slice);
- gtk_border_free (slice);
- }
- else
- thumbnailed_pixbuf = g_object_ref (emblemed_pixbuf);
-
windows = gtk_application_get_windows (GTK_APPLICATION (app));
if (windows != NULL)
window = gtk_widget_get_window (GTK_WIDGET (windows->data));
- priv->surface = gdk_cairo_surface_create_from_pixbuf (thumbnailed_pixbuf, scale, window);
+ priv->surface = gdk_cairo_surface_create_from_pixbuf (emblemed_pixbuf, scale, window);
g_object_notify (G_OBJECT (self), "icon");
g_signal_emit (self, signals[INFO_UPDATED], 0);
out:
- g_clear_object (&thumbnailed_pixbuf);
g_clear_object (&emblemed_pixbuf);
g_list_free_full (emblem_icons, g_object_unref);
}
diff --git a/src/photos-utils.c b/src/photos-utils.c
index 3667354..c268c1b 100644
--- a/src/photos-utils.c
+++ b/src/photos-utils.c
@@ -1104,21 +1104,6 @@ photos_utils_get_provider_name (PhotosBaseManager *src_mngr, PhotosBaseItem *ite
}
-GtkBorder *
-photos_utils_get_thumbnail_frame_border (void)
-{
- GtkBorder *slice;
-
- slice = gtk_border_new ();
- slice->top = 3;
- slice->right = 3;
- slice->bottom = 6;
- slice->left = 4;
-
- return slice;
-}
-
-
gchar *
photos_utils_get_thumbnail_path_for_file (GFile *file)
{
diff --git a/src/photos-utils.h b/src/photos-utils.h
index c872381..e811088 100644
--- a/src/photos-utils.h
+++ b/src/photos-utils.h
@@ -144,8 +144,6 @@ char* photos_utils_get_pixbuf_common_suffix (GdkPixbufFormat *form
const gchar *photos_utils_get_provider_name (PhotosBaseManager *src_mngr, PhotosBaseItem
*item);
-GtkBorder *photos_utils_get_thumbnail_frame_border (void);
-
gchar *photos_utils_get_thumbnail_path_for_file (GFile *file);
gchar *photos_utils_get_thumbnail_path_for_uri (const gchar *uri);
diff --git a/src/photos.gresource.xml b/src/photos.gresource.xml
index 34ed09c..6a60998 100644
--- a/src/photos.gresource.xml
+++ b/src/photos.gresource.xml
@@ -13,7 +13,6 @@
<file alias="sidebar-radio-prelight.svg"
preprocess="to-pixdata">../data/sidebar-radio-prelight.svg</file>
<file alias="sidebar-radio-selected.svg"
preprocess="to-pixdata">../data/sidebar-radio-selected.svg</file>
<file alias="sidebar-radio-selected-prelight.svg"
preprocess="to-pixdata">../data/sidebar-radio-selected-prelight.svg</file>
- <file alias="thumbnail-frame.png" preprocess="to-pixdata">../data/thumbnail-frame.png</file>
<file alias="vignette.png" preprocess="to-pixdata">../data/vignette.png</file>
</gresource>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]