Corner logo snug in the bottom left (build 61)

Paul, 18 November 2026: "perhaps need to be more snug in bottom left". The logo now hugs the corner by its own left
edge at its own width (a short name like Orbit 1 no longer sits centred in a wide box), 24 dp in and 20 dp up; the
hourly animation lines up the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-18 10:10:48 +00:00
co-authored by Claude Opus 5.5
parent fb09b9a492
commit 85f662a80b
3 changed files with 18 additions and 5 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ plugins {
id("org.jetbrains.kotlin.plugin.compose")
}
/** The release's build number: versionCode is this x 10 plus the edition's channel. */
val ORBIT_BUILD = 60
val ORBIT_BUILD = 61
android {
namespace = "tv.orbit.classic"
compileSdk = 36
@@ -5,6 +5,7 @@ import androidx.compose.runtime.getValue
import androidx.compose.runtime.setValue
import androidx.compose.ui.unit.dp
import androidx.compose.ui.draw.alpha
import androidx.compose.foundation.layout.width
internal data class ChannelBranding(val presetId: String, val displayName: String, val logo: Int, val background: Int, val bug: Int, val category: ChannelCategory)
@@ -116,6 +117,13 @@ internal fun cornerAnimationDue(nowMs: Long, lastPlayedHour: Long): Boolean {
private object CornerAnimationClock { var lastPlayedHour = -1L }
/**
* The corner logo snug in the bottom left (Paul, 18 November 2026: "more snug in bottom left"), hugging the corner by its own
* left edge however wide the channel's name is, rather than centred in a fixed box.
*/
internal const val CORNER_LOGO_START_DP = 24
internal const val CORNER_LOGO_BOTTOM_DP = 20
/** How long the corner animation runs before the still logo takes over again. */
internal const val CORNER_ANIMATION_MS = 3_400L
@@ -141,13 +149,18 @@ internal fun CornerLogo(number: Int, still: Int, modifier: androidx.compose.ui.M
}
}
if (playing && animation != null && android.os.Build.VERSION.SDK_INT >= 28)
androidx.compose.ui.viewinterop.AndroidView(modifier = modifier.alpha(.85f), factory = { c ->
androidx.compose.ui.viewinterop.AndroidView(modifier = modifier.width(240.dp).alpha(.85f), factory = { c ->
android.widget.ImageView(c).apply {
scaleType = android.widget.ImageView.ScaleType.FIT_START
// Bottom-left, like the still: FIT_START would hang it from the top of its box.
scaleType = android.widget.ImageView.ScaleType.MATRIX
addOnLayoutChangeListener { v, _, _, _, _, _, _, _, _ -> (v as android.widget.ImageView).drawable?.let { d ->
val k = v.height.toFloat() / d.intrinsicHeight
v.imageMatrix = android.graphics.Matrix().apply { setScale(k, k) } } }
val drawable = android.graphics.ImageDecoder.decodeDrawable(android.graphics.ImageDecoder.createSource(c.resources, animation))
setImageDrawable(drawable)
(drawable as? android.graphics.drawable.AnimatedImageDrawable)?.apply { repeatCount = 0; start() }
}
})
else androidx.compose.foundation.Image(cachedPainter(still), null, modifier, alpha = .6f)
else androidx.compose.foundation.Image(cachedPainter(still), null, modifier, alignment = androidx.compose.ui.Alignment.BottomStart,
contentScale = androidx.compose.ui.layout.ContentScale.FillHeight, alpha = .6f)
}
@@ -615,7 +615,7 @@ internal fun EmbyPlaybackDialog(session: EmbySampleSession, plan: EmbyPlaybackPl
else if (bug != null && ready && !infoVisible && failure == null && squeeze == 0f)
// The brand kit's corner logo (17 November 2026): white at 60%, bottom left with a 72 px margin, nudged a few
// pixels every ten minutes so it never sits still long enough to mark an OLED or plasma screen.
CornerLogo(scheduled!!.channel.number, bug, Modifier.align(Alignment.BottomStart).cornerLogoNudge().padding(start = 36.dp, bottom = 36.dp).height(47.dp).width(122.dp))
CornerLogo(scheduled!!.channel.number, bug, Modifier.align(Alignment.BottomStart).cornerLogoNudge().padding(start = CORNER_LOGO_START_DP.dp, bottom = CORNER_LOGO_BOTTOM_DP.dp).height(44.dp))
// The bar and the subtitles and sound panel together (design/watching): the panel docks above the bar's right
// end, so it never hangs over it, and the bar stays while the panel is open.
val barUp = (infoVisible || trackMenu != null) && failure == null && ready && squeeze == 0f