57 lines
1.8 KiB
Diff
57 lines
1.8 KiB
Diff
From 57b1d9b523c57a9ebf662f6da08cd26a3a22401a Mon Sep 17 00:00:00 2001
|
|
From: Qiu Wenbo <qiuwenbo@kylinos.com.cn>
|
|
Date: Tue, 13 Sep 2022 17:03:37 +0800
|
|
Subject: [PATCH] Revert "thumbnails: Create larger thumbnails for higher
|
|
density displays"
|
|
|
|
This reverts commit 278435e3c20244b48986c6cd8b72c5317668c72d.
|
|
|
|
glib2 do not handle x-large and xx-large case so G_FILE_ATTRIBUTE_THUMBNAIL_PATH
|
|
simply return nothing. That makes nautilus think the thumbnail should be
|
|
generated again which is a dead loop.
|
|
---
|
|
src/nautilus-thumbnails.c | 27 +--------------------------
|
|
1 file changed, 1 insertion(+), 26 deletions(-)
|
|
|
|
diff --git a/src/nautilus-thumbnails.c b/src/nautilus-thumbnails.c
|
|
index 790b4e36f..1bad311e1 100644
|
|
--- a/src/nautilus-thumbnails.c
|
|
+++ b/src/nautilus-thumbnails.c
|
|
@@ -137,32 +137,7 @@ get_thumbnail_factory (void)
|
|
|
|
if (thumbnail_factory == NULL)
|
|
{
|
|
- GdkDisplay *display = gdk_display_get_default ();
|
|
- GListModel *monitors = gdk_display_get_monitors (display);
|
|
- gint max_scale = 1;
|
|
- GnomeDesktopThumbnailSize size;
|
|
-
|
|
- for (guint i = 0; i < g_list_model_get_n_items (monitors); i++)
|
|
- {
|
|
- g_autoptr (GdkMonitor) monitor = g_list_model_get_item (monitors, i);
|
|
-
|
|
- max_scale = MAX (max_scale, gdk_monitor_get_scale_factor (monitor));
|
|
- }
|
|
-
|
|
- if (max_scale <= 1)
|
|
- {
|
|
- size = GNOME_DESKTOP_THUMBNAIL_SIZE_LARGE;
|
|
- }
|
|
- else if (max_scale <= 2)
|
|
- {
|
|
- size = GNOME_DESKTOP_THUMBNAIL_SIZE_XLARGE;
|
|
- }
|
|
- else
|
|
- {
|
|
- size = GNOME_DESKTOP_THUMBNAIL_SIZE_XXLARGE;
|
|
- }
|
|
-
|
|
- thumbnail_factory = gnome_desktop_thumbnail_factory_new (size);
|
|
+ thumbnail_factory = gnome_desktop_thumbnail_factory_new (GNOME_DESKTOP_THUMBNAIL_SIZE_LARGE);
|
|
}
|
|
|
|
return thumbnail_factory;
|
|
--
|
|
GitLab
|
|
|