mirror of
https://github.com/greenart7c3/Amber.git
synced 2026-10-05 10:58:23 +00:00
Fix white content on amber surfaces in dark theme
The dark palette left onPrimary/onPrimaryContainer/onSecondaryContainer at the darkColorScheme defaults (white) while mapping amber into the matching container roles, so dark theme rendered white text and icons on light-amber surfaces: the Edit Relays floating action button, the add-relay icon buttons, selected filter chips on the feedback screen, and other primary-container components. Set the on-colors to black in both palettes (amber is light in both), give the add-relay IconButtons an explicit theme-driven contentColor instead of the onSurface fallback, and drop the redundant hardcoded black icon tints.
This commit is contained in:
@@ -133,6 +133,7 @@ fun AuthWhitelistScreen(
|
||||
IconButton(
|
||||
colors = IconButtonDefaults.iconButtonColors().copy(
|
||||
containerColor = MaterialTheme.colorScheme.primary,
|
||||
contentColor = MaterialTheme.colorScheme.onPrimary,
|
||||
),
|
||||
onClick = { addEntry() },
|
||||
) {
|
||||
|
||||
@@ -195,6 +195,7 @@ fun DefaultProfileRelaysScreen(
|
||||
IconButton(
|
||||
colors = IconButtonDefaults.iconButtonColors().copy(
|
||||
containerColor = MaterialTheme.colorScheme.primary,
|
||||
contentColor = MaterialTheme.colorScheme.onPrimary,
|
||||
),
|
||||
onClick = {
|
||||
scope.launch(Dispatchers.IO) {
|
||||
|
||||
@@ -206,6 +206,7 @@ fun EditConfigurationScreen(
|
||||
IconButton(
|
||||
colors = IconButtonDefaults.iconButtonColors().copy(
|
||||
containerColor = MaterialTheme.colorScheme.primary,
|
||||
contentColor = MaterialTheme.colorScheme.onPrimary,
|
||||
),
|
||||
onClick = {
|
||||
scope.launch(Dispatchers.IO) {
|
||||
|
||||
@@ -35,7 +35,6 @@ import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.focus.FocusDirection
|
||||
import androidx.compose.ui.focus.FocusRequester
|
||||
import androidx.compose.ui.focus.focusRequester
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.platform.ClipEntry
|
||||
import androidx.compose.ui.platform.LocalClipboard
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
@@ -197,6 +196,7 @@ fun NewNsecBunkerScreen(
|
||||
IconButton(
|
||||
colors = IconButtonDefaults.iconButtonColors().copy(
|
||||
containerColor = MaterialTheme.colorScheme.primary,
|
||||
contentColor = MaterialTheme.colorScheme.onPrimary,
|
||||
),
|
||||
onClick = {
|
||||
scope.launch(Dispatchers.IO) {
|
||||
@@ -216,7 +216,6 @@ fun NewNsecBunkerScreen(
|
||||
Icon(
|
||||
Icons.Default.Add,
|
||||
null,
|
||||
tint = Color.Black,
|
||||
)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -241,6 +241,7 @@ fun DefaultRelaysScreen(
|
||||
IconButton(
|
||||
colors = IconButtonDefaults.iconButtonColors().copy(
|
||||
containerColor = MaterialTheme.colorScheme.primary,
|
||||
contentColor = MaterialTheme.colorScheme.onPrimary,
|
||||
),
|
||||
onClick = {
|
||||
scope.launch(Dispatchers.IO) {
|
||||
|
||||
@@ -10,7 +10,6 @@ import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.res.vectorResource
|
||||
@@ -44,7 +43,6 @@ fun AmberFloatingButton(
|
||||
Icon(
|
||||
ImageVector.vectorResource(R.drawable.settings),
|
||||
contentDescription = stringResource(R.string.edit_relays),
|
||||
tint = Color.Black,
|
||||
)
|
||||
},
|
||||
modifier = Modifier
|
||||
|
||||
@@ -11,7 +11,6 @@ import androidx.compose.material3.Icon
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.greenart7c3.nostrsigner.R
|
||||
@@ -40,7 +39,6 @@ fun NewBunkerFloatingButton(
|
||||
Icon(
|
||||
Icons.Default.Add,
|
||||
contentDescription = stringResource(R.string.connect_app),
|
||||
tint = Color.Black,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,16 +41,19 @@ val orange = Color(0xFFFF6B00)
|
||||
private val DarkColorPalette =
|
||||
darkColorScheme(
|
||||
primary = primaryColor,
|
||||
onPrimary = Color.White,
|
||||
onPrimary = Color.Black,
|
||||
secondary = primaryVariant,
|
||||
tertiary = secondaryColor,
|
||||
primaryContainer = secondaryColor,
|
||||
onPrimaryContainer = Color.Black,
|
||||
secondaryContainer = secondaryColor,
|
||||
onSecondaryContainer = Color.Black,
|
||||
)
|
||||
|
||||
private val LightColorPalette =
|
||||
lightColorScheme(
|
||||
primary = primaryColor,
|
||||
onPrimary = Color.Black,
|
||||
secondary = primaryVariant,
|
||||
tertiary = secondaryColor,
|
||||
primaryContainer = secondaryColor,
|
||||
|
||||
Reference in New Issue
Block a user