Rebrand the TV app as Wolfskin

This commit is contained in:
justinzeus 2026-10-22 15:05:37 +02:00
parent 7d6f041b55
commit e499c3f118
58 changed files with 230 additions and 93 deletions

View file

@ -63,7 +63,7 @@ import com.github.damontecres.wholphin.ui.nav.Destination
import com.github.damontecres.wholphin.ui.playback.PlayExternalViewModel
import com.github.damontecres.wholphin.ui.showToast
import com.github.damontecres.wholphin.ui.theme.WholphinTheme
import com.github.damontecres.wholphin.ui.theme.colors.PurpleThemeColors
import com.github.damontecres.wholphin.ui.theme.colors.WolfskinThemeColors
import com.github.damontecres.wholphin.ui.util.ProvideLocalClock
import com.github.damontecres.wholphin.util.DebugLogTree
import com.github.damontecres.wholphin.util.ExceptionHandler
@ -230,7 +230,7 @@ class MainActivity : AppCompatActivity() {
viewModel.appStart(intent)
setContent {
MaterialTheme(colorScheme = PurpleThemeColors.darkScheme) {
MaterialTheme(colorScheme = WolfskinThemeColors.darkScheme) {
Surface(Modifier.fillMaxSize()) {
val userPreferences by userPreferencesService.flow.collectAsState(null)
if (userPreferences == null) {

View file

@ -506,7 +506,7 @@ sealed interface AppPreference<Pref, T> {
val ThemeColors =
AppChoicePreference<AppPreferences, AppThemeColors>(
title = R.string.app_theme,
defaultValue = AppThemeColors.PURPLE,
defaultValue = AppThemeColors.WOLFSKIN,
getter = { it.interfacePreferences.appThemeColors },
setter = { prefs, value ->
prefs.updateInterfacePreferences { appThemeColors = value }

View file

@ -271,6 +271,9 @@ fun PreferencesContent(
.fillMaxWidth()
.padding(top = 8.dp, bottom = 4.dp),
)
if (group.title == R.string.about) {
WolfskinAbout()
}
}
val groupPreferences =
group.preferences +

View file

@ -0,0 +1,28 @@
package com.github.damontecres.wholphin.ui.preferences
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.LocalUriHandler
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import androidx.tv.material3.MaterialTheme
import androidx.tv.material3.Text
import com.github.damontecres.wholphin.R
import com.github.damontecres.wholphin.ui.components.TextButton
/** Fork identity and a focusable link to the upstream project. */
@Composable
fun WolfskinAbout() {
val uriHandler = LocalUriHandler.current
val upstreamUrl = stringResource(R.string.wolfskin_upstream_url)
Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {
Text(
text = stringResource(R.string.app_name_long),
style = MaterialTheme.typography.headlineMedium,
)
TextButton(onClick = { uriHandler.openUri(upstreamUrl) }) {
Text(stringResource(R.string.wolfskin_upstream_credit))
}
}
}

View file

@ -13,9 +13,10 @@ import com.github.damontecres.wholphin.ui.theme.colors.OledThemeColors
import com.github.damontecres.wholphin.ui.theme.colors.OrangeThemeColors
import com.github.damontecres.wholphin.ui.theme.colors.PurpleThemeColors
import com.github.damontecres.wholphin.ui.theme.colors.RedThemeColors
import com.github.damontecres.wholphin.ui.theme.colors.WolfskinThemeColors
val LocalTheme =
compositionLocalOf<AppThemeColors> { AppThemeColors.PURPLE }
compositionLocalOf<AppThemeColors> { AppThemeColors.WOLFSKIN }
fun getThemeColors(appThemeColors: AppThemeColors): ThemeColors =
when (appThemeColors) {
@ -27,13 +28,14 @@ fun getThemeColors(appThemeColors: AppThemeColors): ThemeColors =
AppThemeColors.BOLD_BLUE -> BoldBlueThemeColors
AppThemeColors.RED -> RedThemeColors
AppThemeColors.BROWN -> BrownThemeColors
AppThemeColors.UNRECOGNIZED -> PurpleThemeColors
AppThemeColors.WOLFSKIN -> WolfskinThemeColors
AppThemeColors.UNRECOGNIZED -> WolfskinThemeColors
}
@Composable
fun WholphinTheme(
darkTheme: Boolean = true,
appThemeColors: AppThemeColors = AppThemeColors.PURPLE,
appThemeColors: AppThemeColors = AppThemeColors.WOLFSKIN,
content: @Composable () -> Unit,
) {
val themeColors = getThemeColors(appThemeColors)

View file

@ -0,0 +1,59 @@
package com.github.damontecres.wholphin.ui.theme.colors
import androidx.compose.ui.graphics.Color
import com.github.damontecres.wholphin.ui.theme.ThemeColors
/** Lilac accents on near-black surfaces, with upstream Purple available separately. */
val WolfskinThemeColors =
object : ThemeColors {
private val background = Color(0xFF07070A)
private val lilac = Color(0xFFD2BCFF)
private val onLilac = Color(0xFF241334)
private val container = Color(0xFF382A49)
private val onContainer = Color(0xFFEADCFF)
private val surfaceVariant = Color(0xFF24202D)
override val lightSchemeMaterial = PurpleThemeColors.lightSchemeMaterial
override val lightScheme = PurpleThemeColors.lightScheme
override val darkSchemeMaterial =
PurpleThemeColors.darkSchemeMaterial.copy(
primary = lilac,
onPrimary = onLilac,
primaryContainer = container,
onPrimaryContainer = onContainer,
secondary = lilac,
onSecondary = onLilac,
secondaryContainer = container,
onSecondaryContainer = onContainer,
tertiary = lilac,
onTertiary = onLilac,
tertiaryContainer = container,
onTertiaryContainer = onContainer,
background = background,
surface = background,
surfaceVariant = surfaceVariant,
inversePrimary = Color(0xFF705090),
)
override val darkScheme =
PurpleThemeColors.darkScheme.copy(
primary = lilac,
onPrimary = onLilac,
primaryContainer = container,
onPrimaryContainer = onContainer,
secondary = lilac,
onSecondary = onLilac,
secondaryContainer = container,
onSecondaryContainer = onContainer,
tertiary = lilac,
onTertiary = onLilac,
tertiaryContainer = container,
onTertiaryContainer = onContainer,
background = background,
surface = background,
surfaceVariant = surfaceVariant,
inversePrimary = Color(0xFF705090),
border = lilac.copy(alpha = .75f),
)
}