[simple-scan/gnome-3-32] icon: ship custom app icon
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [simple-scan/gnome-3-32] icon: ship custom app icon
- Date: Tue, 9 Apr 2019 23:40:12 +0000 (UTC)
commit e0c6e17f66e7e3d78b0f20978cf842fd5d3d5933
Author: Jakub Steiner <jimmac gmail com>
Date: Mon Mar 18 14:15:52 2019 +0000
icon: ship custom app icon
- GNOME 3.32 redesign of app icons.
See https://gitlab.gnome.org/GNOME/Initiatives/issues/2
for more info.
/label ~"9. Initiative: AppIconRedesign"
(cherry picked from commit 7c4e4fe14fd41ca203ec526d866aaaf3afc84eb2)
data/icons/hicolor/scalable/org.gnome.SimpleScan.svg | 1 +
data/icons/hicolor/symbolic/org.gnome.SimpleScan-symbolic.svg | 1 +
data/meson.build | 6 ++++++
data/simple-scan.desktop.in | 2 +-
meson.build | 2 ++
src/app-window.ui | 5 +++--
src/app-window.vala | 4 ++--
src/preferences-dialog.ui | 3 ++-
8 files changed, 18 insertions(+), 6 deletions(-)
---
diff --git a/data/icons/hicolor/scalable/org.gnome.SimpleScan.svg
b/data/icons/hicolor/scalable/org.gnome.SimpleScan.svg
new file mode 100644
index 0000000..9616b55
--- /dev/null
+++ b/data/icons/hicolor/scalable/org.gnome.SimpleScan.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"
version="1.0" enable-background="new"><defs><linearGradient xlink:href="#a" id="n"
gradientUnits="userSpaceOnUse" gradientTransform="matrix(-.25 0 0 .25 166 125.009)" x1="248" y1="619.964"
x2="568" y2="619.964"/><linearGradient id="a"><stop offset="0" stop-color="#d5d3cf"/><stop offset=".05"
stop-color="#e4e1de"/><stop offset=".1" stop-color="#d5d3cf"/><stop offset=".9" stop-color="#d5d3cf"/><stop
offset=".95" stop-color="#e4e1de"/><stop offset="1" stop-color="#d5d3cf"/></linearGradient><clipPath
clipPathUnits="userSpaceOnUse" id="l"><rect style="marker:none" width="400" height="256" x="56" y="-92"
rx="8" ry="8" fill="none" stroke="#000" stroke-width="4" enable-background="new"/></clipPath><filter id="m"
x="-.264" width="1.528" y="-.014" height="1.028" color-interpolation-filters="sRGB"><feGaussianBlur
stdDeviation="1.76"/></filter><radialGradient xlink:href="#b" id="k
" cx="-7
2.632" cy="88.045" fx="-72.632" fy="88.045" r="200" gradientTransform="matrix(.08386 0 0 2.375 230.091
-273.105)" gradientUnits="userSpaceOnUse"/><linearGradient id="b"><stop offset="0"
stop-color="#d5d3cf"/><stop offset="1" stop-color="#d5d3cf"
stop-opacity="0"/></linearGradient><linearGradient gradientTransform="matrix(.25 0 0 .29687 225 12)"
xlink:href="#c" id="j" x1="-156" y1="-256" x2="220" y2="-256" gradientUnits="userSpaceOnUse"/><linearGradient
id="c"><stop offset="0"/><stop offset="1" stop-color="#424048"/></linearGradient><linearGradient
gradientTransform="matrix(.25 0 0 .275 232.467 16.3)" xlink:href="#d" id="i" x1="-122.894" y1="-292"
x2="34.97" y2="-292" gradientUnits="userSpaceOnUse"/><linearGradient id="d"><stop offset="0"
stop-color="#d5d3cf"/><stop offset="1" stop-color="#f6f5f4"/></linearGradient><linearGradient id="h"><stop
stop-color="#fff" offset="0"/><stop stop-opacity="0" stop-color="#fff"
offset="1"/></linearGradient><linearGradient id="e"><stop stop-
color="#
f6f5f4" offset="0"/><stop stop-color="#fff" offset="1"/></linearGradient><linearGradient id="f"><stop
stop-color="#d5d3cf" offset="0"/><stop stop-color="#e4e1de" offset=".05"/><stop stop-color="#d5d3cf"
offset=".1"/><stop stop-color="#d5d3cf" offset=".9"/><stop stop-color="#e4e1de" offset=".95"/><stop
stop-color="#d5d3cf" offset="1"/></linearGradient><linearGradient id="g"><stop stop-color="#d5d3cf"
offset="0"/><stop stop-color="#e4e1de" offset=".02"/><stop stop-color="#d5d3cf" offset=".059"/><stop
stop-color="#d5d3cf" offset=".945"/><stop stop-color="#e4e1de" offset=".973"/><stop stop-color="#d5d3cf"
offset="1"/></linearGradient></defs><g transform="translate(0 -172)"><rect transform="rotate(90)" ry="8.8"
rx="8" y="-108" x="180" height="88" width="110" style="marker:none" fill="url(#i)"
enable-background="new"/><rect transform="rotate(90)" ry="0" rx="0" y="-102" x="186" height="76" width="94"
style="marker:none" fill="url(#j)" enable-background="new"/><rect transform="rotat
e(90)" r
y="0" rx="0" y="-102" x="186" height="76" width="94" style="marker:none" opacity=".486" fill="url(#k)"
enable-background="new"/><g transform="matrix(0 .25 -.29687 0 74.688 132)" clip-path="url(#l)" fill="#fff"
stroke="none" color="#000" font-weight="400" font-family="sans-serif"><path transform="matrix(1.33333 0 0 1
-144 0)" d="M372-116v304h24v-304z"
style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;white-space:normal;shape-padding:0;isolation:auto;mix-blend-mode:normal;solid-color:#000;solid-opacity:1"
overflow="visible" fill="#f9f06b" filter="url(#m)" enable-background="new"/><path d="M360-116v304h16v-304z"
style="line-height:normal;font-variant-ligatures:normal;font-variant-
position
:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;white-space:normal;shape-padding:0;isolation:auto;mix-blend-mode:normal;solid-color:#000;solid-opacity:1"
overflow="visible" enable-background="accumulate"/></g><path style="marker:none" d="M108 280v4c0 4.432-3.568
8-8 8H28c-4.432 0-8-3.568-8-8v-4c0 4.432 3.568 8 8 8h72c4.432 0 8-3.568 8-8z" fill="url(#n)"
enable-background="new"/><g stroke-width="1.376"><path d="M37.815 191.985h36.096l22.088 21.748.001 54.585c0
3.221-2.626 5.831-5.847 5.831H37.815A5.803 5.803 0 0 1 32 268.334V197.8a5.803 5.803 0 0 1 5.815-5.816z"
fill="#f6f5f4" enable-background="new"/><path d="M74.036 192.235v15.992c0 3.222 2.624 5.76 5.846
5.76l15.992-.004z" fill="#deddda" enable-background="new"/></g></g></svg>
\ No newline at end of file
diff --git a/data/icons/hicolor/symbolic/org.gnome.SimpleScan-symbolic.svg
b/data/icons/hicolor/symbolic/org.gnome.SimpleScan-symbolic.svg
new file mode 100644
index 0000000..e18b812
--- /dev/null
+++ b/data/icons/hicolor/symbolic/org.gnome.SimpleScan-symbolic.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.0"><defs><linearGradient
id="d"><stop offset="0" stop-color="#d5d3cf"/><stop offset="1" stop-color="#d5d3cf"
stop-opacity="0"/></linearGradient><linearGradient id="e"><stop offset="0"/><stop offset="1"
stop-color="#424048"/></linearGradient><linearGradient id="f"><stop offset="0" stop-color="#d5d3cf"/><stop
offset="1" stop-color="#f6f5f4"/></linearGradient><linearGradient id="g"><stop stop-color="#fff"
offset="0"/><stop stop-opacity="0" stop-color="#fff" offset="1"/></linearGradient><linearGradient
id="a"><stop stop-color="#f6f5f4" offset="0"/><stop stop-color="#fff"
offset="1"/></linearGradient><linearGradient id="b"><stop stop-color="#d5d3cf" offset="0"/><stop
stop-color="#e4e1de" offset=".05"/><stop stop-color="#d5d3cf" offset=".1"/><stop stop-color="#d5d3cf"
offset=".9"/><stop stop-color="#e4e1de" offset=".95"/><stop stop-color="#d5d3cf"
offset="1"/></linearGradient><linearGradient id="c"><stop sto
p-color=
"#d5d3cf" offset="0"/><stop stop-color="#e4e1de" offset=".02"/><stop stop-color="#d5d3cf"
offset=".059"/><stop stop-color="#d5d3cf" offset=".945"/><stop stop-color="#e4e1de" offset=".973"/><stop
stop-color="#d5d3cf" offset="1"/></linearGradient></defs><g transform="translate(-160 -172)"><rect
style="marker:none" width="12" height="12" x="162" y="174" rx="1.661" ry="1.661" fill="none" stroke="#000"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path style="marker:none" d="M163
179.645h11" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round"/><path
style="marker:none" d="M165 176v8h6v-6l-2-2z"/></g></svg>
\ No newline at end of file
diff --git a/data/meson.build b/data/meson.build
index d942bf4..aa1d0ec 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -1,3 +1,9 @@
+install_data (join_paths ('icons', 'hicolor', 'scalable', '@0@.svg'.format(app_id)),
+ install_dir: join_paths (datadir, 'icons', 'hicolor', 'scalable', 'apps'))
+
+install_data (join_paths ('icons', 'hicolor', 'symbolic', '@0 -symbolic svg'.format(app_id)),
+ install_dir: join_paths (datadir, 'icons', 'hicolor', 'symbolic', 'apps'))
+
install_data ('org.gnome.SimpleScan.gschema.xml',
install_dir: join_paths (datadir, 'glib-2.0', 'schemas'))
meson.add_install_script ('meson_compile_gschema.py')
diff --git a/data/simple-scan.desktop.in b/data/simple-scan.desktop.in
index 98deb0d..2e602af 100644
--- a/data/simple-scan.desktop.in
+++ b/data/simple-scan.desktop.in
@@ -6,7 +6,7 @@ Comment=Scan Documents
Keywords=scan;scanner;flatbed;adf;
Exec=simple-scan
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
-Icon=scanner
+Icon=org.gnome.SimpleScan
Terminal=false
Type=Application
StartupNotify=true
diff --git a/meson.build b/meson.build
index 3f86f5e..6743657 100644
--- a/meson.build
+++ b/meson.build
@@ -10,6 +10,8 @@ project ('simple-scan', ['vala', 'c'],
gnome = import ('gnome')
i18n = import ('i18n')
+app_id = 'org.gnome.SimpleScan'
+
# Paths
mandir = join_paths (get_option ('prefix'), get_option ('mandir'))
localedir = join_paths (get_option ('prefix'), get_option ('localedir'))
diff --git a/src/app-window.ui b/src/app-window.ui
index cc9775e..fbde173 100644
--- a/src/app-window.ui
+++ b/src/app-window.ui
@@ -179,7 +179,7 @@
</object>
<template class="AppWindow" parent="GtkApplicationWindow">
<property name="title" translatable="yes" comments="Title of scan window">Simple Scan</property>
- <property name="icon_name">scanner</property>
+ <property name="icon_name">org.gnome.SimpleScan</property>
<signal name="delete-event" handler="window_delete_event_cb" swapped="no"/>
<child>
<object class="GtkBox">
@@ -204,7 +204,7 @@
<property name="visible">True</property>
<property name="opacity">0.5</property>
<property name="pixel_size">120</property>
- <property name="icon_name">scanner-symbolic</property>
+ <property name="icon_name">org.gnome.SimpleScan-symbolic</property>
<property name="icon_size">6</property>
</object>
</child>
@@ -538,3 +538,4 @@
</child>
</object>
</interface>
+
diff --git a/src/app-window.vala b/src/app-window.vala
index b5106cc..efcaaf2 100644
--- a/src/app-window.vala
+++ b/src/app-window.vala
@@ -1266,7 +1266,7 @@ public class AppWindow : Gtk.ApplicationWindow
"program-name", _("Simple Scan"),
"version", VERSION,
"comments", description,
- "logo-icon-name", "scanner",
+ "logo-icon-name", "org.gnome.SimpleScan",
"authors", authors,
"translator-credits", _("translator-credits"),
"website", "https://gitlab.gnome.org/GNOME/simple-scan",
@@ -1510,7 +1510,7 @@ public class AppWindow : Gtk.ApplicationWindow
preferences_dialog.delete_event.connect (() => { return true; });
preferences_dialog.response.connect (() => { preferences_dialog.visible = false; });
- Gtk.Window.set_default_icon_name ("scanner");
+ Gtk.Window.set_default_icon_name ("org.gnome.SimpleScan");
var app = Application.get_default () as Gtk.Application;
diff --git a/src/preferences-dialog.ui b/src/preferences-dialog.ui
index 3b6f698..75d8a4c 100644
--- a/src/preferences-dialog.ui
+++ b/src/preferences-dialog.ui
@@ -51,7 +51,7 @@
<template class="PreferencesDialog" parent="GtkDialog">
<property name="title" translatable="yes" comments="Title of preferences dialog">Preferences</property>
<property name="resizable">False</property>
- <property name="icon_name">scanner</property>
+ <property name="icon_name">org.gnome.SimpleScan</property>
<property name="type_hint">normal</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox2">
@@ -482,3 +482,4 @@
</widgets>
</object>
</interface>
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]