mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:55:41 +00:00
Introduce "Black" theme and refactor theme handling
* Add `Theme.Black` to the `Theme` enum and update `isDark()` to include it. * Refactor `ElementTheme` to accept a `Theme` object instead of a `darkTheme` boolean, allowing for more specific color mapping (e.g., setting `bgCanvasDefault` to `Color.Black` for the Black theme). * Update `AdvancedSettingsPresenter` and `AdvancedSettingsState` to include "Black" as a user-selectable theme option. * Adjust `ElementThemeApp` and `MaterialTextPreview` to handle the expanded theme selection. * Add `ElementPreviewBlack` and update existing preview components to support the new theme. * Update Konsist tests to ensure `@PreviewsDayNight` annotated functions don't have "BlackPreview" suffix.
This commit is contained in:
+2
-1
@@ -26,6 +26,7 @@ import androidx.compose.ui.semantics.Role
|
||||
import androidx.compose.ui.tooling.preview.PreviewParameter
|
||||
import androidx.compose.ui.unit.dp
|
||||
import io.element.android.compound.theme.ElementTheme
|
||||
import io.element.android.compound.theme.Theme
|
||||
import io.element.android.features.messages.impl.timeline.components.event.TimelineItemAspectRatioBox
|
||||
import io.element.android.libraries.designsystem.components.blurhash.blurHashBackground
|
||||
import io.element.android.libraries.designsystem.preview.ElementPreview
|
||||
@@ -49,7 +50,7 @@ fun ProtectedView(
|
||||
.background(Color(0x99000000)),
|
||||
contentAlignment = Alignment.Center,
|
||||
) {
|
||||
ElementTheme(darkTheme = false, applySystemBarsUpdate = false) {
|
||||
ElementTheme(theme = Theme.Light, applySystemBarsUpdate = false) {
|
||||
// Not using a button to be able to have correct size
|
||||
Text(
|
||||
modifier = Modifier
|
||||
|
||||
Reference in New Issue
Block a user