[nautilus/wip/antoniof/gtk4-preparation-drop-libgd: 1/4] general: Remove thumbnail frame
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/gtk4-preparation-drop-libgd: 1/4] general: Remove thumbnail frame
- Date: Thu, 23 Dec 2021 22:04:00 +0000 (UTC)
commit fa8b2b57855e69ec18181c31fe6e683a44f27310
Author: António Fernandes <antoniof gnome org>
Date: Tue Nov 2 21:57:50 2021 +0000
general: Remove thumbnail frame
Shadows are present in design mockups, frame is not.
In GTK 4 we are going to be able to draw shadows in the new views using
CSS, which is going to be much better than transforming pixbufs.
Furthermore, this removes another use of libgd, which we want to stop
depending on as part of the GTK 3-to-4 migration.
icons/thumbnail_frame.png | Bin 482 -> 0 bytes
src/nautilus-file.c | 4 ----
src/nautilus-ui-utilities.c | 25 -------------------------
src/nautilus-ui-utilities.h | 1 -
src/resources/nautilus.gresource.xml | 1 -
5 files changed, 31 deletions(-)
---
diff --git a/src/nautilus-file.c b/src/nautilus-file.c
index 3f5d1399c..9498e81e4 100644
--- a/src/nautilus-file.c
+++ b/src/nautilus-file.c
@@ -5261,10 +5261,6 @@ nautilus_file_get_thumbnail_icon (NautilusFile *file,
{
nautilus_ui_frame_video (&pixbuf);
}
- else
- {
- nautilus_ui_frame_image (&pixbuf);
- }
}
}
diff --git a/src/nautilus-ui-utilities.c b/src/nautilus-ui-utilities.c
index 195f765f9..79a624a14 100644
--- a/src/nautilus-ui-utilities.c
+++ b/src/nautilus-ui-utilities.c
@@ -28,7 +28,6 @@
#include <gio/gio.h>
#include <gtk/gtk.h>
-#include <libgd/gd.h>
#include <string.h>
#include <glib/gi18n.h>
@@ -68,30 +67,6 @@ nautilus_gmenu_set_from_model (GMenu *target_menu,
}
}
-#define NAUTILUS_THUMBNAIL_FRAME_LEFT 3
-#define NAUTILUS_THUMBNAIL_FRAME_TOP 3
-#define NAUTILUS_THUMBNAIL_FRAME_RIGHT 3
-#define NAUTILUS_THUMBNAIL_FRAME_BOTTOM 3
-
-void
-nautilus_ui_frame_image (GdkPixbuf **pixbuf)
-{
- GtkBorder border;
- GdkPixbuf *pixbuf_with_frame;
-
- border.left = NAUTILUS_THUMBNAIL_FRAME_LEFT;
- border.top = NAUTILUS_THUMBNAIL_FRAME_TOP;
- border.right = NAUTILUS_THUMBNAIL_FRAME_RIGHT;
- border.bottom = NAUTILUS_THUMBNAIL_FRAME_BOTTOM;
-
- pixbuf_with_frame = gd_embed_image_in_frame (*pixbuf,
- "resource:///org/gnome/nautilus/icons/thumbnail_frame.png",
- &border, &border);
- g_object_unref (*pixbuf);
-
- *pixbuf = pixbuf_with_frame;
-}
-
static GdkPixbuf *filmholes_left = NULL;
static GdkPixbuf *filmholes_right = NULL;
diff --git a/src/nautilus-ui-utilities.h b/src/nautilus-ui-utilities.h
index 1136e1de6..ed00f5fc7 100644
--- a/src/nautilus-ui-utilities.h
+++ b/src/nautilus-ui-utilities.h
@@ -28,7 +28,6 @@
void nautilus_gmenu_set_from_model (GMenu *target_menu,
GMenuModel *source_model);
-void nautilus_ui_frame_image (GdkPixbuf **pixbuf);
void nautilus_ui_frame_video (GdkPixbuf **pixbuf);
gboolean nautilus_file_date_in_between (guint64 file_unix_time,
diff --git a/src/resources/nautilus.gresource.xml b/src/resources/nautilus.gresource.xml
index a0cd28876..ccb2ef6ff 100644
--- a/src/resources/nautilus.gresource.xml
+++ b/src/resources/nautilus.gresource.xml
@@ -28,7 +28,6 @@
<file>ui/nautilus-operations-ui-manager-request-passphrase.ui</file>
<file alias="gtk/ui/nautilusgtkplacesview.ui">../gtk/nautilusgtkplacesview.ui</file>
<file alias="gtk/ui/nautilusgtkplacesviewrow.ui">../gtk/nautilusgtkplacesviewrow.ui</file>
- <file alias="icons/thumbnail_frame.png">../../icons/thumbnail_frame.png</file>
<file alias="icons/filmholes.png">../../icons/filmholes.png</file>
<file>css/Adwaita.css</file>
<file>css/nautilus.css</file>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]