[Pkg-xfce-commits] [Git][xfce-team/desktop/exo][upstream/latest] New upstream version 4.17.4.
Unit 193 (@unit193)
gitlab at salsa.debian.org
Mon Dec 5 07:14:12 GMT 2022
Unit 193 pushed to branch upstream/latest at xfce / desktop / exo
Commits:
e999b489 by Unit 193 at 2022-12-05T02:08:49-05:00
New upstream version 4.17.4.
- - - - -
9 changed files:
- ChangeLog
- NEWS
- configure
- configure.ac
- exo-desktop-item-edit/exo-die-editor.c
- exo/exo-cell-renderer-icon.c
- exo/exo-config.h
- exo/exo-gtk-extensions.c
- exo/exo-thumbnail-preview.c
Changes:
=====================================
ChangeLog
=====================================
@@ -1,3 +1,33 @@
+commit bb09814404c5303a7ca0a243052a763e84ac4a09
+Author: Brian J. Tarricone <brian at tarricone.org>
+Date: Tue Nov 15 20:19:57 2022 -0800
+
+ Fix blurriness in exo-desktop-item-edit icon when UI scale > 1
+
+commit ce38ced8bf461b022bfe30a97e6cad495ff4199a
+Author: Brian J. Tarricone <brian at tarricone.org>
+Date: Tue Nov 1 15:26:40 2022 -0700
+
+ Fix blurriness in ExoThumbnailPreview when UI scale > 1
+
+commit 2d6d5c9cce6a856e633f8d57627417e241e69306
+Author: Brian J. Tarricone <brian at tarricone.org>
+Date: Tue Nov 1 15:18:48 2022 -0700
+
+ Fix icon cell renderer blurriness when UI scale > 1
+
+commit 548b41b9119949157e48262bfbf18dc1915eea97
+Author: Alexander Schwinn <alexxcons at xfce.org>
+Date: Tue Nov 1 10:36:51 2022 +0100
+
+ Back to development
+
+commit ab7460a79a6db1109b004afd39d11186966e9964
+Author: Alexander Schwinn <alexxcons at xfce.org>
+Date: Tue Nov 1 10:35:22 2022 +0100
+
+ Updates for release
+
commit 004f4472ea722e384d1b50bd64ec56b352ee0411
Author: Anonymous <noreply at xfce.org>
Date: Sun Oct 30 00:45:04 2022 +0200
=====================================
NEWS
=====================================
@@ -1,3 +1,10 @@
+4.17.4 (2022-12-01)
+======
+- Fix blurriness in exo-desktop-item-edit icon when UI scale > 1
+- Fix blurriness in ExoThumbnailPreview when UI scale > 1
+- Fix icon cell renderer blurriness when UI scale > 1
+
+
4.17.3 (2022-11-01)
======
- Deprecate exo-string functions
=====================================
configure
=====================================
@@ -1,7 +1,7 @@
#! /bin/sh
-# From configure.ac 004f4472.
+# From configure.ac bb098144.
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for exo 4.17.3.
+# Generated by GNU Autoconf 2.71 for exo 4.17.4.
#
# Report bugs to <https://gitlab.xfce.org/xfce/exo>.
#
@@ -625,8 +625,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='exo'
PACKAGE_TARNAME='exo'
-PACKAGE_VERSION='4.17.3'
-PACKAGE_STRING='exo 4.17.3'
+PACKAGE_VERSION='4.17.4'
+PACKAGE_STRING='exo 4.17.4'
PACKAGE_BUGREPORT='https://gitlab.xfce.org/xfce/exo'
PACKAGE_URL=''
@@ -1496,7 +1496,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures exo 4.17.3 to adapt to many kinds of systems.
+\`configure' configures exo 4.17.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1572,7 +1572,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of exo 4.17.3:";;
+ short | recursive ) echo "Configuration of exo 4.17.4:";;
esac
cat <<\_ACEOF
@@ -1719,7 +1719,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-exo configure 4.17.3
+exo configure 4.17.4
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2021,7 +2021,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by exo $as_me 4.17.3, which was
+It was created by exo $as_me 4.17.4, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
@@ -3411,7 +3411,7 @@ fi
# Define the identity of the package.
PACKAGE='exo'
- VERSION='4.17.3'
+ VERSION='4.17.4'
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -3705,7 +3705,7 @@ LIBEXO_VERINFO=1:0:1
LIBEXO_VERSION_API=2
LIBEXO_VERSION_MAJOR=4
LIBEXO_VERSION_MINOR=17
-LIBEXO_VERSION_MICRO=3
+LIBEXO_VERSION_MICRO=4
@@ -18740,7 +18740,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by exo $as_me 4.17.3, which was
+This file was extended by exo $as_me 4.17.4, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -18808,7 +18808,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-exo config.status 4.17.3
+exo config.status 4.17.4
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
=====================================
configure.ac
=====================================
@@ -18,9 +18,9 @@ m4_define([libexo_verinfo], [1:0:1])
m4_define([libexo_version_api], [2])
m4_define([libexo_version_major], [4])
m4_define([libexo_version_minor], [17])
-m4_define([libexo_version_micro], [3])
+m4_define([libexo_version_micro], [4])
m4_define([libexo_version_nano], [])
-m4_define([libexo_version_build], [004f4472])
+m4_define([libexo_version_build], [bb098144])
m4_define([libexo_version_tag], [])
m4_define([libexo_version], [libexo_version_major().libexo_version_minor().libexo_version_micro()ifelse(libexo_version_nano(), [], [], [.libexo_version_nano()])ifelse(libexo_version_tag(), [git], [libexo_version_tag()-libexo_version_build()], [libexo_version_tag()])])
@@ -42,7 +42,7 @@ Copyright (c) 2004-2019 Xfce Development Team])
AC_INIT([exo], [libexo_version], [https://gitlab.xfce.org/xfce/exo])
AC_PREREQ([2.69])
AC_CONFIG_MACRO_DIRS([m4])
-AC_REVISION([004f4472])
+AC_REVISION([bb098144])
AC_CANONICAL_TARGET()
dnl ***************************
=====================================
exo-desktop-item-edit/exo-die-editor.c
=====================================
@@ -1190,13 +1190,16 @@ void
exo_die_editor_set_icon (ExoDieEditor *editor,
const gchar *icon)
{
- GtkIconTheme *icon_theme;
- GdkPixbuf *pixbuf_scaled;
- GdkPixbuf *pixbuf = NULL;
- GtkWidget *image;
- GtkWidget *label;
- gint pixbuf_width;
- gint pixbuf_height;
+ GtkIconTheme *icon_theme;
+ GdkPixbuf *pixbuf_scaled;
+ GdkPixbuf *pixbuf = NULL;
+ cairo_surface_t *surface;
+ GtkWidget *image;
+ GtkWidget *label;
+ gint scale_factor;
+ gint icon_size;
+ gint pixbuf_width;
+ gint pixbuf_height;
g_return_if_fail (EXO_DIE_IS_EDITOR (editor));
g_return_if_fail (g_utf8_validate (icon, -1, NULL));
@@ -1215,6 +1218,9 @@ exo_die_editor_set_icon (ExoDieEditor *editor,
if (gtk_bin_get_child (GTK_BIN (editor->icon_button)) != NULL)
gtk_widget_destroy (gtk_bin_get_child (GTK_BIN (editor->icon_button)));
+ scale_factor = gtk_widget_get_scale_factor (GTK_WIDGET (editor));
+ icon_size = 48 * scale_factor;
+
/* check the icon depending on the type */
if (icon != NULL && g_path_is_absolute (icon))
{
@@ -1227,7 +1233,7 @@ exo_die_editor_set_icon (ExoDieEditor *editor,
icon_theme = gtk_icon_theme_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (editor)));
/* try to load the named icon */
- pixbuf = gtk_icon_theme_load_icon (icon_theme, icon, 48, 0, NULL);
+ pixbuf = gtk_icon_theme_load_icon (icon_theme, icon, icon_size, GTK_ICON_LOOKUP_FORCE_SIZE, NULL);
}
/* setup the icon button */
@@ -1236,20 +1242,22 @@ exo_die_editor_set_icon (ExoDieEditor *editor,
/* scale down the icon if required */
pixbuf_width = gdk_pixbuf_get_width (pixbuf);
pixbuf_height = gdk_pixbuf_get_height (pixbuf);
- if (G_UNLIKELY (pixbuf_width > 48 || pixbuf_height > 48))
+ if (G_UNLIKELY (pixbuf_width > icon_size || pixbuf_height > icon_size))
{
- pixbuf_scaled = exo_gdk_pixbuf_scale_ratio (pixbuf, 48);
+ pixbuf_scaled = exo_gdk_pixbuf_scale_ratio (pixbuf, icon_size);
g_object_unref (G_OBJECT (pixbuf));
pixbuf = pixbuf_scaled;
}
+ surface = gdk_cairo_surface_create_from_pixbuf (pixbuf, scale_factor, gtk_widget_get_window (GTK_WIDGET (editor)));
/* setup an image for the icon */
- image = gtk_image_new_from_pixbuf (pixbuf);
+ image = gtk_image_new_from_surface (surface);
gtk_container_add (GTK_CONTAINER (editor->icon_button), image);
gtk_widget_show (image);
/* release the pixbuf */
g_object_unref (G_OBJECT (pixbuf));
+ cairo_surface_destroy (surface);
}
else
{
=====================================
exo/exo-cell-renderer-icon.c
=====================================
@@ -378,10 +378,13 @@ exo_cell_renderer_icon_render (GtkCellRenderer *renderer,
GtkIconInfo *icon_info = NULL;
GdkPixbuf *icon = NULL;
GdkPixbuf *temp;
+ cairo_surface_t *surface;
GError *err = NULL;
gchar *display_name = NULL;
- gint *icon_sizes;
- gint icon_size;
+ gint *theme_icon_sizes;
+ gint requested_icon_size;
+ gint selected_icon_size;
+ gint scale_factor;
gint n;
gdk_cairo_get_clip_rectangle (cr, expose_area);
@@ -390,11 +393,14 @@ exo_cell_renderer_icon_render (GtkCellRenderer *renderer,
if (G_UNLIKELY (priv->icon == NULL && priv->gicon == NULL))
return;
+ scale_factor = gtk_widget_get_scale_factor (widget);
+ requested_icon_size = priv->size * scale_factor;
+
/* icon may be either an image file or a named icon */
if (priv->icon != NULL && g_path_is_absolute (priv->icon))
{
/* load the icon via the thumbnail database */
- icon = _exo_thumbnail_get_for_file (priv->icon, (priv->size > 128) ? EXO_THUMBNAIL_SIZE_LARGE : EXO_THUMBNAIL_SIZE_NORMAL, &err);
+ icon = _exo_thumbnail_get_for_file (priv->icon, (requested_icon_size > 128) ? EXO_THUMBNAIL_SIZE_LARGE : EXO_THUMBNAIL_SIZE_NORMAL, &err);
}
else if (priv->icon != NULL || priv->gicon != NULL)
{
@@ -403,30 +409,37 @@ exo_cell_renderer_icon_render (GtkCellRenderer *renderer,
if (priv->icon != NULL)
{
- icon_sizes = gtk_icon_theme_get_icon_sizes (icon_theme, priv->icon);
- for (icon_size = -1, n = 0; icon_sizes[n] != 0; ++n)
+ theme_icon_sizes = gtk_icon_theme_get_icon_sizes (icon_theme, priv->icon);
+ for (selected_icon_size = -1, n = 0; theme_icon_sizes[n] != 0; ++n)
{
- /* we can use any size if scalable, because we load the file directly */
- if (icon_sizes[n] == -1)
- icon_size = priv->size;
- else if (icon_sizes[n] > icon_size && icon_sizes[n] <= priv->size)
- icon_size = icon_sizes[n];
+ /* we can use any size if scalable, because we load the file directly. also bail if we get an exact match. */
+ if (theme_icon_sizes[n] == -1 || theme_icon_sizes[n] == requested_icon_size)
+ {
+ selected_icon_size = requested_icon_size;
+ break;
+ }
+ /* selected icon size is still too small, but this icon size is better */
+ else if (selected_icon_size < requested_icon_size && theme_icon_sizes[n] > selected_icon_size)
+ selected_icon_size = theme_icon_sizes[n];
+ /* this icon is large enough, and is a closer match than what we've selected */
+ else if (theme_icon_sizes[n] > requested_icon_size && theme_icon_sizes[n] < selected_icon_size)
+ selected_icon_size = theme_icon_sizes[n];
}
- g_free (icon_sizes);
+ g_free (theme_icon_sizes);
/* if we don't know any icon sizes at all, the icon is probably not present */
- if (G_UNLIKELY (icon_size < 0))
- icon_size = priv->size;
+ if (G_UNLIKELY (selected_icon_size < 0))
+ selected_icon_size = requested_icon_size;
/* lookup the icon in the icon theme */
- icon_info = gtk_icon_theme_lookup_icon (icon_theme, priv->icon, icon_size, 0);
+ icon_info = gtk_icon_theme_lookup_icon (icon_theme, priv->icon, selected_icon_size, GTK_ICON_LOOKUP_FORCE_SIZE);
}
else if (priv->gicon != NULL)
{
icon_info = gtk_icon_theme_lookup_by_gicon (icon_theme,
priv->gicon,
- priv->size,
- GTK_ICON_LOOKUP_USE_BUILTIN);
+ requested_icon_size,
+ GTK_ICON_LOOKUP_USE_BUILTIN | GTK_ICON_LOOKUP_FORCE_SIZE);
}
if (G_UNLIKELY (icon_info == NULL))
@@ -440,7 +453,7 @@ exo_cell_renderer_icon_render (GtkCellRenderer *renderer,
* real available cell area directly here, because loading thumbnails involves scaling anyway
* and this way we need to the thumbnail pixbuf scale only once.
*/
- icon = _exo_thumbnail_get_for_file (filename, (priv->size > 128) ? EXO_THUMBNAIL_SIZE_LARGE : EXO_THUMBNAIL_SIZE_NORMAL, &err);
+ icon = _exo_thumbnail_get_for_file (filename, (requested_icon_size > 128) ? EXO_THUMBNAIL_SIZE_LARGE : EXO_THUMBNAIL_SIZE_NORMAL, &err);
}
else
{
@@ -476,20 +489,20 @@ exo_cell_renderer_icon_render (GtkCellRenderer *renderer,
}
/* determine the real icon size */
- icon_area.width = gdk_pixbuf_get_width (icon);
- icon_area.height = gdk_pixbuf_get_height (icon);
+ icon_area.width = gdk_pixbuf_get_width (icon) / scale_factor;
+ icon_area.height = gdk_pixbuf_get_height (icon) / scale_factor;
/* scale down the icon on-demand */
if (G_UNLIKELY (icon_area.width > cell_area->width || icon_area.height > cell_area->height))
{
/* scale down to fit */
- temp = exo_gdk_pixbuf_scale_down (icon, TRUE, cell_area->width, cell_area->height);
+ temp = exo_gdk_pixbuf_scale_down (icon, TRUE, cell_area->width * scale_factor, cell_area->height * scale_factor);
g_object_unref (G_OBJECT (icon));
icon = temp;
/* determine the icon dimensions again */
- icon_area.width = gdk_pixbuf_get_width (icon);
- icon_area.height = gdk_pixbuf_get_height (icon);
+ icon_area.width = gdk_pixbuf_get_width (icon) / scale_factor;
+ icon_area.height = gdk_pixbuf_get_height (icon) / scale_factor;
}
icon_area.x = cell_area->x + (cell_area->width - icon_area.width) / 2;
@@ -546,9 +559,12 @@ exo_cell_renderer_icon_render (GtkCellRenderer *renderer,
}
/* render the invalid parts of the icon */
- gdk_cairo_set_source_pixbuf (cr, icon, icon_area.x, icon_area.y);
+ surface = gdk_cairo_surface_create_from_pixbuf (icon, scale_factor, gtk_widget_get_window (widget));
+ cairo_set_source_surface (cr, surface, icon_area.x, icon_area.y);
cairo_rectangle (cr, draw_area.x, draw_area.y, draw_area.width, draw_area.height);
cairo_fill (cr);
+
+ cairo_surface_destroy (surface);
}
/* release the file's icon */
=====================================
exo/exo-config.h
=====================================
@@ -55,7 +55,7 @@ G_BEGIN_DECLS
* compile time, rather than from the library linked against at
* application run time.
**/
-#define EXO_MICRO_VERSION 3
+#define EXO_MICRO_VERSION 4
/**
* EXO_CHECK_VERSION:
=====================================
exo/exo-gtk-extensions.c
=====================================
@@ -102,6 +102,16 @@ update_preview (GtkFileChooser *chooser,
+static void
+scale_factor_changed (ExoThumbnailPreview *thumbnail_preview,
+ GParamSpec *spec,
+ GtkFileChooser *chooser)
+{
+ update_preview (chooser, thumbnail_preview);
+}
+
+
+
/**
* exo_gtk_file_chooser_add_thumbnail_preview:
* @chooser : a #GtkFileChooser.
@@ -139,6 +149,7 @@ exo_gtk_file_chooser_add_thumbnail_preview (GtkFileChooser *chooser)
gtk_file_chooser_set_preview_widget_active (chooser, TRUE);
gtk_file_chooser_set_use_preview_label (chooser, FALSE);
gtk_widget_show (thumbnail_preview);
+ g_signal_connect (G_OBJECT (thumbnail_preview), "notify::scale-factor", G_CALLBACK (scale_factor_changed), chooser);
/* update the preview as necessary */
g_signal_connect (G_OBJECT (chooser), "update-preview", G_CALLBACK (update_preview), thumbnail_preview);
=====================================
exo/exo-thumbnail-preview.c
=====================================
@@ -237,14 +237,17 @@ void
_exo_thumbnail_preview_set_uri (ExoThumbnailPreview *thumbnail_preview,
const gchar *uri)
{
- struct stat statb;
- GdkPixbuf *thumbnail_framed;
- GdkPixbuf *thumbnail;
- gchar *icon_name = NULL;
- gchar *size_name = NULL;
- gchar *displayname;
- gchar *filename;
- gchar *slash;
+ struct stat statb;
+ GdkPixbuf *thumbnail_framed;
+ GdkPixbuf *thumbnail;
+ cairo_surface_t *surface;
+ gchar *icon_name = NULL;
+ gchar *size_name = NULL;
+ gchar *displayname;
+ gchar *filename;
+ gchar *slash;
+ gint scale_factor;
+ ExoThumbnailSize thumbnail_size;
_exo_return_if_fail (EXO_IS_THUMBNAIL_PREVIEW (thumbnail_preview));
@@ -330,11 +333,14 @@ _exo_thumbnail_preview_set_uri (ExoThumbnailPreview *thumbnail_preview,
else
{
/* try to load a thumbnail for the URI */
- thumbnail = _exo_thumbnail_get_for_uri (uri, EXO_THUMBNAIL_SIZE_NORMAL, NULL);
+ scale_factor = gtk_widget_get_scale_factor (GTK_WIDGET (thumbnail_preview));
+ thumbnail_size = scale_factor > 1 ? EXO_THUMBNAIL_SIZE_LARGE : EXO_THUMBNAIL_SIZE_NORMAL;
+
+ thumbnail = _exo_thumbnail_get_for_uri (uri, thumbnail_size, NULL);
if (thumbnail == NULL && G_LIKELY (filename != NULL))
{
/* but we can try to generate a thumbnail */
- thumbnail = _exo_thumbnail_get_for_file (filename, EXO_THUMBNAIL_SIZE_NORMAL, NULL);
+ thumbnail = _exo_thumbnail_get_for_file (filename, thumbnail_size, NULL);
}
/* check if we have a thumbnail */
@@ -342,9 +348,11 @@ _exo_thumbnail_preview_set_uri (ExoThumbnailPreview *thumbnail_preview,
{
/* setup the thumbnail for the image (using a frame if possible) */
thumbnail_framed = thumbnail_add_frame (thumbnail);
- gtk_image_set_from_pixbuf (GTK_IMAGE (thumbnail_preview->image), thumbnail_framed);
+ surface = gdk_cairo_surface_create_from_pixbuf (thumbnail_framed, scale_factor, gtk_widget_get_window (GTK_WIDGET (thumbnail_preview)));
+ gtk_image_set_from_surface (GTK_IMAGE (thumbnail_preview->image), surface);
g_object_unref (G_OBJECT (thumbnail_framed));
g_object_unref (G_OBJECT (thumbnail));
+ cairo_surface_destroy (surface);
}
else
{
View it on GitLab: https://salsa.debian.org/xfce-team/desktop/exo/-/commit/e999b489a4b2c59ee7361ea8fdec23f3d06d0f10
--
View it on GitLab: https://salsa.debian.org/xfce-team/desktop/exo/-/commit/e999b489a4b2c59ee7361ea8fdec23f3d06d0f10
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-xfce-commits/attachments/20221205/4b27d90e/attachment-0001.htm>
More information about the Pkg-xfce-commits
mailing list