Linux + iPhone Continuity / iMessage / SMS
fix: use official brand artwork for notifications
Artrixab518b91d56a
diff --git a/src/core/src/bluetooth/ancs/notifications.cpp b/src/core/src/bluetooth/ancs/notifications.cppindex 2054a57..b0a8ff0 100644--- a/src/core/src/bluetooth/ancs/notifications.cpp+++ b/src/core/src/bluetooth/ancs/notifications.cpp@@ -149,11 +149,11 @@ namespace tether::bluetooth::ancs {static const std::map<std::string, const char*> by_app_id{{"com.amazon.Amazon", "amazon"},{"com.apple.MobileAddressBook", "x-office-address-book"},- {"com.apple.MobileSMS", "imessage"},+ {"com.apple.MobileSMS", "internet-chat"},{"com.apple.Music", "multimedia-player"},{"com.apple.facetime", "camera-web"},{"com.apple.mobilecal", "office-calendar"},- {"com.apple.mobilemail", "mail"},+ {"com.apple.mobilemail", "mail-unread"},{"com.apple.mobilenotes", "accessories-text-editor"},{"com.apple.mobilephone", "call-start"},{"com.apple.mobileslideshow", "multimedia-photo-viewer"},diff --git a/src/gtk/icons/notifications/NOTICE.md b/src/gtk/icons/notifications/NOTICE.mdindex e496652..5dee237 100644--- a/src/gtk/icons/notifications/NOTICE.md+++ b/src/gtk/icons/notifications/NOTICE.md@@ -1,6 +1,30 @@-The brand glyphs in this directory are from [Simple Icons](https://github.com/simple-icons/simple-icons),-revision `dc7b10662a0a2cfdfc9305e2a2b06c023c30724a`, and are distributed under-[CC0 1.0](https://github.com/simple-icons/simple-icons/blob/dc7b10662a0a2cfdfc9305e2a2b06c023c30724a/LICENSE.md).-The Tether copies set fixed display colors and icon dimensions. The `mail`,-`outlook`, and `teams` SVGs are original Tether artwork. Product names and marks-remain the property of their respective owners.+# Notification icon sources++The brand marks below are exact SVGs from the pinned Simple Icons release. Simple Icons records the linked brand-owned source/guideline page for each mark; see its [contribution rules](https://github.com/simple-icons/simple-icons/blob/develop/CONTRIBUTING.md) and [disclaimer](https://github.com/simple-icons/simple-icons/blob/develop/DISCLAIMER.md). The Simple Icons SVG library is CC0 1.0; brand marks remain trademarks of their respective owners.++Pinned Simple Icons revision: `dc7b10662a0a2cfdfc9305e2a2b06c023c30724a`.++| Icon | Brand source / guidelines |+| --- | --- |+| Canvas | https://www.instructure.com/about/brand-guide/media-resources |+| Discord | https://discord.com/branding |+| Facebook | https://about.meta.com/brand/resources/facebook/logo |+| GitHub | https://github.com/logos |+| Gmail | https://fonts.gstatic.com/s/i/productlogos/gmail_2020q4/v8/192px.svg |+| Instagram | https://about.meta.com/brand/resources/instagram |+| Reddit | https://www.redditinc.com/brand |+| Signal | https://signal.org/brand |+| Snapchat | https://www.snapchat.com/brand-guidelines |+| Spotify | https://developer.spotify.com/documentation/general/design-and-branding/#using-our-logo |+| Telegram | https://telegram.org/tour/screenshots |+| TikTok | https://tiktok.com |+| WhatsApp | https://about.meta.com/brand/resources/whatsapp/whatsapp-brand |+| X | https://about.x.com/en/who-we-are/brand-toolkit |+| YouTube | https://www.youtube.com/howyoutubeworks/resources/brand-resources/#logos-icons-and-colors |++Microsoft Teams and Outlook use the unmodified Microsoft Fluent brand SVGs from the official Microsoft 365 CDN (`fabric-cdn-prod_20240411.001`):++- Teams: https://res-2-sdf.cdn.office.net/files/fabric-cdn-prod_20240411.001/assets/brand-icons/product/svg/teams_32x1.svg+- Outlook: https://res-2-sdf.cdn.office.net/files/fabric-cdn-prod_20240411.001/assets/brand-icons/product/svg/outlook_32x1.svg++The generic Mail and Messages app IDs use standard GTK icon-theme names instead of bundled brand art. Product names and marks remain the property of their respective owners.diff --git a/src/gtk/icons/notifications/imessage.svg b/src/gtk/icons/notifications/imessage.svgdeleted file mode 100644index 02ac21e..0000000--- a/src/gtk/icons/notifications/imessage.svg+++ /dev/null@@ -1 +0,0 @@-<svg width="48" height="48" fill="#34C759" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>iMessage</title><path d="M5.285 0A5.273 5.273 0 0 0 0 5.285v13.43A5.273 5.273 0 0 0 5.285 24h13.43A5.273 5.273 0 0 0 24 18.715V5.285A5.273 5.273 0 0 0 18.715 0ZM12 4.154a8.809 7.337 0 0 1 8.809 7.338A8.809 7.337 0 0 1 12 18.828a8.809 7.337 0 0 1-2.492-.303A8.656 7.337 0 0 1 5.93 19.93a9.929 7.337 0 0 0 1.54-2.155 8.809 7.337 0 0 1-4.279-6.283A8.809 7.337 0 0 1 12 4.154"/></svg>\ No newline at end of filediff --git a/src/gtk/icons/notifications/mail.svg b/src/gtk/icons/notifications/mail.svgdeleted file mode 100644index 3f07724..0000000--- a/src/gtk/icons/notifications/mail.svg+++ /dev/null@@ -1,5 +0,0 @@-<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">- <rect x="3" y="7" width="42" height="34" rx="7" fill="#1684F8"/>- <path d="M8 14 24 27 40 14" fill="none" stroke="#fff" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>- <path d="m8 36 12-11m20 11L28 25" fill="none" stroke="#fff" stroke-width="4" stroke-linecap="round"/>-</svg>diff --git a/src/gtk/icons/notifications/outlook.svg b/src/gtk/icons/notifications/outlook.svgindex 16e980b..0cc81fc 100644--- a/src/gtk/icons/notifications/outlook.svg+++ b/src/gtk/icons/notifications/outlook.svg@@ -1,6 +1 @@-<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">- <rect x="17" y="5" width="27" height="38" rx="5" fill="#0078D4"/>- <path d="m18 15 12 9 12-9" fill="none" stroke="#fff" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>- <rect x="4" y="12" width="22" height="24" rx="4" fill="#0A64AD"/>- <path d="M15 17c-4 0-7 3-7 7s3 7 7 7 7-3 7-7-3-7-7-7Zm0 4c2 0 3 1 3 3s-1 3-3 3-3-1-3-3 1-3 3-3Z" fill="#fff"/>-</svg>+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M27.666 4H11.334A1.325 1.325 0 0 0 10 5.316V7l9.206 3.625L29 7V5.316A1.325 1.325 0 0 0 27.666 4z" fill="#0364b8"/><path d="M29.694 17.288a9.984 9.984 0 0 0 .306-1.23.581.581 0 0 0-.292-.5l-.011-.006-9.486-6.343a1.451 1.451 0 0 0-.128-.072 1.309 1.309 0 0 0-1.166 0 1.433 1.433 0 0 0-.127.072l-9.483 6.336-.011.006a.583.583 0 0 0-.292.5 9.78 9.78 0 0 0 .307 1.23l10.055 7.354z" fill="#0a2767"/><path fill="#28a8ea" d="M19 7h-9v9l9 9h10v-9L19 7z"/><path fill="#50d9ff" d="M19 7h10v9H19z"/><path fill="#0078d4" d="M10 16h9v9h-9z"/><path d="M19.861 23.833L9.542 16.591l.432-.732s9.4 5.154 9.545 5.231a.484.484 0 0 0 .369-.01c.134-.073 9.362-5.372 9.362-5.372l.638.857z" fill="#0a2767" opacity=".5"/><path d="M21.6 26.352l7.893 1.4a1.29 1.29 0 0 0 .479-.787c.006-.012.024-.01.024-.031V16a.581.581 0 0 1-.077.288.607.607 0 0 1-.059.065.559.559 0 0 1-.143.144v.003l-.011.007-9.3 5.4a1.267 1.267 0 0 1-1.254.08z" fill="#1490df"/><path d="M20.551 21.818l-.171.1-.012.006-.1.059a1.676 1.676 0 0 1-1.2.054l3.193 4.282 7.088 1.543a1.264 1.264 0 0 0 .592-.717z" opacity=".1"/><path d="M9.29 16.506V16.5h-.008l-.025-.017A.563.563 0 0 1 9 16v10.714A1.264 1.264 0 0 0 10.244 28h18.521a1.2 1.2 0 0 0 .307-.043.527.527 0 0 0 .149-.051.12.12 0 0 0 .049-.017.854.854 0 0 0 .191-.112c.017-.008.025-.008.033-.026z" fill="#28a8ea"/><path d="M15.951 10H9v14h6.745A1.32 1.32 0 0 0 17 22.839V11a1.028 1.028 0 0 0-1.049-1z" opacity=".5"/><rect x="2" y="9" width="14" height="14" rx="1.167" fill="#0078d4"/><path d="M4.824 13.471a4.176 4.176 0 0 1 1.64-1.811 4.955 4.955 0 0 1 2.606-.653 4.61 4.61 0 0 1 2.411.619 4.136 4.136 0 0 1 1.6 1.731 5.583 5.583 0 0 1 .559 2.545 5.894 5.894 0 0 1-.576 2.664 4.229 4.229 0 0 1-1.643 1.791 4.8 4.8 0 0 1-2.5.636 4.716 4.716 0 0 1-2.464-.626 4.187 4.187 0 0 1-1.616-1.734 5.44 5.44 0 0 1-.566-2.515 6.057 6.057 0 0 1 .549-2.647zm1.748 4.253a2.715 2.715 0 0 0 .922 1.192 2.416 2.416 0 0 0 1.442.434 2.525 2.525 0 0 0 1.538-.448 2.594 2.594 0 0 0 .9-1.2 4.614 4.614 0 0 0 .286-1.663 5.071 5.071 0 0 0-.269-1.684 2.661 2.661 0 0 0-.866-1.239A2.383 2.383 0 0 0 9 12.65a2.489 2.489 0 0 0-1.475.438 2.725 2.725 0 0 0-.942 1.2 4.76 4.76 0 0 0-.007 3.434z" fill="#fff"/></svg>\ No newline at end of filediff --git a/src/gtk/icons/notifications/teams.svg b/src/gtk/icons/notifications/teams.svgindex d8cf211..1231134 100644--- a/src/gtk/icons/notifications/teams.svg+++ b/src/gtk/icons/notifications/teams.svg@@ -1,7 +1 @@-<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">- <rect x="18" y="13" width="27" height="28" rx="5" fill="#6264A7"/>- <circle cx="38" cy="9" r="5" fill="#8B8CC7"/>- <path d="M24 19h16v4h-6v14h-4V23h-6z" fill="#fff"/>- <circle cx="12" cy="12" r="7" fill="#8B8CC7"/>- <path d="M3 34c0-6 4-10 9-10s9 4 9 10v3H3z" fill="#464775"/>-</svg>+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M28.65 12h-6.788L21 13.1v7.263C21 22.37 23.015 24 25.5 24s4.5-1.63 4.5-3.641V13.1a1.242 1.242 0 0 0-1.35-1.1z" fill="#5059c9"/><circle cx="26" cy="8" r="3" fill="#5059c9"/><path d="M10 22.755v-9.617A1.138 1.138 0 0 1 11.138 12h10.724A1.138 1.138 0 0 1 23 13.138v9.617A6.245 6.245 0 0 1 16.755 29h-.51A6.245 6.245 0 0 1 10 22.755z" fill="#7b83eb"/><circle cx="17" cy="7" r="4" fill="#7b83eb"/><path d="M10.125 24h4.1C15.756 24 17 23.394 17 21.846V12h-5.846C10.517 12 10 14.517 10 15.154v7.6A6.222 6.222 0 0 0 10.125 24zm6.807-13.007A1.4 1.4 0 0 0 15.6 10h-1.22a3.958 3.958 0 0 0 2.552.993z" opacity=".5"/><rect x="2" y="9" width="14" height="14" rx="1.4" fill="#4b53bc"/><path d="M13.49 13.154h-3.111v7.778H8.823v-7.778H5.712V11.6h7.778z" fill="#fff"/></svg>\ No newline at end of filediff --git a/test/test_ancs_notifications.cpp b/test/test_ancs_notifications.cppindex 00504d9..7a7f1d5 100644--- a/test/test_ancs_notifications.cpp+++ b/test/test_ancs_notifications.cpp@@ -36,10 +36,10 @@ TEST(AncsIcons, PrefersTheAppOverItsCategory) {<< "the category icon stands in for themes without brand logos";}-TEST(AncsIcons, UsesBundledIconsForCommonNotificationApps) {+TEST(AncsIcons, UsesBrandAndThemeIconsForCommonNotificationApps) {const std::vector<std::pair<std::string, std::string>> expected{- {"com.apple.MobileSMS", "imessage"},- {"com.apple.mobilemail", "mail"},+ {"com.apple.MobileSMS", "internet-chat"},+ {"com.apple.mobilemail", "mail-unread"},{"com.burbn.instagram", "instagram"},{"com.github.stormbreaker.prod", "github"},{"com.google.Gmail", "gmail"},