Update to 42.rc
This commit is contained in:
parent
33c145acfd
commit
1d130f7022
1
.gitignore
vendored
1
.gitignore
vendored
@ -157,3 +157,4 @@ nautilus-2.31.6.tar.bz2
|
||||
/nautilus-41.1.tar.xz
|
||||
/nautilus-42.alpha.tar.xz
|
||||
/nautilus-42.beta.tar.xz
|
||||
/nautilus-42.rc.tar.xz
|
||||
|
@ -1,93 +0,0 @@
|
||||
From 18dd71d10e2960d62caf590724715973ac9e5684 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ant=C3=B3nio=20Fernandes?= <antoniof@gnome.org>
|
||||
Date: Mon, 28 Feb 2022 13:05:40 +0000
|
||||
Subject: [PATCH] list-view: Draw shadow instead of doing style class changes
|
||||
|
||||
---
|
||||
src/nautilus-list-view.c | 55 +++++++++++++++++++++++++++-------------
|
||||
1 file changed, 37 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
|
||||
index 77278fab1..c1cef11f2 100644
|
||||
--- a/src/nautilus-list-view.c
|
||||
+++ b/src/nautilus-list-view.c
|
||||
@@ -1578,16 +1578,6 @@ starred_cell_data_func (GtkTreeViewColumn *column,
|
||||
g_autofree gchar *text = NULL;
|
||||
g_autofree gchar *uri = NULL;
|
||||
NautilusFile *file;
|
||||
- GtkStyleContext *context;
|
||||
-
|
||||
- /* The "thumbnail" style class is set before rendering each icon cell with
|
||||
- * a thumbnail. However, style classes are not applied to each cell, but
|
||||
- * alwyas to the whole GtkTreeView widget. So, before the star icon is
|
||||
- * rendered, we must ensure that the style is not set, otherwise the star
|
||||
- * icon is going to get the styles meant only for thumbnail icons.
|
||||
- */
|
||||
- context = gtk_widget_get_style_context (GTK_WIDGET (view));
|
||||
- gtk_style_context_remove_class (context, "thumbnail");
|
||||
|
||||
gtk_tree_model_get (model, iter,
|
||||
view->details->file_name_column_num, &text,
|
||||
@@ -1659,10 +1649,6 @@ icon_cell_data_func (GtkTreeViewColumn *column,
|
||||
&file,
|
||||
-1);
|
||||
|
||||
- /* Hack: Set/unset the style class in advance of rendering. This makes a
|
||||
- * major assumption that's all but clearly stated in the documentation of
|
||||
- * GtkCellLayout: that the DataFunc is called before rendering each cell.
|
||||
- */
|
||||
is_thumbnail = FALSE;
|
||||
if (zoom_level_is_enough_for_thumbnails (view) && file != NULL)
|
||||
{
|
||||
@@ -1678,11 +1664,44 @@ icon_cell_data_func (GtkTreeViewColumn *column,
|
||||
|
||||
if (is_thumbnail)
|
||||
{
|
||||
+ cairo_surface_t *new_surface;
|
||||
+ cairo_t *cr;
|
||||
+
|
||||
+ /* The shadow extends 1px up, 3px down, and 2px left and right.
|
||||
+ *
|
||||
+ * *************************
|
||||
+ * *# #*
|
||||
+ * *# #*
|
||||
+ * *# #*
|
||||
+ * *# #*
|
||||
+ * *# #*
|
||||
+ * *# #*
|
||||
+ * *# #*
|
||||
+ * *# #*
|
||||
+ * *# #*
|
||||
+ * *# #*
|
||||
+ * *#######################*
|
||||
+ * *#######################*
|
||||
+ * *************************
|
||||
+ *
|
||||
+ * Therefore, final surface is 4px taller and 4px wider, with the
|
||||
+ * original icon starting at (2,1).
|
||||
+ */
|
||||
+ new_surface = cairo_surface_create_similar (surface,
|
||||
+ CAIRO_CONTENT_COLOR_ALPHA,
|
||||
+ cairo_image_surface_get_width (surface) + 4,
|
||||
+ cairo_image_surface_get_height (surface) + 4);
|
||||
+ cr = cairo_create (new_surface);
|
||||
+
|
||||
+ gtk_style_context_save (context);
|
||||
gtk_style_context_add_class (context, "thumbnail");
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- gtk_style_context_remove_class (context, "thumbnail");
|
||||
+ gtk_render_icon_surface (context, cr, surface, 2, 1);
|
||||
+ gtk_style_context_restore (context);
|
||||
+
|
||||
+ cairo_destroy (cr);
|
||||
+
|
||||
+ cairo_surface_destroy (surface);
|
||||
+ surface = new_surface;
|
||||
}
|
||||
|
||||
g_object_set (renderer,
|
||||
--
|
||||
GitLab
|
||||
|
@ -5,15 +5,13 @@
|
||||
%global tarball_version %%(echo %{version} | tr '~' '.')
|
||||
|
||||
Name: nautilus
|
||||
Version: 42~beta
|
||||
Release: 2%{?dist}
|
||||
Version: 42~rc
|
||||
Release: 1%{?dist}
|
||||
Summary: File manager for GNOME
|
||||
|
||||
License: GPLv3+
|
||||
URL: https://wiki.gnome.org/Apps/Nautilus
|
||||
Source0: https://download.gnome.org/sources/%{name}/42/%{name}-%{tarball_version}.tar.xz
|
||||
# https://gitlab.gnome.org/GNOME/nautilus/-/issues/2169
|
||||
Patch0: nautilus-42.beta-dropshadow.patch
|
||||
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: gcc
|
||||
@ -146,6 +144,9 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/*.desktop
|
||||
%doc %{_datadir}/gtk-doc/html/libnautilus-extension/
|
||||
|
||||
%changelog
|
||||
* Mon Mar 07 2022 David King <amigadave@amigadave.com> - 42~rc-1
|
||||
- Update to 42.rc
|
||||
|
||||
* Mon Feb 28 2022 David King <amigadave@amigadave.com> - 42~beta-2
|
||||
- Fix thumbnail drop shadow refresh bug
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (nautilus-42.beta.tar.xz) = 1c8437a59b43885fd94611270d76d4a7728948e2b9dd721d444ffd07b4e019dbcab48a4ee9a806f6e86cf9e598321d4683818c349950b3391a80f47d059c6c8c
|
||||
SHA512 (nautilus-42.rc.tar.xz) = 38f7e65e78ff1c11a4c7ef8cf833fbc9789c6bb0acc73a1422fd9aa93992d22b7e16a18b38def57677eb8f687feb2d0841e7ea4ec58d8ac3000102091c09153d
|
||||
|
Loading…
Reference in New Issue
Block a user