[gnome-control-center/wip/exalm/appearance: 6/7] background: Clean up the slideshow icon
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/exalm/appearance: 6/7] background: Clean up the slideshow icon
- Date: Sun, 19 Dec 2021 16:38:07 +0000 (UTC)
commit 729b70448469afad32216c952547660e7e5a924a
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Sun Dec 19 18:26:12 2021 +0500
background: Clean up the slideshow icon
Update the unused symbolic to match the svg with a baked-in shadow,
actually use it. Bundle it in gresources instead of installing, fix the
style class name. Fix margins - the close button was overriding them.
panels/background/background.gresource.xml | 4 ++
panels/background/cc-background-chooser.c | 13 ++--
panels/background/meson.build | 10 ---
panels/background/preview.css | 2 +-
panels/background/slideshow-emblem.svg | 104 -----------------------------
panels/background/slideshow-symbolic.svg | 71 +-------------------
6 files changed, 12 insertions(+), 192 deletions(-)
---
diff --git a/panels/background/background.gresource.xml b/panels/background/background.gresource.xml
index c715aad9a..5f2dc6e7b 100644
--- a/panels/background/background.gresource.xml
+++ b/panels/background/background.gresource.xml
@@ -6,4 +6,8 @@
<file preprocess="xml-stripblanks">cc-background-preview.ui</file>
<file>preview.css</file>
</gresource>
+
+ <gresource prefix="/org/gnome/ControlCenter/icons/scalable/actions">
+ <file preprocess="xml-stripblanks">slideshow-symbolic.svg</file>
+ </gresource>
</gresources>
diff --git a/panels/background/cc-background-chooser.c b/panels/background/cc-background-chooser.c
index 14a812410..7eb9aa0f1 100644
--- a/panels/background/cc-background-chooser.c
+++ b/panels/background/cc-background-chooser.c
@@ -107,8 +107,7 @@ create_widget_func (gpointer model_item,
picture = gtk_picture_new_for_pixbuf (pixbuf);
gtk_picture_set_can_shrink (GTK_PICTURE (picture), FALSE);
- icon = gtk_image_new_from_icon_name ("slideshow-emblem");
- gtk_image_set_pixel_size (GTK_IMAGE (icon), 16);
+ icon = gtk_image_new_from_icon_name ("slideshow-symbolic");
gtk_widget_set_margin_start (icon, 8);
gtk_widget_set_margin_end (icon, 8);
gtk_widget_set_margin_top (icon, 8);
@@ -116,17 +115,17 @@ create_widget_func (gpointer model_item,
gtk_widget_set_halign (icon, GTK_ALIGN_END);
gtk_widget_set_valign (icon, GTK_ALIGN_END);
gtk_widget_set_visible (icon, cc_background_item_changes_with_time (item));
- gtk_widget_add_css_class (icon, "slideshow-emblem");
+ gtk_widget_add_css_class (icon, "slideshow-icon");
if (BG_IS_RECENT_SOURCE (source))
{
button = gtk_button_new_from_icon_name ("window-close-symbolic");
gtk_widget_set_halign (button, GTK_ALIGN_END);
gtk_widget_set_valign (button, GTK_ALIGN_START);
- gtk_widget_set_margin_start (icon, 6);
- gtk_widget_set_margin_end (icon, 6);
- gtk_widget_set_margin_top (icon, 6);
- gtk_widget_set_margin_bottom (icon, 6);
+ gtk_widget_set_margin_start (button, 6);
+ gtk_widget_set_margin_end (button, 6);
+ gtk_widget_set_margin_top (button, 6);
+ gtk_widget_set_margin_bottom (button, 6);
gtk_widget_add_css_class (button, "osd");
gtk_widget_add_css_class (button, "remove-button");
diff --git a/panels/background/meson.build b/panels/background/meson.build
index e96d020fd..226547232 100644
--- a/panels/background/meson.build
+++ b/panels/background/meson.build
@@ -17,16 +17,6 @@ i18n.merge_file(
install_dir: control_center_desktopdir
)
-install_data(
- 'slideshow-symbolic.svg',
- install_dir: join_paths(control_center_icondir, 'hicolor', 'scalable', 'categories')
-)
-
-install_data(
- 'slideshow-emblem.svg',
- install_dir: join_paths(control_center_icondir, 'hicolor', 'scalable', 'emblems')
-)
-
install_data(
'noise-texture-light.png',
install_dir: join_paths(control_center_pkgdatadir, 'pixmaps')
diff --git a/panels/background/preview.css b/panels/background/preview.css
index fe990cd2a..21552ef94 100644
--- a/panels/background/preview.css
+++ b/panels/background/preview.css
@@ -53,7 +53,7 @@ background-preview .window.front.dark .header-bar {
box-shadow: 0 0 0 3px @accent_color, 0 0 0 6px alpha(@accent_color, .3);
}
-image.slideshow-icon {
+.slideshow-icon {
color: white;
-gtk-icon-shadow: 0 1px 2px rgba(0, 0, 0, 0.33);
}
diff --git a/panels/background/slideshow-symbolic.svg b/panels/background/slideshow-symbolic.svg
index 815115cbf..6a765349b 100644
--- a/panels/background/slideshow-symbolic.svg
+++ b/panels/background/slideshow-symbolic.svg
@@ -1,70 +1 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="16"
- height="16"
- id="svg5594"
- version="1.1"
- inkscape:version="0.48.0 r9654"
- sodipodi:docname="slideshow-emblem-symbolic.svg">
- <defs
- id="defs5596" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="22.4"
- inkscape:cx="10.858512"
- inkscape:cy="10.780448"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="false"
- inkscape:window-width="789"
- inkscape:window-height="774"
- inkscape:window-x="4"
- inkscape:window-y="51"
- inkscape:window-maximized="0" />
- <metadata
- id="metadata5599">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-1036.3622)">
- <g
- id="g3763"
- transform="matrix(0.86221939,0,0,0.86221939,1.0303599,144.13347)">
- <path
- inkscape:connector-curvature="0"
- id="path14584"
- d="m 7.9642862,1038.3322 c -3.3085937,0 -5.9942603,2.6857 -5.9942603,5.9943 0,3.3086
2.6856666,5.9942 5.9942603,5.9942 3.3085938,0 5.9942608,-2.6856 5.9942608,-5.9942 0,-3.3086 -2.685667,-5.9943
-5.9942608,-5.9943 z m 0,0.8457 c 2.8454368,0 5.1485968,2.3031 5.1485968,5.1486 0,2.8454 -2.30316,5.1486
-5.1485968,5.1486 -2.8454368,0 -5.148597,-2.3032 -5.148597,-5.1486 0,-2.8455 2.3031602,-5.1486
5.148597,-5.1486 z"
-
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#808080;fill-opacity:1;stroke:none;stroke-width:1.0767436;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans"
/>
- <path
- inkscape:connector-curvature="0"
- id="path14586"
- d="m 10.5,1041.3125 a 0.42854288,0.42854288 0 0 0 -0.28125,0.125 l -2.25,2.2813 -1.40625,-1.4063 a
0.4310176,0.4310176 0 1 0 -0.625,0.5937 l 1.71875,1.7188 a 0.42854288,0.42854288 0 0 0 0.625,0 l
2.5625,-2.5625 a 0.42854288,0.42854288 0 0 0 -0.34375,-0.75 z"
-
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#999999;fill-opacity:1;stroke:none;stroke-width:0.85700005;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans"
/>
- </g>
- </g>
-</svg>
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><g color="#000" font-weight="400"
font-family="Sans" fill="#474747"><path d="M8.487.02A7.492 7.492 0 001 7.507a7.492 7.492 0 007.487 7.486
7.492 7.492 0 007.486-7.486A7.492 7.492 0 008.487.02zm0 1.973A5.508 5.508 0 0114 7.507a5.508 5.508 0 01-5.513
5.513 5.508 5.508 0 01-5.514-5.513 5.508 5.508 0 015.514-5.514z"
style="line-height:normal;-inkscape-font-specification:Sans;text-indent:0;text-align:start;text-decoration-line:none;text-transform:none;marker:none"
overflow="visible"/><path d="M11.393 4.007a.5.5 0 00-.25.156L8.487 6.819 6.83 5.163a.5.5 0 10-.687.687l2
2a.5.5 0 00.687 0l3-3a.5.5 0 00-.437-.843z"
style="line-height:normal;-inkscape-font-specification:Sans;text-indent:0;text-align:start;text-decoration-line:none;text-transform:none;marker:none"
overflow="visible"/></g></svg>
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]