]> git.scottworley.com Git - srec/commitdiff
Set application icon
authorScott Worley <scottworley@scottworley.com>
Wed, 1 Oct 2025 03:11:20 +0000 (20:11 -0700)
committerScott Worley <scottworley@scottworley.com>
Wed, 1 Oct 2025 03:11:20 +0000 (20:11 -0700)
default.nix
srec.dia
srec.png
srec.py
srec.svg [new file with mode: 0644]
srec48.png [new file with mode: 0644]

index 7e5736f9402f67fba8826e8cfd5c8c854a56db3f..6fef4371c6864c17881907af4401d65d7dcc5e6e 100644 (file)
@@ -18,7 +18,12 @@ pkgs.python3Packages.callPackage ({ autopep8, buildPythonPackage, ffmpeg-full
 
     postInstall = ''
       wrapProgram "$out/bin/srec" --prefix PATH : ${ffmpeg-full}/bin
-      cp -r $desktopItem/share $out
+
+      install -D ${./srec48.png} $out/share/icons/hicolor/48x48/apps/srec.png
+      install -D ${./srec.png} $out/share/icons/hicolor/256x256/apps/srec.png
+      install -D ${./srec.svg} $out/share/icons/hicolor/scalable/apps/srec.svg
+
+      cp -r $desktopItem/share/* $out/share
     '';
 
     desktopItem = makeDesktopItem {
index a34f970ac70f18977b6fd40229944313d6810a68..5e13d5041688c77b1380308d11908b2e4e99cd06 100644 (file)
Binary files a/srec.dia and b/srec.dia differ
index e8d8fe43ee4a0d34f6317f5441a22a2b1f28053e..19955fe4e8820afc8cd8d46460a89454434dd10c 100644 (file)
Binary files a/srec.png and b/srec.png differ
diff --git a/srec.py b/srec.py
index 4abe5817ac2be6826201dbfbddf0aab77c2c8ba4..1112eddf3a3434ba2e03f0933f7777df56222b29 100644 (file)
--- a/srec.py
+++ b/srec.py
@@ -78,6 +78,8 @@ def make_button(label: str, action: Callable[[
 def on_activate(app: Gtk.Application) -> None:
     win = Gtk.ApplicationWindow(application=app)
     win.set_title('SRec')
+    win.set_icon_name('srec')
+
     stack = Gtk.Stack()
 
     nr_box = Gtk.Box()
diff --git a/srec.svg b/srec.svg
new file mode 100644 (file)
index 0000000..7536f46
--- /dev/null
+++ b/srec.svg
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   width="301"
+   height="301"
+   viewBox="0 0 301 301"
+   version="1.1"
+   id="svg3"
+   sodipodi:docname="srec.svg"
+   inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:svg="http://www.w3.org/2000/svg">
+  <defs
+     id="defs3" />
+  <sodipodi:namedview
+     id="namedview3"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:showpageshadow="2"
+     inkscape:pageopacity="0.0"
+     inkscape:pagecheckerboard="0"
+     inkscape:deskcolor="#d1d1d1"
+     inkscape:zoom="1.7774086"
+     inkscape:cx="150.5"
+     inkscape:cy="141.49813"
+     inkscape:window-width="1366"
+     inkscape:window-height="699"
+     inkscape:window-x="0"
+     inkscape:window-y="32"
+     inkscape:window-maximized="1"
+     inkscape:current-layer="svg3" />
+  <path
+     fill-rule="evenodd"
+     fill="rgb(100%, 100%, 100%)"
+     fill-opacity="1"
+     stroke-width="1.2"
+     stroke-linecap="butt"
+     stroke-linejoin="round"
+     stroke="rgb(0%, 0%, 0%)"
+     stroke-opacity="1"
+     stroke-miterlimit="10"
+     d="M 3 3 C 1.895508 3 1 3.895508 1 5 L 1 10 C 1 11.104492 1.895508 12 3 12 L 12 12 C 13.104492 12 14 11.104492 14 10 L 14 5 C 14 3.895508 13.104492 3 12 3 Z M 3 3 "
+     transform="matrix(20, 0, 0, 20, 1, 1)"
+     id="path2" />
+  <path
+     fill-rule="evenodd"
+     fill="rgb(100%, 0%, 0%)"
+     fill-opacity="1"
+     stroke-width="0.05"
+     stroke-linecap="butt"
+     stroke-linejoin="round"
+     stroke="rgb(100%, 0%, 0%)"
+     stroke-opacity="1"
+     stroke-miterlimit="10"
+     d="M 10 7.5 C 10 8.880664 8.880664 10 7.5 10 C 6.119336 10 5 8.880664 5 7.5 C 5 6.119336 6.119336 5 7.5 5 C 8.880664 5 10 6.119336 10 7.5 "
+     transform="matrix(20, 0, 0, 20, 1, 1)"
+     id="path3" />
+</svg>
diff --git a/srec48.png b/srec48.png
new file mode 100644 (file)
index 0000000..85c60ea
Binary files /dev/null and b/srec48.png differ