From f3d68cfdd48e1a6ea8633e22e86bb479510e5209 Mon Sep 17 00:00:00 2001 From: Martino Ferrari Date: Sun, 4 Oct 2026 20:27:07 +0200 Subject: [PATCH] feat: an app icon in colour and symbolic form, validated at build time Both are drawn to the GNOME HIG: a 128px instrument face that leaves its margins, carries one 4px front profile for depth and no gradients or shadows, and a 16px symbolic reduction of the same metaphor in fills only. The colour icon strokes its sine because it is never recoloured; the symbolic one cannot. Every file in the manifest now preprocesses through xmllint, because a malformed SVG is the one icon failure no runtime check can see: librsvg refuses the file while the name still resolves, so the icon draws nothing and has_icon() says it is fine. --- CMakeLists.txt | 5 ++- .../apps/org.udpscope.app-symbolic.svg | 24 ++++++++++++ src/icons/scalable/apps/org.udpscope.app.svg | 39 +++++++++++++++++++ src/icons/udpscope.gresource.xml | 26 +++++++++---- 4 files changed, 84 insertions(+), 10 deletions(-) create mode 100644 src/icons/scalable/apps/org.udpscope.app-symbolic.svg create mode 100644 src/icons/scalable/apps/org.udpscope.app.svg diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b43668..ed3aae7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,7 +39,7 @@ if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang") target_compile_options(udpsclient PRIVATE -Wall -Wextra) endif() -# --- icons: four symbolic SVGs compiled into the binary ----------------------- +# --- icons: six SVGs compiled into the binary -------------------------------- # There is no stock icon for an oscilloscope trigger, a pair of cursors or a measurement # ruler, so this app draws its own. They go in a GResource rather than beside the binary # because udpscope is run straight out of the build tree and has no install step: a @@ -48,7 +48,8 @@ endif() find_program(GLIB_COMPILE_RESOURCES NAMES glib-compile-resources REQUIRED) set(UDPSCOPE_ICON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/icons) file(GLOB UDPSCOPE_ICON_FILES CONFIGURE_DEPENDS - ${UDPSCOPE_ICON_DIR}/scalable/actions/*.svg) + ${UDPSCOPE_ICON_DIR}/scalable/actions/*.svg + ${UDPSCOPE_ICON_DIR}/scalable/apps/*.svg) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/udpscope_resources.c COMMAND ${GLIB_COMPILE_RESOURCES} diff --git a/src/icons/scalable/apps/org.udpscope.app-symbolic.svg b/src/icons/scalable/apps/org.udpscope.app-symbolic.svg new file mode 100644 index 0000000..14c6abd --- /dev/null +++ b/src/icons/scalable/apps/org.udpscope.app-symbolic.svg @@ -0,0 +1,24 @@ + + + + + + + diff --git a/src/icons/scalable/apps/org.udpscope.app.svg b/src/icons/scalable/apps/org.udpscope.app.svg new file mode 100644 index 0000000..cccbacb --- /dev/null +++ b/src/icons/scalable/apps/org.udpscope.app.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + diff --git a/src/icons/udpscope.gresource.xml b/src/icons/udpscope.gresource.xml index 455e1d1..0a0a3e5 100644 --- a/src/icons/udpscope.gresource.xml +++ b/src/icons/udpscope.gresource.xml @@ -2,16 +2,26 @@ - scalable/actions/udpscope-trigger-symbolic.svg - scalable/actions/udpscope-cursors-symbolic.svg - scalable/actions/udpscope-measure-symbolic.svg - scalable/actions/udpscope-math-symbolic.svg + scalable/actions/udpscope-trigger-symbolic.svg + scalable/actions/udpscope-cursors-symbolic.svg + scalable/actions/udpscope-measure-symbolic.svg + scalable/actions/udpscope-math-symbolic.svg + scalable/apps/org.udpscope.app.svg + scalable/apps/org.udpscope.app-symbolic.svg