[nautilus/gnome-42] css: Checkerboard background for thumbnails with transparent area
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/gnome-42] css: Checkerboard background for thumbnails with transparent area
- Date: Sat, 9 Apr 2022 23:47:43 +0000 (UTC)
commit f4e9a9ececad296001f172dfb94393f3fc844728
Author: utkarshvg2401 <utkarshvg2401 gmail com>
Date: Sun Apr 10 01:00:39 2022 +0530
css: Checkerboard background for thumbnails with transparent area
Currently, images with transparent backgrounds have their thumbnails
displayed with a white background image, which causes a visibility
issue for white images with no background in light mode.
Hence, a checkerboard background is added to the thumbnails of these
images, making them clearly visible.
Close https://gitlab.gnome.org/GNOME/nautilus/-/issues/2211
src/resources/Checkerboard.png | Bin 0 -> 184 bytes
src/resources/css/Adwaita.css | 4 ++--
src/resources/nautilus.gresource.xml | 1 +
3 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/resources/Checkerboard.png b/src/resources/Checkerboard.png
new file mode 100644
index 000000000..3e43acd93
Binary files /dev/null and b/src/resources/Checkerboard.png differ
diff --git a/src/resources/css/Adwaita.css b/src/resources/css/Adwaita.css
index f38923d9d..435fd51b1 100644
--- a/src/resources/css/Adwaita.css
+++ b/src/resources/css/Adwaita.css
@@ -260,6 +260,6 @@ flowboxchild:selected image {
0px 0px 0px 1px alpha(@borders, 0.5),
0px 2px 0px 0px alpha(@borders, 0.5);
border-radius: 2px;
- /* Opaque background for thumbnails with transparent areas. */
- background-color: #fafafa;
+ /* Background for thumbnails with transparent areas. */
+ background: url('/org/gnome/nautilus/Checkerboard.png') repeat;
}
diff --git a/src/resources/nautilus.gresource.xml b/src/resources/nautilus.gresource.xml
index 9e129b669..eec94cbf2 100644
--- a/src/resources/nautilus.gresource.xml
+++ b/src/resources/nautilus.gresource.xml
@@ -32,5 +32,6 @@
<file>css/Adwaita.css</file>
<file>css/nautilus.css</file>
<file>text-x-preview.png</file>
+ <file>Checkerboard.png</file>
</gresource>
</gresources>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]