From fed56c868f7732bcd45936bda225b9e6b4ab5b27 Mon Sep 17 00:00:00 2001 From: dluvian Date: Sun, 11 Feb 2024 18:10:20 +0800 Subject: [PATCH 1/3] Make dark mode darker --- app/src/main/java/com/dluvian/nozzle/ui/theme/Theme.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/com/dluvian/nozzle/ui/theme/Theme.kt b/app/src/main/java/com/dluvian/nozzle/ui/theme/Theme.kt index c88011cc..f10e0451 100644 --- a/app/src/main/java/com/dluvian/nozzle/ui/theme/Theme.kt +++ b/app/src/main/java/com/dluvian/nozzle/ui/theme/Theme.kt @@ -26,6 +26,9 @@ private val darkColorPalette = darkColorScheme( onSecondary = Color(0xFF4a2800), secondaryContainer = Color(0xFF693c00), onSecondaryContainer = Color(0xFFffdcbe), + background = Color.Black, + surface = Color.Black, + surfaceVariant = Color.Black, ) @Composable From 27cbfc5e42a64f9f568a9f9a669a5ac706b17ce0 Mon Sep 17 00:00:00 2001 From: dluvian Date: Sun, 11 Feb 2024 18:17:43 +0800 Subject: [PATCH 2/3] Use default colors for relays in RelayEditor --- .../nozzle/ui/app/views/relayEditor/RelayEditorScreen.kt | 2 -- .../dluvian/nozzle/ui/components/interactors/NamedCheckbox.kt | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/main/java/com/dluvian/nozzle/ui/app/views/relayEditor/RelayEditorScreen.kt b/app/src/main/java/com/dluvian/nozzle/ui/app/views/relayEditor/RelayEditorScreen.kt index a64446b2..a272cf70 100644 --- a/app/src/main/java/com/dluvian/nozzle/ui/app/views/relayEditor/RelayEditorScreen.kt +++ b/app/src/main/java/com/dluvian/nozzle/ui/app/views/relayEditor/RelayEditorScreen.kt @@ -22,7 +22,6 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.remember import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color.Companion.DarkGray import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextOverflow import com.dluvian.nozzle.R @@ -228,7 +227,6 @@ private fun RelayRow(relay: String, trailingContent: @Composable (() -> Unit)) { spacing = MarqueeSpacing.fractionOfContainer(1f / 4f) ), text = relay, - color = DarkGray, maxLines = 1, overflow = TextOverflow.Ellipsis ) diff --git a/app/src/main/java/com/dluvian/nozzle/ui/components/interactors/NamedCheckbox.kt b/app/src/main/java/com/dluvian/nozzle/ui/components/interactors/NamedCheckbox.kt index 522cd7be..fea1ba25 100644 --- a/app/src/main/java/com/dluvian/nozzle/ui/components/interactors/NamedCheckbox.kt +++ b/app/src/main/java/com/dluvian/nozzle/ui/components/interactors/NamedCheckbox.kt @@ -19,6 +19,6 @@ fun NamedCheckbox( onCheckedChange = { onClick() }, ) }, - name = name + name = name, ) } From 11bb416dac6cb4b1062c20af964cda27faf58c72 Mon Sep 17 00:00:00 2001 From: dluvian Date: Sun, 11 Feb 2024 18:22:57 +0800 Subject: [PATCH 3/3] Hide PostCardProfilePicture from talkback --- .../dluvian/nozzle/ui/components/postCard/PostCard.kt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/dluvian/nozzle/ui/components/postCard/PostCard.kt b/app/src/main/java/com/dluvian/nozzle/ui/components/postCard/PostCard.kt index c8e444d0..1b583744 100644 --- a/app/src/main/java/com/dluvian/nozzle/ui/components/postCard/PostCard.kt +++ b/app/src/main/java/com/dluvian/nozzle/ui/components/postCard/PostCard.kt @@ -11,12 +11,15 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width import androidx.compose.runtime.Composable +import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clipToBounds import androidx.compose.ui.draw.drawBehind import androidx.compose.ui.geometry.Offset import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.drawscope.DrawScope +import androidx.compose.ui.semantics.invisibleToUser +import androidx.compose.ui.semantics.semantics import com.dluvian.nozzle.model.PostWithMeta import com.dluvian.nozzle.model.ThreadPosition import com.dluvian.nozzle.model.TrustType @@ -29,7 +32,7 @@ import com.dluvian.nozzle.ui.theme.sizing import com.dluvian.nozzle.ui.theme.spacing -@OptIn(ExperimentalFoundationApi::class) +@OptIn(ExperimentalFoundationApi::class, ExperimentalComposeUiApi::class) @Composable fun PostCard( post: PostWithMeta, @@ -96,7 +99,9 @@ fun PostCard( .clipToBounds() ) { PostCardProfilePicture( - modifier = Modifier.size(sizing.profilePicture), + modifier = Modifier + .size(sizing.profilePicture) + .semantics { this.invisibleToUser() }, pubkey = post.pubkey, picture = post.picture, showProfilePicture = showProfilePicture,