[gnome-control-center/wip/hadess/logo-inherit: 43/44] info-overview: Simplify GNOME logo setting
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/hadess/logo-inherit: 43/44] info-overview: Simplify GNOME logo setting
- Date: Fri, 21 May 2021 15:00:22 +0000 (UTC)
commit df4857d96081e658c6057d001e73169e53383d9c
Author: Bastien Nocera <hadess hadess net>
Date: Fri Apr 23 12:41:21 2021 +0200
info-overview: Simplify GNOME logo setting
Use the same code path for setting the GNOME logo as for setting the
distribution logo.
panels/info-overview/cc-info-overview-panel.c | 18 ++-
panels/info-overview/gnome-logo-text-dark.svg | 137 +++++++++++++++++++++
...eLogoVerticalMedium.svg => gnome-logo-text.svg} | 0
panels/info-overview/info-overview.gresource.xml | 1 -
panels/info-overview/meson.build | 6 +-
5 files changed, 149 insertions(+), 13 deletions(-)
---
diff --git a/panels/info-overview/cc-info-overview-panel.c b/panels/info-overview/cc-info-overview-panel.c
index c68b30f34..03b8c3d52 100644
--- a/panels/info-overview/cc-info-overview-panel.c
+++ b/panels/info-overview/cc-info-overview-panel.c
@@ -906,18 +906,14 @@ static void
setup_os_logo (CcInfoOverviewPanel *panel)
{
g_autofree char *logo_name = g_get_os_info ("LOGO");
- if (logo_name != NULL)
- {
- g_autofree char *logo_name_with_variant = NULL;
+ g_autofree char *logo_name_with_variant = NULL;
- logo_name_with_variant = g_strdup_printf ("%s-text%s", logo_name, get_asset_suffix (panel));
- gtk_image_set_from_icon_name (panel->os_logo, logo_name_with_variant, GTK_ICON_SIZE_INVALID);
- gtk_image_set_pixel_size (panel->os_logo, 256);
- }
- else
- {
- gtk_image_set_from_resource (panel->os_logo,
"/org/gnome/control-center/info-overview/GnomeLogoVerticalMedium.svg");
- }
+ if (logo_name == NULL)
+ logo_name = g_strdup ("gnome-logo");
+
+ logo_name_with_variant = g_strdup_printf ("%s-text%s", logo_name, get_asset_suffix (panel));
+ gtk_image_set_from_icon_name (panel->os_logo, logo_name_with_variant, GTK_ICON_SIZE_INVALID);
+ gtk_image_set_pixel_size (panel->os_logo, 256);
}
static void
diff --git a/panels/info-overview/gnome-logo-text-dark.svg b/panels/info-overview/gnome-logo-text-dark.svg
new file mode 100644
index 000000000..26e17b89e
--- /dev/null
+++ b/panels/info-overview/gnome-logo-text-dark.svg
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<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"
+ version="1.0"
+ width="97.966095"
+ height="138.95122"
+ id="svg1903"
+ inkscape:version="1.0.2 (e86c870879, 2021-01-15)"
+ sodipodi:docname="gnome-logo-text-dark.svg">
+ <metadata
+ id="metadata24">
+ <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></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1011"
+ id="namedview22"
+ showgrid="false"
+ inkscape:zoom="2.0645911"
+ inkscape:cx="6.1022513"
+ inkscape:cy="68.392751"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg1903"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0"
+ inkscape:document-rotation="0" />
+ <defs
+ id="defs1905">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 244.11613 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="401.74014 : 244.11613 : 1"
+ inkscape:persp3d-origin="200.87007 : 162.74409 : 1"
+ id="perspective26" />
+ </defs>
+ <g
+ transform="matrix(0.30686102,0,0,0.30686102,-57.94673,-76.524295)"
+ id="layer1"
+ style="fill:#ffffff">
+ <g
+ transform="translate(925.8326,120.8762)"
+ id="g3963"
+ style="fill:#ffffff">
+ <g
+ transform="matrix(2.914897,0,0,2.914897,-717.5904,128.5015)"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ id="g3771">
+ <g
+ style="fill:#ffffff;fill-opacity:1"
+ id="g3773">
+ <path
+ d="M 86.068,0 C 61.466,0 56.851,35.041 70.691,35.041 84.529,35.041 110.671,0 86.068,0 Z"
+ style="fill:#ffffff;fill-opacity:1"
+ id="path3775"
+ inkscape:connector-curvature="0" />
+ <path
+ d="M 45.217,30.699 C 52.586,31.149 60.671,2.577 46.821,4.374 32.976,6.171 37.845,30.249
45.217,30.699 Z"
+ style="fill:#ffffff;fill-opacity:1"
+ id="path3777"
+ inkscape:connector-curvature="0" />
+ <path
+ d="M 11.445,48.453 C 16.686,46.146 12.12,23.581 3.208,29.735 -5.7,35.89 6.204,50.759
11.445,48.453 Z"
+ style="fill:#ffffff;fill-opacity:1"
+ id="path3779"
+ inkscape:connector-curvature="0" />
+ <path
+ d="M 26.212,36.642 C 32.451,35.37 32.793,9.778 21.667,14.369 10.539,18.961 19.978,37.916
26.212,36.642 Z"
+ style="fill:#ffffff;fill-opacity:1"
+ id="path3781"
+ inkscape:connector-curvature="0" />
+ <path
+ d="m 58.791,93.913 c 1.107,8.454 -6.202,12.629 -13.36,7.179 C 22.644,83.743 83.16,75.088
79.171,51.386 75.86,31.712 15.495,37.769 8.621,68.553 3.968,89.374 27.774,118.26 52.614,118.26 c 12.22,0
26.315,-11.034 28.952,-25.012 C 83.58,82.589 57.867,86.86 58.791,93.913 Z"
+ style="fill:#ffffff;fill-opacity:1"
+ id="path3783"
+ inkscape:connector-curvature="0" />
+ </g>
+ </g>
+ <g
+ transform="matrix(1.098291,0,0,1.098291,41.06056,-50.07504)"
+ id="g3956"
+ style="fill:#ffffff">
+ <path
+ d="m -565.99523,509.46063 c -8.08731,0.21792 -14.47394,3.12448 -19.17071,8.69866 -4.86385,5.80101
-7.31024,13.81651 -7.31024,24.03862 0,10.19394 2.44651,18.18745 7.31024,23.98846 4.88761,5.801
11.59815,8.69866 20.15764,8.69866 8.5831,0 15.3105,-2.89766 20.17436,-8.69866 4.86373,-5.80101
7.29358,-13.79452 7.29353,-23.98846 -5e-5,-10.22211 -2.4298,-18.23761 -7.29353,-24.03862 -4.86386,-5.80075
-11.59131,-8.69866 -20.17436,-8.69866 -0.33434,0 -0.6582,-0.009 -0.98693,0 z m 0.60221,11.77669 c
0.12927,-0.003 0.25357,0 0.38472,0 4.21998,0 7.48996,1.8261 9.8028,5.48697 2.31266,3.66086 3.47944,8.82788
3.47949,15.47362 0,6.61757 -1.16692,11.74604 -3.47949,15.40691 -2.31274,3.66086 -5.58286,5.50352
-9.8028,5.50352 -4.19632,0 -7.43983,-1.84266 -9.75257,-5.50352 -2.31274,-3.66087 -3.47944,-8.78934
-3.47949,-15.40691 0,-6.64574 1.16684,-11.81276 3.47949,-15.47362 2.24035,-3.54647 5.35963,-5.37604
9.36785,-5.48697 z"
+
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:148.7px;line-height:125%;font-family:'Bitstream
Vera Sans';text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none"
+ id="path3787"
+ inkscape:connector-curvature="0" />
+ <path
+ d="m -657.35432,568.97161 c -7.12362,5.98235 -17.72219,5.91366 -22.13752,5.91366 -8.8932,0
-15.93855,-2.92879 -21.13613,-8.78612 -5.19765,-5.88525 -7.7964,-13.85456 -7.7964,-23.90791 0,-10.16578
2.64646,-18.16325 7.93945,-23.99241 5.293,-5.82892 12.54098,-8.74363 21.74413,-8.74363 3.55245,0
6.94991,0.39433 10.19254,1.18273 3.26638,0.78841 6.34203,1.95706 9.22697,3.50595 l -3.70487,10.9527 c
-1.62185,-0.88773 -3.4788,-1.76286 -5.20022,-2.37807 -2.93262,-0.98557 -5.87712,-1.47823 -8.83351,-1.47823
-5.48379,0 -9.71581,1.81623 -12.69601,5.44892 -2.95649,3.60454 -4.4347,8.7718 -4.4347,15.50204 0,6.67415
1.4305,11.82733 4.29167,15.46003 2.86099,3.6327 7.16068,5.44892 12.19522,5.44892 5.11476,0 8.28269,-1.28922
9.97226,-2.64762 v -10.91144 h -11.08087 v -10.89809 h 21.45799"
+
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:148.7px;line-height:125%;font-family:'Bitstream
Vera Sans';text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none"
+ id="path3789"
+ inkscape:connector-curvature="0" />
+ <path
+ d="m -528.50252,510.59568 h 17.5241 l 12.15952,39.37066 12.23105,-39.37066 h 14.81181 l
6.69132,63.06461 h -13.01787 l -4.0148,-39.4349 -12.30257,39.62391 h -8.72628 l -12.30263,-40.9623
-4.01479,40.77329 h -13.05365 l 6.69132,-63.06461"
+
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:148.7px;line-height:125%;font-family:'Bitstream
Vera Sans';text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none"
+ id="path3793"
+ inkscape:connector-curvature="0" />
+ <path
+ d="m -455.68828,510.59568 h 37.15811 v 12.29183 h -23.38928 v 13.08097 h 17.97969 v 10.95369 h
-17.97969 v 14.44629 h 24.17608 v 12.29183 h -37.94491 v -63.06461"
+
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:148.7px;line-height:125%;font-family:'Bitstream
Vera Sans';text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none"
+ id="path3795"
+ inkscape:connector-curvature="0" />
+ <path
+ d="m -647.94283,510.59568 h 8.6869 l 27.44915,37.90083 v -37.90083 h 11.71533 v 63.06461 h
-8.6869 l -27.4491,-37.90083 v 37.90083 h -11.71538 v -63.06461"
+
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:148.7px;line-height:125%;font-family:'Bitstream
Vera Sans';text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none"
+ id="path3791"
+ inkscape:connector-curvature="0" />
+ </g>
+ </g>
+ </g>
+</svg>
diff --git a/panels/info-overview/GnomeLogoVerticalMedium.svg b/panels/info-overview/gnome-logo-text.svg
similarity index 100%
rename from panels/info-overview/GnomeLogoVerticalMedium.svg
rename to panels/info-overview/gnome-logo-text.svg
diff --git a/panels/info-overview/info-overview.gresource.xml
b/panels/info-overview/info-overview.gresource.xml
index 83806e0ad..6a63f755c 100644
--- a/panels/info-overview/info-overview.gresource.xml
+++ b/panels/info-overview/info-overview.gresource.xml
@@ -2,6 +2,5 @@
<gresources>
<gresource prefix="/org/gnome/control-center/info-overview">
<file preprocess="xml-stripblanks">cc-info-overview-panel.ui</file>
- <file>GnomeLogoVerticalMedium.svg</file>
</gresource>
</gresources>
diff --git a/panels/info-overview/meson.build b/panels/info-overview/meson.build
index 14663f24c..2fe10b32c 100644
--- a/panels/info-overview/meson.build
+++ b/panels/info-overview/meson.build
@@ -28,7 +28,6 @@ sources = files(
)
resource_data = files(
- 'GnomeLogoVerticalMedium.svg',
'cc-info-overview-panel.ui'
)
@@ -68,3 +67,8 @@ executable(
install: true,
install_dir: control_center_libexecdir,
)
+
+install_data(
+ [ 'gnome-logo-text.svg', 'gnome-logo-text-dark.svg' ],
+ install_dir: join_paths(control_center_datadir, 'icons')
+)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]