Icons: brand blue (#6190E5) for in-app sonar logo and window/taskbar icon; recolor icon.png, ship as window icon

This commit is contained in:
avi 2026-09-21 15:45:12 -05:00
commit 758842ae2a
64 changed files with 22680 additions and 5 deletions

View file

@ -32,6 +32,8 @@ import androidx.compose.ui.input.key.type
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.dp
import androidx.compose.ui.graphics.painter.BitmapPainter
import androidx.compose.ui.graphics.toComposeImageBitmap
import androidx.compose.ui.window.Window
import androidx.compose.ui.window.application
import androidx.compose.ui.window.rememberWindowState
@ -82,8 +84,15 @@ fun main() = application {
mgr.addKeyEventDispatcher(disp)
onDispose { mgr.removeKeyEventDispatcher(disp) }
}
val frameIcon = object {}.javaClass.getResourceAsStream("/icon.png")?.use {
// Launcher/taskbar icon — brand blue ping, same as the in-app
// SonarLogo (icon.png shipped in resources).
BitmapPainter(org.jetbrains.skia.Image.makeFromEncoded(it.readBytes())
.toComposeImageBitmap())
}
Window(
onCloseRequest = ::exitApplication,
icon = frameIcon,
title = "SHONAR Desktop" + run {
// Build stamp so "which window is this?" is answerable at a glance.
val jar = java.io.File(

View file

@ -150,6 +150,11 @@ object Shonar {
val BrandTeal = Color(0xFF5EEAD4)
val BrandTealDeep = Color(0xFF4FD1C5)
/** Brand blue for the logo + launcher icon (same family as the
* theme accent; identical value in both themes). */
val BrandBlue = Color(0xFF6190E5)
val BrandBlueDeep = Color(0xFF2A63B4)
/** Pink-red recording highlight (see [ShonarPalette.highlight]). */
val Highlight: Color @Composable get() = LocalPalette.current.highlight
val HighlightTint: Color @Composable get() = LocalPalette.current.highlightTint
@ -324,14 +329,14 @@ fun ShonarTheme(
/**
* The SHONAR sonar-ping logo — same geometry as the brand's launcher
* ic_launcher_foreground.xml: a center dot with quarter arcs ringing out
* (teal upper-right, teal-dark lower-left), 108-unit viewport.
* (blue upper-right, blue-dark lower-left), 108-unit viewport.
*/
@Composable
fun SonarLogo(size: Dp = 32.dp, modifier: Modifier = Modifier) {
// Brand teal always — the logo keeps its identity in both themes;
// hoist reads out of the Canvas draw lambda.
val accent = Shonar.BrandTeal
val accentStrong = Shonar.BrandTealDeep
// Brand blue — same #6190E5 as the launcher icon and the theme's
// interactive accent, per the user's request (Sep 21).
val accent = Shonar.BrandBlue
val accentStrong = Shonar.BrandBlueDeep
Canvas(modifier = modifier.size(size)) {
val s = this.size.minDimension / 108f
fun c(x: Float, y: Float) = Offset(x * s, y * s)

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB