fix: Stop overriding surface/onSurface in theme (#1605)

Fixes #1604
* Stop overriding surface/onSurface in theme

* Wrap preview in AppTheme to get a better representation of what it'll look like on-device
This commit is contained in:
Joshua Soberg
2025-02-22 15:06:56 -05:00
committed by GitHub
parent 8fee9dbc45
commit ef64df3515
3 changed files with 2 additions and 7 deletions

View File

@@ -69,6 +69,7 @@ import com.geeksville.mesh.navigation.Route
import com.geeksville.mesh.ui.components.PreferenceCategory
import com.geeksville.mesh.ui.radioconfig.components.EditDeviceProfileDialog
import com.geeksville.mesh.ui.radioconfig.components.PacketResponseStateDialog
import com.geeksville.mesh.ui.theme.AppTheme
private fun getNavRouteFrom(routeName: String): Route? {
return ConfigRoute.entries.find { it.name == routeName }?.route
@@ -332,7 +333,7 @@ private fun RadioConfigItemList(
@Preview(showBackground = true)
@Composable
private fun RadioSettingsScreenPreview() {
private fun RadioSettingsScreenPreview() = AppTheme {
RadioConfigItemList(
RadioConfigState(isLocal = true, connected = true)
)

View File

@@ -33,8 +33,6 @@ val LightGreen = Color(0xFFCFE8A9)
val LightRed = Color(0xFFFFB3B3)
val MeshtasticGreen = Color(0xFF67EA94)
val AlmostWhite = Color(0xB3FFFFFF)
val AlmostBlack = Color(0x8A000000)
val HyperlinkBlue = Color(0xFF43C3B0)
val Orange = Color(255, 153, 0)

View File

@@ -27,16 +27,12 @@ private val DarkColorPalette = darkColors(
primary = MeshtasticGreen,
primaryVariant = Purple700,
secondary = Teal200,
surface = AlmostBlack,
onSurface = AlmostWhite
)
private val LightColorPalette = lightColors(
primary = MeshtasticGreen,
primaryVariant = LightSkyBlue,
secondary = Teal200,
surface = AlmostWhite,
onSurface = AlmostBlack
/* Other default colors to override
background = Color.White,