Use ElementTheme instead of MaterialTheme
This commit is contained in:
parent
484ecb5f6c
commit
0d6d74512f
59 changed files with 156 additions and 187 deletions
|
|
@ -14,7 +14,6 @@ import androidx.activity.enableEdgeToEdge
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.CompositionLocalProvider
|
import androidx.compose.runtime.CompositionLocalProvider
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
|
@ -26,6 +25,7 @@ import androidx.lifecycle.repeatOnLifecycle
|
||||||
import com.bumble.appyx.core.integration.NodeHost
|
import com.bumble.appyx.core.integration.NodeHost
|
||||||
import com.bumble.appyx.core.integrationpoint.NodeActivity
|
import com.bumble.appyx.core.integrationpoint.NodeActivity
|
||||||
import com.bumble.appyx.core.plugin.NodeReadyObserver
|
import com.bumble.appyx.core.plugin.NodeReadyObserver
|
||||||
|
import io.element.android.compound.theme.ElementTheme
|
||||||
import io.element.android.features.lockscreen.api.LockScreenEntryPoint
|
import io.element.android.features.lockscreen.api.LockScreenEntryPoint
|
||||||
import io.element.android.features.lockscreen.api.LockScreenLockState
|
import io.element.android.features.lockscreen.api.LockScreenLockState
|
||||||
import io.element.android.features.lockscreen.api.LockScreenService
|
import io.element.android.features.lockscreen.api.LockScreenService
|
||||||
|
|
@ -73,7 +73,7 @@ class MainActivity : NodeActivity() {
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.background(MaterialTheme.colorScheme.background),
|
.background(ElementTheme.colors.bgCanvasDefault),
|
||||||
) {
|
) {
|
||||||
if (migrationState.migrationAction.isSuccess()) {
|
if (migrationState.migrationAction.isSuccess()) {
|
||||||
MainNodeHost()
|
MainNodeHost()
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.imePadding
|
import androidx.compose.foundation.layout.imePadding
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.systemBarsPadding
|
import androidx.compose.foundation.layout.systemBarsPadding
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.BiasAlignment
|
import androidx.compose.ui.BiasAlignment
|
||||||
|
|
@ -111,7 +110,7 @@ private fun AnalyticsOptInHeader(
|
||||||
.padding(8.dp),
|
.padding(8.dp),
|
||||||
style = ElementTheme.typography.fontBodyMdRegular
|
style = ElementTheme.typography.fontBodyMdRegular
|
||||||
.copy(
|
.copy(
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
|
@ -211,7 +210,7 @@ private fun CreateRoomActionButton(
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
modifier = Modifier.size(24.dp),
|
modifier = Modifier.size(24.dp),
|
||||||
tint = MaterialTheme.colorScheme.secondary,
|
tint = ElementTheme.colors.iconSecondary,
|
||||||
resourceId = iconRes,
|
resourceId = iconRes,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ import androidx.compose.foundation.rememberScrollState
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.foundation.verticalScroll
|
import androidx.compose.foundation.verticalScroll
|
||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
|
@ -308,7 +307,7 @@ private fun JoinRoomContent(
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(id = CommonStrings.error_unknown),
|
text = stringResource(id = CommonStrings.error_unknown),
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
color = MaterialTheme.colorScheme.error,
|
color = ElementTheme.colors.textCriticalPrimary,
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
@ -380,13 +379,13 @@ private fun DefaultLoadedContent(
|
||||||
text = stringResource(R.string.screen_join_room_space_not_supported_title),
|
text = stringResource(R.string.screen_join_room_space_not_supported_title),
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
style = ElementTheme.typography.fontBodyLgMedium,
|
style = ElementTheme.typography.fontBodyLgMedium,
|
||||||
color = MaterialTheme.colorScheme.primary,
|
color = ElementTheme.colors.textPrimary,
|
||||||
)
|
)
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.screen_join_room_space_not_supported_description, applicationName),
|
text = stringResource(R.string.screen_join_room_space_not_supported_description, applicationName),
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
style = ElementTheme.typography.fontBodyMdRegular,
|
style = ElementTheme.typography.fontBodyMdRegular,
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
)
|
)
|
||||||
} else if (contentState.joinAuthorisationStatus is JoinAuthorisationStatus.CanKnock) {
|
} else if (contentState.joinAuthorisationStatus is JoinAuthorisationStatus.CanKnock) {
|
||||||
Spacer(modifier = Modifier.height(24.dp))
|
Spacer(modifier = Modifier.height(24.dp))
|
||||||
|
|
|
||||||
|
|
@ -128,14 +128,14 @@ private fun KnockRequestsBannerContent(
|
||||||
Text(
|
Text(
|
||||||
text = state.formattedTitle(),
|
text = state.formattedTitle(),
|
||||||
style = ElementTheme.typography.fontBodyMdMedium,
|
style = ElementTheme.typography.fontBodyMdMedium,
|
||||||
color = MaterialTheme.colorScheme.primary,
|
color = ElementTheme.colors.textPrimary,
|
||||||
textAlign = TextAlign.Start,
|
textAlign = TextAlign.Start,
|
||||||
)
|
)
|
||||||
if (state.subtitle != null) {
|
if (state.subtitle != null) {
|
||||||
Text(
|
Text(
|
||||||
text = state.subtitle,
|
text = state.subtitle,
|
||||||
style = ElementTheme.typography.fontBodySmRegular,
|
style = ElementTheme.typography.fontBodySmRegular,
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
textAlign = TextAlign.Start,
|
textAlign = TextAlign.Start,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@ import androidx.compose.foundation.layout.width
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.itemsIndexed
|
import androidx.compose.foundation.lazy.itemsIndexed
|
||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.getValue
|
import androidx.compose.runtime.getValue
|
||||||
import androidx.compose.runtime.mutableIntStateOf
|
import androidx.compose.runtime.mutableIntStateOf
|
||||||
|
|
@ -331,7 +330,7 @@ private fun KnockRequestItem(
|
||||||
text = knockRequest.getBestName(),
|
text = knockRequest.getBestName(),
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
color = MaterialTheme.colorScheme.primary,
|
color = ElementTheme.colors.textPrimary,
|
||||||
style = ElementTheme.typography.fontBodyLgMedium,
|
style = ElementTheme.typography.fontBodyLgMedium,
|
||||||
)
|
)
|
||||||
val formattedDate = knockRequest.formattedDate
|
val formattedDate = knockRequest.formattedDate
|
||||||
|
|
@ -339,7 +338,7 @@ private fun KnockRequestItem(
|
||||||
Spacer(modifier = Modifier.width(8.dp))
|
Spacer(modifier = Modifier.width(8.dp))
|
||||||
Text(
|
Text(
|
||||||
text = formattedDate,
|
text = formattedDate,
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
style = ElementTheme.typography.fontBodySmRegular,
|
style = ElementTheme.typography.fontBodySmRegular,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
@ -348,7 +347,7 @@ private fun KnockRequestItem(
|
||||||
if (!knockRequest.displayName.isNullOrEmpty()) {
|
if (!knockRequest.displayName.isNullOrEmpty()) {
|
||||||
Text(
|
Text(
|
||||||
text = knockRequest.userId.value,
|
text = knockRequest.userId.value,
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
style = ElementTheme.typography.fontBodyMdRegular,
|
style = ElementTheme.typography.fontBodyMdRegular,
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@ import androidx.compose.foundation.layout.systemBarsPadding
|
||||||
import androidx.compose.foundation.shape.CircleShape
|
import androidx.compose.foundation.shape.CircleShape
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.Lock
|
import androidx.compose.material.icons.filled.Lock
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.LaunchedEffect
|
import androidx.compose.runtime.LaunchedEffect
|
||||||
import androidx.compose.runtime.getValue
|
import androidx.compose.runtime.getValue
|
||||||
|
|
@ -316,7 +315,7 @@ private fun PinUnlockHeader(
|
||||||
.fillMaxWidth(),
|
.fillMaxWidth(),
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
style = ElementTheme.typography.fontHeadingMdBold,
|
style = ElementTheme.typography.fontHeadingMdBold,
|
||||||
color = MaterialTheme.colorScheme.primary,
|
color = ElementTheme.colors.textPrimary,
|
||||||
)
|
)
|
||||||
Spacer(Modifier.height(8.dp))
|
Spacer(Modifier.height(8.dp))
|
||||||
val remainingAttempts = state.remainingAttempts.dataOrNull()
|
val remainingAttempts = state.remainingAttempts.dataOrNull()
|
||||||
|
|
@ -330,9 +329,9 @@ private fun PinUnlockHeader(
|
||||||
""
|
""
|
||||||
}
|
}
|
||||||
val subtitleColor = if (state.showWrongPinTitle) {
|
val subtitleColor = if (state.showWrongPinTitle) {
|
||||||
MaterialTheme.colorScheme.error
|
ElementTheme.colors.textCriticalPrimary
|
||||||
} else {
|
} else {
|
||||||
MaterialTheme.colorScheme.secondary
|
ElementTheme.colors.textSecondary
|
||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
text = subtitle,
|
text = subtitle,
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.heightIn
|
import androidx.compose.foundation.layout.heightIn
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
|
@ -68,7 +67,7 @@ fun AccountProviderView(
|
||||||
RoundedIconAtom(
|
RoundedIconAtom(
|
||||||
size = RoundedIconAtomSize.Medium,
|
size = RoundedIconAtomSize.Medium,
|
||||||
imageVector = CompoundIcons.Search(),
|
imageVector = CompoundIcons.Search(),
|
||||||
tint = MaterialTheme.colorScheme.primary,
|
tint = ElementTheme.colors.iconPrimary,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
|
|
@ -77,7 +76,7 @@ fun AccountProviderView(
|
||||||
.weight(1f),
|
.weight(1f),
|
||||||
text = item.title,
|
text = item.title,
|
||||||
style = ElementTheme.typography.fontBodyLgMedium,
|
style = ElementTheme.typography.fontBodyLgMedium,
|
||||||
color = MaterialTheme.colorScheme.primary,
|
color = ElementTheme.colors.textPrimary,
|
||||||
)
|
)
|
||||||
if (item.isPublic) {
|
if (item.isPublic) {
|
||||||
Icon(
|
Icon(
|
||||||
|
|
@ -96,7 +95,7 @@ fun AccountProviderView(
|
||||||
.padding(start = 46.dp, bottom = 12.dp, end = 26.dp),
|
.padding(start = 46.dp, bottom = 12.dp, end = 26.dp),
|
||||||
text = item.subtitle,
|
text = item.subtitle,
|
||||||
style = ElementTheme.typography.fontBodyMdRegular,
|
style = ElementTheme.typography.fontBodyMdRegular,
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.foundation.layout.width
|
import androidx.compose.foundation.layout.width
|
||||||
import androidx.compose.foundation.progressSemantics
|
import androidx.compose.foundation.progressSemantics
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.LaunchedEffect
|
import androidx.compose.runtime.LaunchedEffect
|
||||||
import androidx.compose.runtime.getValue
|
import androidx.compose.runtime.getValue
|
||||||
|
|
@ -138,7 +137,7 @@ private fun ColumnScope.Buttons(
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = CompoundIcons.Error(),
|
imageVector = CompoundIcons.Error(),
|
||||||
tint = MaterialTheme.colorScheme.error,
|
tint = ElementTheme.colors.iconCriticalPrimary,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
modifier = Modifier.size(24.dp)
|
modifier = Modifier.size(24.dp)
|
||||||
)
|
)
|
||||||
|
|
@ -151,7 +150,7 @@ private fun ColumnScope.Buttons(
|
||||||
else -> stringResource(R.string.screen_qr_code_login_invalid_scan_state_subtitle)
|
else -> stringResource(R.string.screen_qr_code_login_invalid_scan_state_subtitle)
|
||||||
},
|
},
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
color = MaterialTheme.colorScheme.error,
|
color = ElementTheme.colors.textCriticalPrimary,
|
||||||
style = ElementTheme.typography.fontBodySmMedium,
|
style = ElementTheme.typography.fontBodySmMedium,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -196,8 +196,8 @@ fun MessagesView(
|
||||||
MessagesViewContent(
|
MessagesViewContent(
|
||||||
state = state,
|
state = state,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(padding)
|
.padding(padding)
|
||||||
.consumeWindowInsets(padding),
|
.consumeWindowInsets(padding),
|
||||||
onContentClick = ::onContentClick,
|
onContentClick = ::onContentClick,
|
||||||
onMessageLongClick = ::onMessageLongClick,
|
onMessageLongClick = ::onMessageLongClick,
|
||||||
onUserDataClick = { hidingKeyboard { onUserDataClick(it) } },
|
onUserDataClick = { hidingKeyboard { onUserDataClick(it) } },
|
||||||
|
|
@ -290,9 +290,9 @@ private fun MessagesViewContent(
|
||||||
) {
|
) {
|
||||||
Box(
|
Box(
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.navigationBarsPadding()
|
.navigationBarsPadding()
|
||||||
.imePadding(),
|
.imePadding(),
|
||||||
) {
|
) {
|
||||||
AttachmentsBottomSheet(
|
AttachmentsBottomSheet(
|
||||||
state = state.composerState,
|
state = state.composerState,
|
||||||
|
|
@ -402,13 +402,13 @@ private fun MessagesViewComposerBottomSheetContents(
|
||||||
Column(modifier = Modifier.fillMaxWidth()) {
|
Column(modifier = Modifier.fillMaxWidth()) {
|
||||||
SuggestionsPickerView(
|
SuggestionsPickerView(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.heightIn(max = 230.dp)
|
.heightIn(max = 230.dp)
|
||||||
// Consume all scrolling, preventing the bottom sheet from being dragged when interacting with the list of suggestions
|
// Consume all scrolling, preventing the bottom sheet from being dragged when interacting with the list of suggestions
|
||||||
.nestedScroll(object : NestedScrollConnection {
|
.nestedScroll(object : NestedScrollConnection {
|
||||||
override fun onPostScroll(consumed: Offset, available: Offset, source: NestedScrollSource): Offset {
|
override fun onPostScroll(consumed: Offset, available: Offset, source: NestedScrollSource): Offset {
|
||||||
return available
|
return available
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
roomId = state.roomId,
|
roomId = state.roomId,
|
||||||
roomName = state.roomName.dataOrNull(),
|
roomName = state.roomName.dataOrNull(),
|
||||||
roomAvatarData = state.roomAvatar.dataOrNull(),
|
roomAvatarData = state.roomAvatar.dataOrNull(),
|
||||||
|
|
@ -456,8 +456,8 @@ private fun MessagesViewTopBar(
|
||||||
title = {
|
title = {
|
||||||
val roundedCornerShape = RoundedCornerShape(8.dp)
|
val roundedCornerShape = RoundedCornerShape(8.dp)
|
||||||
val titleModifier = Modifier
|
val titleModifier = Modifier
|
||||||
.clip(roundedCornerShape)
|
.clip(roundedCornerShape)
|
||||||
.clickable { onRoomDetailsClick() }
|
.clickable { onRoomDetailsClick() }
|
||||||
if (roomName != null && roomAvatar != null) {
|
if (roomName != null && roomAvatar != null) {
|
||||||
RoomAvatarAndNameRow(
|
RoomAvatarAndNameRow(
|
||||||
roomName = roomName,
|
roomName = roomName,
|
||||||
|
|
@ -512,15 +512,15 @@ private fun RoomAvatarAndNameRow(
|
||||||
private fun CantSendMessageBanner() {
|
private fun CantSendMessageBanner() {
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.background(MaterialTheme.colorScheme.secondary)
|
.background(ElementTheme.colors.bgSubtleSecondary)
|
||||||
.padding(16.dp),
|
.padding(16.dp),
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
horizontalArrangement = Arrangement.Center
|
horizontalArrangement = Arrangement.Center
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(id = R.string.screen_room_timeline_no_permission_to_post),
|
text = stringResource(id = R.string.screen_room_timeline_no_permission_to_post),
|
||||||
color = MaterialTheme.colorScheme.onSecondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
style = MaterialTheme.typography.bodyMedium,
|
style = MaterialTheme.typography.bodyMedium,
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
fontStyle = FontStyle.Italic,
|
fontStyle = FontStyle.Italic,
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@ import androidx.compose.foundation.lazy.items
|
||||||
import androidx.compose.foundation.shape.CircleShape
|
import androidx.compose.foundation.shape.CircleShape
|
||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
import androidx.compose.material3.ListItemDefaults
|
import androidx.compose.material3.ListItemDefaults
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.material3.rememberModalBottomSheetState
|
import androidx.compose.material3.rememberModalBottomSheetState
|
||||||
import androidx.compose.material3.ripple
|
import androidx.compose.material3.ripple
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
|
|
@ -253,7 +252,7 @@ private fun MessageSummary(
|
||||||
) {
|
) {
|
||||||
val content: @Composable () -> Unit
|
val content: @Composable () -> Unit
|
||||||
val icon: @Composable () -> Unit = { Avatar(avatarData = event.senderAvatar.copy(size = AvatarSize.MessageActionSender)) }
|
val icon: @Composable () -> Unit = { Avatar(avatarData = event.senderAvatar.copy(size = AvatarSize.MessageActionSender)) }
|
||||||
val contentStyle = ElementTheme.typography.fontBodyMdRegular.copy(color = MaterialTheme.colorScheme.secondary)
|
val contentStyle = ElementTheme.typography.fontBodyMdRegular.copy(color = ElementTheme.colors.textSecondary)
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun ContentForBody(body: String) {
|
fun ContentForBody(body: String) {
|
||||||
|
|
@ -316,7 +315,7 @@ private fun MessageSummary(
|
||||||
Text(
|
Text(
|
||||||
text = sentTimeFull,
|
text = sentTimeFull,
|
||||||
style = ElementTheme.typography.fontBodyXsRegular,
|
style = ElementTheme.typography.fontBodyXsRegular,
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
textAlign = TextAlign.End,
|
textAlign = TextAlign.End,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
@ -358,7 +357,7 @@ private fun EmojiReactionsRow(
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = CompoundIcons.ReactionAdd(),
|
imageVector = CompoundIcons.ReactionAdd(),
|
||||||
contentDescription = stringResource(id = CommonStrings.a11y_react_with_other_emojis),
|
contentDescription = stringResource(id = CommonStrings.a11y_react_with_other_emojis),
|
||||||
tint = MaterialTheme.colorScheme.secondary,
|
tint = ElementTheme.colors.iconSecondary,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.size(24.dp)
|
.size(24.dp)
|
||||||
.clickable(
|
.clickable(
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@ import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.rememberScrollState
|
import androidx.compose.foundation.rememberScrollState
|
||||||
import androidx.compose.foundation.verticalScroll
|
import androidx.compose.foundation.verticalScroll
|
||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.material3.Switch
|
import androidx.compose.material3.Switch
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
|
@ -113,7 +112,7 @@ fun ReportMessageView(
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(R.string.screen_report_content_block_user_hint),
|
text = stringResource(R.string.screen_report_content_block_user_hint),
|
||||||
style = ElementTheme.typography.fontBodyMdRegular,
|
style = ElementTheme.typography.fontBodyMdRegular,
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
Switch(
|
Switch(
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.foundation.layout.width
|
import androidx.compose.foundation.layout.width
|
||||||
import androidx.compose.foundation.shape.CornerSize
|
import androidx.compose.foundation.shape.CornerSize
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.Immutable
|
import androidx.compose.runtime.Immutable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
|
|
@ -76,7 +75,7 @@ fun MessagesReactionButton(
|
||||||
.background(Color.Transparent)
|
.background(Color.Transparent)
|
||||||
// Outer border, same colour as background
|
// Outer border, same colour as background
|
||||||
.border(
|
.border(
|
||||||
BorderStroke(2.dp, MaterialTheme.colorScheme.background),
|
BorderStroke(2.dp, ElementTheme.colors.bgCanvasDefault),
|
||||||
shape = RoundedCornerShape(corner = CornerSize(14.dp))
|
shape = RoundedCornerShape(corner = CornerSize(14.dp))
|
||||||
)
|
)
|
||||||
.padding(vertical = 2.dp, horizontal = 2.dp)
|
.padding(vertical = 2.dp, horizontal = 2.dp)
|
||||||
|
|
@ -164,7 +163,7 @@ private fun ReactionContent(
|
||||||
Spacer(modifier = Modifier.width(4.dp))
|
Spacer(modifier = Modifier.width(4.dp))
|
||||||
Text(
|
Text(
|
||||||
text = reaction.count.toString(),
|
text = reaction.count.toString(),
|
||||||
color = if (reaction.isHighlighted) MaterialTheme.colorScheme.primary else MaterialTheme.colorScheme.secondary,
|
color = if (reaction.isHighlighted) ElementTheme.colors.textPrimary else ElementTheme.colors.textSecondary,
|
||||||
style = ElementTheme.typography.fontBodyMdRegular,
|
style = ElementTheme.typography.fontBodyMdRegular,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ import androidx.compose.foundation.layout.Spacer
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.foundation.layout.width
|
import androidx.compose.foundation.layout.width
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
|
@ -45,7 +44,7 @@ fun TimelineEventTimestampView(
|
||||||
val hasError = event.localSendState is LocalEventSendState.Failed
|
val hasError = event.localSendState is LocalEventSendState.Failed
|
||||||
val hasEncryptionCritical = event.messageShield?.isCritical.orFalse()
|
val hasEncryptionCritical = event.messageShield?.isCritical.orFalse()
|
||||||
val isMessageEdited = event.content.isEdited()
|
val isMessageEdited = event.content.isEdited()
|
||||||
val tint = if (hasError || hasEncryptionCritical) MaterialTheme.colorScheme.error else MaterialTheme.colorScheme.secondary
|
val tint = if (hasError || hasEncryptionCritical) ElementTheme.colors.textCriticalPrimary else ElementTheme.colors.textSecondary
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(PaddingValues(start = TimelineEventTimestampViewDefaults.spacing))
|
.padding(PaddingValues(start = TimelineEventTimestampViewDefaults.spacing))
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ import androidx.compose.foundation.layout.Spacer
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.foundation.layout.width
|
import androidx.compose.foundation.layout.width
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
|
@ -53,7 +52,7 @@ fun TimelineItemInformativeView(
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
resourceId = iconResourceId,
|
resourceId = iconResourceId,
|
||||||
tint = MaterialTheme.colorScheme.secondary,
|
tint = ElementTheme.colors.iconSecondary,
|
||||||
contentDescription = iconDescription,
|
contentDescription = iconDescription,
|
||||||
modifier = Modifier.size(16.dp)
|
modifier = Modifier.size(16.dp)
|
||||||
)
|
)
|
||||||
|
|
@ -61,7 +60,7 @@ fun TimelineItemInformativeView(
|
||||||
Spacer(modifier = Modifier.width(4.dp))
|
Spacer(modifier = Modifier.width(4.dp))
|
||||||
Text(
|
Text(
|
||||||
fontStyle = FontStyle.Italic,
|
fontStyle = FontStyle.Italic,
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
style = ElementTheme.typography.fontBodyMdRegular,
|
style = ElementTheme.typography.fontBodyMdRegular,
|
||||||
text = text
|
text = text
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
package io.element.android.features.messages.impl.timeline.components.event
|
package io.element.android.features.messages.impl.timeline.components.event
|
||||||
|
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.text.style.TextAlign
|
import androidx.compose.ui.text.style.TextAlign
|
||||||
|
|
@ -25,7 +24,7 @@ fun TimelineItemStateView(
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
modifier = modifier,
|
modifier = modifier,
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
style = ElementTheme.typography.fontBodyMdRegular,
|
style = ElementTheme.typography.fontBodyMdRegular,
|
||||||
text = content.body,
|
text = content.body,
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.getValue
|
import androidx.compose.runtime.getValue
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
|
|
@ -67,7 +66,7 @@ fun GroupHeaderView(
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = text,
|
text = text,
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
style = ElementTheme.typography.fontBodyMdRegular,
|
style = ElementTheme.typography.fontBodyMdRegular,
|
||||||
)
|
)
|
||||||
val rotation: Float by animateFloatAsState(
|
val rotation: Float by animateFloatAsState(
|
||||||
|
|
@ -82,7 +81,7 @@ fun GroupHeaderView(
|
||||||
modifier = Modifier.rotate(rotation),
|
modifier = Modifier.rotate(rotation),
|
||||||
imageVector = CompoundIcons.ChevronRight(),
|
imageVector = CompoundIcons.ChevronRight(),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = MaterialTheme.colorScheme.secondary
|
tint = ElementTheme.colors.iconSecondary
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -172,7 +172,7 @@ private fun AggregatedReactionButton(
|
||||||
val textColor = if (isHighlighted) {
|
val textColor = if (isHighlighted) {
|
||||||
MaterialTheme.colorScheme.inversePrimary
|
MaterialTheme.colorScheme.inversePrimary
|
||||||
} else {
|
} else {
|
||||||
MaterialTheme.colorScheme.primary
|
ElementTheme.colors.textPrimary
|
||||||
}
|
}
|
||||||
|
|
||||||
val roundedCornerShape = RoundedCornerShape(corner = CornerSize(percent = 50))
|
val roundedCornerShape = RoundedCornerShape(corner = CornerSize(percent = 50))
|
||||||
|
|
@ -250,12 +250,12 @@ private fun SenderRow(
|
||||||
text = name,
|
text = name,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
color = MaterialTheme.colorScheme.primary,
|
color = ElementTheme.colors.textPrimary,
|
||||||
style = ElementTheme.typography.fontBodyMdRegular,
|
style = ElementTheme.typography.fontBodyMdRegular,
|
||||||
)
|
)
|
||||||
Text(
|
Text(
|
||||||
text = sentTime,
|
text = sentTime,
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
style = ElementTheme.typography.fontBodySmRegular,
|
style = ElementTheme.typography.fontBodySmRegular,
|
||||||
|
|
@ -263,7 +263,7 @@ private fun SenderRow(
|
||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
text = userId,
|
text = userId,
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
style = ElementTheme.typography.fontBodySmRegular,
|
style = ElementTheme.typography.fontBodySmRegular,
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@ import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.foundation.shape.CircleShape
|
import androidx.compose.foundation.shape.CircleShape
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
|
@ -131,7 +130,7 @@ private fun ReadReceiptsAvatars(
|
||||||
) {
|
) {
|
||||||
val avatarSize = AvatarSize.TimelineReadReceipt.dp
|
val avatarSize = AvatarSize.TimelineReadReceipt.dp
|
||||||
val avatarStrokeSize = 1.dp
|
val avatarStrokeSize = 1.dp
|
||||||
val avatarStrokeColor = MaterialTheme.colorScheme.background
|
val avatarStrokeColor = ElementTheme.colors.bgCanvasDefault
|
||||||
val receiptDescription = computeReceiptDescription(receipts)
|
val receiptDescription = computeReceiptDescription(receipts)
|
||||||
Row(
|
Row(
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ import androidx.compose.foundation.layout.Box
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.wrapContentHeight
|
import androidx.compose.foundation.layout.wrapContentHeight
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
|
@ -39,7 +38,7 @@ internal fun TimelineItemDaySeparatorView(
|
||||||
Text(
|
Text(
|
||||||
text = model.formattedDate,
|
text = model.formattedDate,
|
||||||
style = ElementTheme.typography.fontBodyMdMedium,
|
style = ElementTheme.typography.fontBodyMdMedium,
|
||||||
color = MaterialTheme.colorScheme.primary,
|
color = ElementTheme.colors.textPrimary,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ import androidx.compose.foundation.layout.Box
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
|
@ -41,7 +40,7 @@ fun TimelineItemRoomBeginningView(
|
||||||
stringResource(id = R.string.screen_room_timeline_beginning_of_room, roomName)
|
stringResource(id = R.string.screen_room_timeline_beginning_of_room, roomName)
|
||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
style = ElementTheme.typography.fontBodyMdRegular,
|
style = ElementTheme.typography.fontBodyMdRegular,
|
||||||
text = text,
|
text = text,
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.foundation.layout.statusBarsPadding
|
import androidx.compose.foundation.layout.statusBarsPadding
|
||||||
import androidx.compose.foundation.layout.width
|
import androidx.compose.foundation.layout.width
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
|
@ -25,6 +24,8 @@ import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
import io.element.android.compound.theme.ElementTheme
|
import io.element.android.compound.theme.ElementTheme
|
||||||
import io.element.android.compound.tokens.generated.CompoundIcons
|
import io.element.android.compound.tokens.generated.CompoundIcons
|
||||||
|
import io.element.android.libraries.designsystem.preview.ElementPreview
|
||||||
|
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
|
||||||
import io.element.android.libraries.designsystem.text.toDp
|
import io.element.android.libraries.designsystem.text.toDp
|
||||||
import io.element.android.libraries.designsystem.theme.components.Icon
|
import io.element.android.libraries.designsystem.theme.components.Icon
|
||||||
import io.element.android.libraries.designsystem.theme.components.Text
|
import io.element.android.libraries.designsystem.theme.components.Text
|
||||||
|
|
@ -37,24 +38,29 @@ internal fun Indicator(
|
||||||
Row(
|
Row(
|
||||||
modifier
|
modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.background(MaterialTheme.colorScheme.secondaryContainer)
|
.background(ElementTheme.colors.bgSubtlePrimary)
|
||||||
.statusBarsPadding()
|
.statusBarsPadding()
|
||||||
.padding(vertical = 6.dp),
|
.padding(vertical = 6.dp),
|
||||||
horizontalArrangement = Arrangement.Center,
|
horizontalArrangement = Arrangement.Center,
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
) {
|
) {
|
||||||
val tint = MaterialTheme.colorScheme.primary
|
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = CompoundIcons.Offline(),
|
imageVector = CompoundIcons.Offline(),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = tint,
|
tint = ElementTheme.colors.iconPrimary,
|
||||||
modifier = Modifier.size(16.sp.toDp()),
|
modifier = Modifier.size(16.sp.toDp()),
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.width(8.dp))
|
Spacer(modifier = Modifier.width(8.dp))
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(CommonStrings.common_offline),
|
text = stringResource(CommonStrings.common_offline),
|
||||||
style = ElementTheme.typography.fontBodyMdMedium,
|
style = ElementTheme.typography.fontBodyMdMedium,
|
||||||
color = tint,
|
color = ElementTheme.colors.textPrimary,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PreviewsDayNight
|
||||||
|
@Composable
|
||||||
|
internal fun IndicatorPreview() = ElementPreview {
|
||||||
|
Indicator()
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ import androidx.compose.foundation.pager.HorizontalPager
|
||||||
import androidx.compose.foundation.pager.rememberPagerState
|
import androidx.compose.foundation.pager.rememberPagerState
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.material3.SingleChoiceSegmentedButtonRow
|
import androidx.compose.material3.SingleChoiceSegmentedButtonRow
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.LaunchedEffect
|
import androidx.compose.runtime.LaunchedEffect
|
||||||
|
|
@ -236,7 +235,7 @@ private fun PollHistoryItemRow(
|
||||||
Column(modifier = Modifier.padding(16.dp)) {
|
Column(modifier = Modifier.padding(16.dp)) {
|
||||||
Text(
|
Text(
|
||||||
text = pollHistoryItem.formattedDate,
|
text = pollHistoryItem.formattedDate,
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
style = ElementTheme.typography.fontBodySmRegular,
|
style = ElementTheme.typography.fontBodySmRegular,
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(4.dp))
|
Spacer(modifier = Modifier.height(4.dp))
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.LaunchedEffect
|
import androidx.compose.runtime.LaunchedEffect
|
||||||
import androidx.compose.runtime.getValue
|
import androidx.compose.runtime.getValue
|
||||||
|
|
@ -25,6 +24,7 @@ import androidx.compose.ui.res.stringResource
|
||||||
import androidx.compose.ui.text.style.TextAlign
|
import androidx.compose.ui.text.style.TextAlign
|
||||||
import androidx.compose.ui.tooling.preview.PreviewParameter
|
import androidx.compose.ui.tooling.preview.PreviewParameter
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
|
import io.element.android.compound.theme.ElementTheme
|
||||||
import io.element.android.libraries.architecture.AsyncData
|
import io.element.android.libraries.architecture.AsyncData
|
||||||
import io.element.android.libraries.designsystem.atomic.atoms.PlaceholderAtom
|
import io.element.android.libraries.designsystem.atomic.atoms.PlaceholderAtom
|
||||||
import io.element.android.libraries.designsystem.atomic.atoms.RoomPreviewTitleAtom
|
import io.element.android.libraries.designsystem.atomic.atoms.RoomPreviewTitleAtom
|
||||||
|
|
@ -127,7 +127,7 @@ private fun RoomAliasResolverContent(
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(id = R.string.screen_room_alias_resolver_resolve_alias_failure),
|
text = stringResource(id = R.string.screen_room_alias_resolver_resolve_alias_failure),
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
color = MaterialTheme.colorScheme.error,
|
color = ElementTheme.colors.textCriticalPrimary,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -424,7 +424,7 @@ private fun TitleAndSubtitle(
|
||||||
Text(
|
Text(
|
||||||
text = subtitle,
|
text = subtitle,
|
||||||
style = ElementTheme.typography.fontBodyLgRegular,
|
style = ElementTheme.typography.fontBodyLgRegular,
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@ import androidx.compose.foundation.lazy.LazyListScope
|
||||||
import androidx.compose.foundation.lazy.items
|
import androidx.compose.foundation.lazy.items
|
||||||
import androidx.compose.foundation.lazy.rememberLazyListState
|
import androidx.compose.foundation.lazy.rememberLazyListState
|
||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.material3.SingleChoiceSegmentedButtonRow
|
import androidx.compose.material3.SingleChoiceSegmentedButtonRow
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.SideEffect
|
import androidx.compose.runtime.SideEffect
|
||||||
|
|
@ -278,7 +277,7 @@ private fun LazyListScope.roomMemberListSection(
|
||||||
modifier = Modifier.padding(horizontal = 16.dp, vertical = 12.dp),
|
modifier = Modifier.padding(horizontal = 16.dp, vertical = 12.dp),
|
||||||
text = it(),
|
text = it(),
|
||||||
style = ElementTheme.typography.fontBodyLgRegular,
|
style = ElementTheme.typography.fontBodyLgRegular,
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ import androidx.compose.foundation.layout.consumeWindowInsets
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
|
|
@ -111,7 +110,7 @@ private fun RoomSpecificNotificationSettingsView(
|
||||||
.padding(start = 16.dp, bottom = 16.dp, end = 16.dp),
|
.padding(start = 16.dp, bottom = 16.dp, end = 16.dp),
|
||||||
style = ElementTheme.typography.fontBodyMdRegular
|
style = ElementTheme.typography.fontBodyMdRegular
|
||||||
.copy(
|
.copy(
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if (state.defaultRoomNotificationMode != null) {
|
if (state.defaultRoomNotificationMode != null) {
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ import androidx.compose.foundation.lazy.LazyListState
|
||||||
import androidx.compose.foundation.lazy.items
|
import androidx.compose.foundation.lazy.items
|
||||||
import androidx.compose.foundation.lazy.rememberLazyListState
|
import androidx.compose.foundation.lazy.rememberLazyListState
|
||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.LaunchedEffect
|
import androidx.compose.runtime.LaunchedEffect
|
||||||
import androidx.compose.runtime.getValue
|
import androidx.compose.runtime.getValue
|
||||||
|
|
@ -356,7 +355,7 @@ private fun MemberRow(
|
||||||
text = name,
|
text = name,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
color = MaterialTheme.colorScheme.primary,
|
color = ElementTheme.colors.textPrimary,
|
||||||
style = ElementTheme.typography.fontBodyLgRegular,
|
style = ElementTheme.typography.fontBodyLgRegular,
|
||||||
)
|
)
|
||||||
// Invitation pending marker
|
// Invitation pending marker
|
||||||
|
|
@ -365,7 +364,7 @@ private fun MemberRow(
|
||||||
modifier = Modifier.padding(start = 8.dp),
|
modifier = Modifier.padding(start = 8.dp),
|
||||||
text = stringResource(id = R.string.screen_room_member_list_pending_header_title),
|
text = stringResource(id = R.string.screen_room_member_list_pending_header_title),
|
||||||
style = ElementTheme.typography.fontBodySmRegular.copy(fontStyle = FontStyle.Italic),
|
style = ElementTheme.typography.fontBodySmRegular.copy(fontStyle = FontStyle.Italic),
|
||||||
color = MaterialTheme.colorScheme.secondary
|
color = ElementTheme.colors.textSecondary
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -373,7 +372,7 @@ private fun MemberRow(
|
||||||
userId?.let {
|
userId?.let {
|
||||||
Text(
|
Text(
|
||||||
text = userId,
|
text = userId,
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
style = ElementTheme.typography.fontBodySmRegular,
|
style = ElementTheme.typography.fontBodySmRegular,
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.statusBarsPadding
|
import androidx.compose.foundation.layout.statusBarsPadding
|
||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.material3.TopAppBarDefaults
|
import androidx.compose.material3.TopAppBarDefaults
|
||||||
import androidx.compose.material3.rememberTopAppBarState
|
import androidx.compose.material3.rememberTopAppBarState
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
|
|
@ -22,6 +21,7 @@ import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.input.nestedscroll.nestedScroll
|
import androidx.compose.ui.input.nestedscroll.nestedScroll
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
import androidx.compose.ui.tooling.preview.PreviewParameter
|
import androidx.compose.ui.tooling.preview.PreviewParameter
|
||||||
|
import io.element.android.compound.theme.ElementTheme
|
||||||
import io.element.android.compound.tokens.generated.CompoundIcons
|
import io.element.android.compound.tokens.generated.CompoundIcons
|
||||||
import io.element.android.features.leaveroom.api.LeaveRoomView
|
import io.element.android.features.leaveroom.api.LeaveRoomView
|
||||||
import io.element.android.features.networkmonitor.api.ui.ConnectivityIndicatorContainer
|
import io.element.android.features.networkmonitor.api.ui.ConnectivityIndicatorContainer
|
||||||
|
|
@ -90,7 +90,7 @@ fun RoomListView(
|
||||||
.statusBarsPadding()
|
.statusBarsPadding()
|
||||||
.padding(top = topPadding)
|
.padding(top = topPadding)
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.background(MaterialTheme.colorScheme.background)
|
.background(ElementTheme.colors.bgCanvasDefault)
|
||||||
)
|
)
|
||||||
acceptDeclineInviteView()
|
acceptDeclineInviteView()
|
||||||
}
|
}
|
||||||
|
|
@ -152,14 +152,14 @@ private fun RoomListScaffold(
|
||||||
floatingActionButton = {
|
floatingActionButton = {
|
||||||
if (state.displayActions) {
|
if (state.displayActions) {
|
||||||
FloatingActionButton(
|
FloatingActionButton(
|
||||||
// FIXME align on Design system theme
|
containerColor = ElementTheme.colors.iconPrimary,
|
||||||
containerColor = MaterialTheme.colorScheme.primary,
|
|
||||||
onClick = onCreateRoomClick
|
onClick = onCreateRoomClick
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
// Note cannot use Icons.Outlined.EditSquare, it does not exist :/
|
// Note cannot use Icons.Outlined.EditSquare, it does not exist :/
|
||||||
imageVector = CompoundIcons.Compose(),
|
imageVector = CompoundIcons.Compose(),
|
||||||
contentDescription = stringResource(id = R.string.screen_roomlist_a11y_create_message)
|
contentDescription = stringResource(id = R.string.screen_roomlist_a11y_create_message),
|
||||||
|
tint = ElementTheme.colors.iconOnSolidPrimary,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ import androidx.compose.foundation.layout.Spacer
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
|
@ -72,7 +71,7 @@ fun UserProfileHeaderSection(
|
||||||
Text(
|
Text(
|
||||||
text = userId.value,
|
text = userId.value,
|
||||||
style = ElementTheme.typography.fontBodyLgRegular,
|
style = ElementTheme.typography.fontBodyLgRegular,
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
)
|
)
|
||||||
if (isUserVerified.dataOrNull() == true) {
|
if (isUserVerified.dataOrNull() == true) {
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@ import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.foundation.layout.widthIn
|
import androidx.compose.foundation.layout.widthIn
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
|
@ -49,7 +48,7 @@ internal fun VerificationContentVerifying(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
text = text,
|
text = text,
|
||||||
style = ElementTheme.typography.fontHeadingLgBold,
|
style = ElementTheme.typography.fontHeadingLgBold,
|
||||||
color = MaterialTheme.colorScheme.primary,
|
color = ElementTheme.colors.textPrimary,
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
@ -86,7 +85,7 @@ private fun EmojiItemView(emoji: VerificationEmoji, modifier: Modifier = Modifie
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(id = emojiResource.nameRes),
|
text = stringResource(id = emojiResource.nameRes),
|
||||||
style = ElementTheme.typography.fontBodyMdRegular,
|
style = ElementTheme.typography.fontBodyMdRegular,
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -7,24 +7,24 @@
|
||||||
|
|
||||||
package io.element.android.libraries.designsystem
|
package io.element.android.libraries.designsystem
|
||||||
|
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
|
import io.element.android.compound.theme.ElementTheme
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun Boolean.toEnabledColor(): Color {
|
fun Boolean.toEnabledColor(): Color {
|
||||||
return if (this) {
|
return if (this) {
|
||||||
MaterialTheme.colorScheme.primary
|
ElementTheme.colors.textPrimary
|
||||||
} else {
|
} else {
|
||||||
MaterialTheme.colorScheme.primary.copy(alpha = 0.40f)
|
ElementTheme.colors.textDisabled
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun Boolean.toSecondaryEnabledColor(): Color {
|
fun Boolean.toSecondaryEnabledColor(): Color {
|
||||||
return if (this) {
|
return if (this) {
|
||||||
MaterialTheme.colorScheme.secondary
|
ElementTheme.colors.textSecondary
|
||||||
} else {
|
} else {
|
||||||
MaterialTheme.colorScheme.secondary.copy(alpha = 0.40f)
|
ElementTheme.colors.textDisabled
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.Home
|
import androidx.compose.material.icons.filled.Home
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
|
@ -45,7 +44,7 @@ fun RoundedIconAtom(
|
||||||
size: RoundedIconAtomSize = RoundedIconAtomSize.Big,
|
size: RoundedIconAtomSize = RoundedIconAtomSize.Big,
|
||||||
resourceId: Int? = null,
|
resourceId: Int? = null,
|
||||||
imageVector: ImageVector? = null,
|
imageVector: ImageVector? = null,
|
||||||
tint: Color = MaterialTheme.colorScheme.secondary,
|
tint: Color = ElementTheme.colors.iconSecondary,
|
||||||
backgroundTint: Color = ElementTheme.colors.temporaryColorBgSpecial,
|
backgroundTint: Color = ElementTheme.colors.temporaryColorBgSpecial,
|
||||||
) {
|
) {
|
||||||
Box(
|
Box(
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.Spacer
|
import androidx.compose.foundation.layout.Spacer
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
|
@ -51,7 +50,7 @@ fun IconTitleSubtitleMolecule(
|
||||||
.fillMaxWidth(),
|
.fillMaxWidth(),
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
style = ElementTheme.typography.fontHeadingMdBold,
|
style = ElementTheme.typography.fontHeadingMdBold,
|
||||||
color = MaterialTheme.colorScheme.primary,
|
color = ElementTheme.colors.textPrimary,
|
||||||
)
|
)
|
||||||
if (subTitle != null) {
|
if (subTitle != null) {
|
||||||
Spacer(Modifier.height(8.dp))
|
Spacer(Modifier.height(8.dp))
|
||||||
|
|
@ -60,7 +59,7 @@ fun IconTitleSubtitleMolecule(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
style = ElementTheme.typography.fontBodyMdRegular,
|
style = ElementTheme.typography.fontBodyMdRegular,
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.imePadding
|
import androidx.compose.foundation.layout.imePadding
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.movableContentOf
|
import androidx.compose.runtime.movableContentOf
|
||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
|
|
@ -46,7 +45,7 @@ import io.element.android.libraries.designsystem.theme.components.Text
|
||||||
fun HeaderFooterPage(
|
fun HeaderFooterPage(
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
paddingValues: PaddingValues = PaddingValues(20.dp),
|
paddingValues: PaddingValues = PaddingValues(20.dp),
|
||||||
containerColor: Color = MaterialTheme.colorScheme.background,
|
containerColor: Color = ElementTheme.colors.bgCanvasDefault,
|
||||||
isScrollable: Boolean = false,
|
isScrollable: Boolean = false,
|
||||||
background: @Composable () -> Unit = {},
|
background: @Composable () -> Unit = {},
|
||||||
topBar: @Composable () -> Unit = {},
|
topBar: @Composable () -> Unit = {},
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,13 @@ package io.element.android.libraries.designsystem.background
|
||||||
|
|
||||||
import androidx.compose.foundation.Canvas
|
import androidx.compose.foundation.Canvas
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.geometry.center
|
import androidx.compose.ui.geometry.center
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.graphics.RadialGradientShader
|
import androidx.compose.ui.graphics.RadialGradientShader
|
||||||
import androidx.compose.ui.graphics.ShaderBrush
|
import androidx.compose.ui.graphics.ShaderBrush
|
||||||
|
import io.element.android.compound.theme.ElementTheme
|
||||||
import io.element.android.libraries.designsystem.preview.ElementPreview
|
import io.element.android.libraries.designsystem.preview.ElementPreview
|
||||||
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
|
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
|
||||||
|
|
||||||
|
|
@ -25,7 +25,7 @@ import io.element.android.libraries.designsystem.preview.PreviewsDayNight
|
||||||
@Composable
|
@Composable
|
||||||
fun LightGradientBackground(
|
fun LightGradientBackground(
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
backgroundColor: Color = MaterialTheme.colorScheme.background,
|
backgroundColor: Color = ElementTheme.colors.bgCanvasDefault,
|
||||||
firstColor: Color = Color(0x1E0DBD8B),
|
firstColor: Color = Color(0x1E0DBD8B),
|
||||||
secondColor: Color = Color(0x001273EB),
|
secondColor: Color = Color(0x001273EB),
|
||||||
ratio: Float = 642 / 775f,
|
ratio: Float = 642 / 775f,
|
||||||
|
|
|
||||||
|
|
@ -9,11 +9,11 @@ package io.element.android.libraries.designsystem.components
|
||||||
|
|
||||||
import androidx.compose.foundation.layout.Row
|
import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.tooling.preview.Preview
|
import androidx.compose.ui.tooling.preview.Preview
|
||||||
|
import io.element.android.compound.theme.ElementTheme
|
||||||
import io.element.android.libraries.designsystem.preview.ElementThemedPreview
|
import io.element.android.libraries.designsystem.preview.ElementThemedPreview
|
||||||
import io.element.android.libraries.designsystem.preview.PreviewGroup
|
import io.element.android.libraries.designsystem.preview.PreviewGroup
|
||||||
import io.element.android.libraries.designsystem.theme.components.Checkbox
|
import io.element.android.libraries.designsystem.theme.components.Checkbox
|
||||||
|
|
@ -38,7 +38,7 @@ fun LabelledCheckbox(
|
||||||
)
|
)
|
||||||
Text(
|
Text(
|
||||||
text = text,
|
text = text,
|
||||||
color = MaterialTheme.colorScheme.primary,
|
color = ElementTheme.colors.textPrimary,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ import androidx.compose.ui.tooling.preview.Preview
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.window.Dialog
|
import androidx.compose.ui.window.Dialog
|
||||||
import androidx.compose.ui.window.DialogProperties
|
import androidx.compose.ui.window.DialogProperties
|
||||||
|
import io.element.android.compound.theme.ElementTheme
|
||||||
import io.element.android.libraries.designsystem.preview.ElementPreview
|
import io.element.android.libraries.designsystem.preview.ElementPreview
|
||||||
import io.element.android.libraries.designsystem.preview.ElementThemedPreview
|
import io.element.android.libraries.designsystem.preview.ElementThemedPreview
|
||||||
import io.element.android.libraries.designsystem.preview.PreviewGroup
|
import io.element.android.libraries.designsystem.preview.PreviewGroup
|
||||||
|
|
@ -64,13 +65,13 @@ fun ProgressDialog(
|
||||||
when (type) {
|
when (type) {
|
||||||
is ProgressDialogType.Indeterminate -> {
|
is ProgressDialogType.Indeterminate -> {
|
||||||
CircularProgressIndicator(
|
CircularProgressIndicator(
|
||||||
color = MaterialTheme.colorScheme.primary
|
color = ElementTheme.colors.iconPrimary
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
is ProgressDialogType.Determinate -> {
|
is ProgressDialogType.Determinate -> {
|
||||||
CircularProgressIndicator(
|
CircularProgressIndicator(
|
||||||
progress = { type.progress },
|
progress = { type.progress },
|
||||||
color = MaterialTheme.colorScheme.primary
|
color = ElementTheme.colors.iconPrimary
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -93,7 +94,7 @@ private fun ProgressDialogContent(
|
||||||
onCancelClick: () -> Unit = {},
|
onCancelClick: () -> Unit = {},
|
||||||
progressIndicator: @Composable () -> Unit = {
|
progressIndicator: @Composable () -> Unit = {
|
||||||
CircularProgressIndicator(
|
CircularProgressIndicator(
|
||||||
color = MaterialTheme.colorScheme.primary
|
color = ElementTheme.colors.iconPrimary
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
|
|
@ -114,7 +115,7 @@ private fun ProgressDialogContent(
|
||||||
Spacer(modifier = Modifier.height(22.dp))
|
Spacer(modifier = Modifier.height(22.dp))
|
||||||
Text(
|
Text(
|
||||||
text = text,
|
text = text,
|
||||||
color = MaterialTheme.colorScheme.primary,
|
color = ElementTheme.colors.textPrimary,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (showCancelButton) {
|
if (showCancelButton) {
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.widthIn
|
import androidx.compose.foundation.layout.widthIn
|
||||||
import androidx.compose.material3.LocalContentColor
|
import androidx.compose.material3.LocalContentColor
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.material3.ripple
|
import androidx.compose.material3.ripple
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
|
|
@ -58,17 +57,16 @@ fun MainActionButton(
|
||||||
.widthIn(min = 76.dp, max = 96.dp),
|
.widthIn(min = 76.dp, max = 96.dp),
|
||||||
horizontalAlignment = Alignment.CenterHorizontally,
|
horizontalAlignment = Alignment.CenterHorizontally,
|
||||||
) {
|
) {
|
||||||
val tintColor = if (enabled) LocalContentColor.current else MaterialTheme.colorScheme.secondary
|
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = imageVector,
|
imageVector = imageVector,
|
||||||
contentDescription = contentDescription,
|
contentDescription = contentDescription,
|
||||||
tint = tintColor,
|
tint = if (enabled) LocalContentColor.current else ElementTheme.colors.iconDisabled,
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(14.dp))
|
Spacer(modifier = Modifier.height(14.dp))
|
||||||
Text(
|
Text(
|
||||||
title,
|
title,
|
||||||
style = ElementTheme.typography.fontBodyMdMedium.copy(hyphens = Hyphens.Auto),
|
style = ElementTheme.typography.fontBodyMdMedium.copy(hyphens = Hyphens.Auto),
|
||||||
color = tintColor,
|
color = if (enabled) LocalContentColor.current else ElementTheme.colors.textDisabled,
|
||||||
overflow = TextOverflow.Visible,
|
overflow = TextOverflow.Visible,
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,7 @@ internal fun SimpleAlertDialogContent(
|
||||||
// most cases, TextButtons should be used for dismiss and confirm buttons.
|
// most cases, TextButtons should be used for dismiss and confirm buttons.
|
||||||
// TextButtons will not consume this provided content color value, and will used their
|
// TextButtons will not consume this provided content color value, and will used their
|
||||||
// own defined or default colors.
|
// own defined or default colors.
|
||||||
buttonContentColor = MaterialTheme.colorScheme.primary,
|
buttonContentColor = ElementTheme.colors.textPrimary,
|
||||||
applyPaddingToContents = applyPaddingToContents,
|
applyPaddingToContents = applyPaddingToContents,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,10 @@ package io.element.android.libraries.designsystem.theme.components.previews
|
||||||
import androidx.compose.material3.AlertDialogDefaults
|
import androidx.compose.material3.AlertDialogDefaults
|
||||||
import androidx.compose.material3.DatePicker
|
import androidx.compose.material3.DatePicker
|
||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.material3.rememberDatePickerState
|
import androidx.compose.material3.rememberDatePickerState
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.tooling.preview.Preview
|
import androidx.compose.ui.tooling.preview.Preview
|
||||||
|
import io.element.android.compound.theme.ElementTheme
|
||||||
import io.element.android.libraries.architecture.coverage.ExcludeFromCoverage
|
import io.element.android.libraries.architecture.coverage.ExcludeFromCoverage
|
||||||
import io.element.android.libraries.designsystem.preview.ElementPreviewDark
|
import io.element.android.libraries.designsystem.preview.ElementPreviewDark
|
||||||
import io.element.android.libraries.designsystem.preview.ElementPreviewLight
|
import io.element.android.libraries.designsystem.preview.ElementPreviewLight
|
||||||
|
|
@ -48,7 +48,7 @@ private fun ContentToPreview() {
|
||||||
shape = AlertDialogDefaults.shape,
|
shape = AlertDialogDefaults.shape,
|
||||||
containerColor = AlertDialogDefaults.containerColor,
|
containerColor = AlertDialogDefaults.containerColor,
|
||||||
tonalElevation = AlertDialogDefaults.TonalElevation,
|
tonalElevation = AlertDialogDefaults.TonalElevation,
|
||||||
buttonContentColor = MaterialTheme.colorScheme.primary,
|
buttonContentColor = ElementTheme.colors.textPrimary,
|
||||||
iconContentColor = AlertDialogDefaults.iconContentColor,
|
iconContentColor = AlertDialogDefaults.iconContentColor,
|
||||||
titleContentColor = AlertDialogDefaults.titleContentColor,
|
titleContentColor = AlertDialogDefaults.titleContentColor,
|
||||||
textContentColor = AlertDialogDefaults.textContentColor,
|
textContentColor = AlertDialogDefaults.textContentColor,
|
||||||
|
|
|
||||||
|
|
@ -9,12 +9,12 @@ package io.element.android.libraries.designsystem.theme.components.previews
|
||||||
|
|
||||||
import androidx.compose.material3.AlertDialogDefaults
|
import androidx.compose.material3.AlertDialogDefaults
|
||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.material3.TimePicker
|
import androidx.compose.material3.TimePicker
|
||||||
import androidx.compose.material3.TimePickerLayoutType
|
import androidx.compose.material3.TimePickerLayoutType
|
||||||
import androidx.compose.material3.rememberTimePickerState
|
import androidx.compose.material3.rememberTimePickerState
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.tooling.preview.Preview
|
import androidx.compose.ui.tooling.preview.Preview
|
||||||
|
import io.element.android.compound.theme.ElementTheme
|
||||||
import io.element.android.libraries.designsystem.preview.ElementPreviewDark
|
import io.element.android.libraries.designsystem.preview.ElementPreviewDark
|
||||||
import io.element.android.libraries.designsystem.preview.ElementPreviewLight
|
import io.element.android.libraries.designsystem.preview.ElementPreviewLight
|
||||||
import io.element.android.libraries.designsystem.preview.ElementThemedPreview
|
import io.element.android.libraries.designsystem.preview.ElementThemedPreview
|
||||||
|
|
@ -35,7 +35,7 @@ internal fun TimePickerHorizontalPreview() {
|
||||||
shape = AlertDialogDefaults.shape,
|
shape = AlertDialogDefaults.shape,
|
||||||
containerColor = AlertDialogDefaults.containerColor,
|
containerColor = AlertDialogDefaults.containerColor,
|
||||||
tonalElevation = AlertDialogDefaults.TonalElevation,
|
tonalElevation = AlertDialogDefaults.TonalElevation,
|
||||||
buttonContentColor = MaterialTheme.colorScheme.primary,
|
buttonContentColor = ElementTheme.colors.textPrimary,
|
||||||
iconContentColor = AlertDialogDefaults.iconContentColor,
|
iconContentColor = AlertDialogDefaults.iconContentColor,
|
||||||
titleContentColor = AlertDialogDefaults.titleContentColor,
|
titleContentColor = AlertDialogDefaults.titleContentColor,
|
||||||
textContentColor = AlertDialogDefaults.textContentColor,
|
textContentColor = AlertDialogDefaults.textContentColor,
|
||||||
|
|
@ -57,7 +57,7 @@ internal fun TimePickerVerticalLightPreview() {
|
||||||
shape = AlertDialogDefaults.shape,
|
shape = AlertDialogDefaults.shape,
|
||||||
containerColor = AlertDialogDefaults.containerColor,
|
containerColor = AlertDialogDefaults.containerColor,
|
||||||
tonalElevation = AlertDialogDefaults.TonalElevation,
|
tonalElevation = AlertDialogDefaults.TonalElevation,
|
||||||
buttonContentColor = MaterialTheme.colorScheme.primary,
|
buttonContentColor = ElementTheme.colors.textPrimary,
|
||||||
iconContentColor = AlertDialogDefaults.iconContentColor,
|
iconContentColor = AlertDialogDefaults.iconContentColor,
|
||||||
titleContentColor = AlertDialogDefaults.titleContentColor,
|
titleContentColor = AlertDialogDefaults.titleContentColor,
|
||||||
textContentColor = AlertDialogDefaults.textContentColor,
|
textContentColor = AlertDialogDefaults.textContentColor,
|
||||||
|
|
@ -83,7 +83,7 @@ internal fun TimePickerVerticalDarkPreview() {
|
||||||
shape = AlertDialogDefaults.shape,
|
shape = AlertDialogDefaults.shape,
|
||||||
containerColor = AlertDialogDefaults.containerColor,
|
containerColor = AlertDialogDefaults.containerColor,
|
||||||
tonalElevation = AlertDialogDefaults.TonalElevation,
|
tonalElevation = AlertDialogDefaults.TonalElevation,
|
||||||
buttonContentColor = MaterialTheme.colorScheme.primary,
|
buttonContentColor = ElementTheme.colors.textPrimary,
|
||||||
iconContentColor = AlertDialogDefaults.iconContentColor,
|
iconContentColor = AlertDialogDefaults.iconContentColor,
|
||||||
titleContentColor = AlertDialogDefaults.titleContentColor,
|
titleContentColor = AlertDialogDefaults.titleContentColor,
|
||||||
textContentColor = AlertDialogDefaults.textContentColor,
|
textContentColor = AlertDialogDefaults.textContentColor,
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ import androidx.compose.foundation.layout.navigationBarsPadding
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.items
|
import androidx.compose.foundation.lazy.items
|
||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.material3.rememberModalBottomSheetState
|
import androidx.compose.material3.rememberModalBottomSheetState
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.rememberCoroutineScope
|
import androidx.compose.runtime.rememberCoroutineScope
|
||||||
|
|
@ -97,7 +96,7 @@ private fun AvatarActionBottomSheetContent(
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(action.titleResId),
|
text = stringResource(action.titleResId),
|
||||||
style = ElementTheme.typography.fontBodyLgRegular,
|
style = ElementTheme.typography.fontBodyLgRegular,
|
||||||
color = if (action.destructive) MaterialTheme.colorScheme.error else MaterialTheme.colorScheme.primary,
|
color = if (action.destructive) ElementTheme.colors.textCriticalPrimary else ElementTheme.colors.textPrimary,
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
leadingContent = ListItemContent.Icon(IconSource.Resource(action.iconResourceId)),
|
leadingContent = ListItemContent.Icon(IconSource.Resource(action.iconResourceId)),
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.foundation.shape.CircleShape
|
import androidx.compose.foundation.shape.CircleShape
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.material3.ripple
|
import androidx.compose.material3.ripple
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
|
|
@ -27,6 +26,7 @@ import androidx.compose.ui.draw.clip
|
||||||
import androidx.compose.ui.tooling.preview.PreviewParameter
|
import androidx.compose.ui.tooling.preview.PreviewParameter
|
||||||
import androidx.compose.ui.tooling.preview.PreviewParameterProvider
|
import androidx.compose.ui.tooling.preview.PreviewParameterProvider
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
|
import io.element.android.compound.theme.ElementTheme
|
||||||
import io.element.android.compound.tokens.generated.CompoundIcons
|
import io.element.android.compound.tokens.generated.CompoundIcons
|
||||||
import io.element.android.libraries.designsystem.components.avatar.Avatar
|
import io.element.android.libraries.designsystem.components.avatar.Avatar
|
||||||
import io.element.android.libraries.designsystem.components.avatar.AvatarData
|
import io.element.android.libraries.designsystem.components.avatar.AvatarData
|
||||||
|
|
@ -79,7 +79,7 @@ fun EditableAvatarView(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.align(Alignment.BottomEnd)
|
.align(Alignment.BottomEnd)
|
||||||
.clip(CircleShape)
|
.clip(CircleShape)
|
||||||
.background(MaterialTheme.colorScheme.primary)
|
.background(ElementTheme.colors.iconPrimary)
|
||||||
.size(24.dp),
|
.size(24.dp),
|
||||||
contentAlignment = Alignment.Center,
|
contentAlignment = Alignment.Center,
|
||||||
) {
|
) {
|
||||||
|
|
@ -87,7 +87,7 @@ fun EditableAvatarView(
|
||||||
modifier = Modifier.size(16.dp),
|
modifier = Modifier.size(16.dp),
|
||||||
imageVector = CompoundIcons.EditSolid(),
|
imageVector = CompoundIcons.EditSolid(),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = MaterialTheme.colorScheme.onPrimary,
|
tint = ElementTheme.colors.iconOnSolidPrimary,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ import androidx.compose.foundation.layout.Arrangement
|
||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
import androidx.compose.foundation.layout.Row
|
import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
|
|
@ -40,7 +39,7 @@ fun InviteSenderView(
|
||||||
Text(
|
Text(
|
||||||
text = inviteSender.annotatedString(),
|
text = inviteSender.annotatedString(),
|
||||||
style = ElementTheme.typography.fontBodyMdRegular,
|
style = ElementTheme.typography.fontBodyMdRegular,
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ import androidx.compose.ui.res.stringResource
|
||||||
import androidx.compose.ui.text.style.TextOverflow
|
import androidx.compose.ui.text.style.TextOverflow
|
||||||
import androidx.compose.ui.tooling.preview.PreviewParameter
|
import androidx.compose.ui.tooling.preview.PreviewParameter
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
|
import io.element.android.compound.theme.ElementTheme
|
||||||
import io.element.android.compound.tokens.generated.CompoundIcons
|
import io.element.android.compound.tokens.generated.CompoundIcons
|
||||||
import io.element.android.libraries.designsystem.components.avatar.AvatarSize
|
import io.element.android.libraries.designsystem.components.avatar.AvatarSize
|
||||||
import io.element.android.libraries.designsystem.components.avatar.CompositeAvatar
|
import io.element.android.libraries.designsystem.components.avatar.CompositeAvatar
|
||||||
|
|
@ -65,21 +66,21 @@ fun SelectedRoom(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
Surface(
|
Surface(
|
||||||
color = MaterialTheme.colorScheme.primary,
|
color = ElementTheme.colors.iconPrimary,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.clip(CircleShape)
|
.clip(CircleShape)
|
||||||
.size(20.dp)
|
.size(20.dp)
|
||||||
.align(Alignment.TopEnd)
|
.align(Alignment.TopEnd)
|
||||||
.clickable(
|
.clickable(
|
||||||
indication = ripple(),
|
indication = ripple(),
|
||||||
interactionSource = remember { MutableInteractionSource() },
|
interactionSource = remember { MutableInteractionSource() },
|
||||||
onClick = { onRemoveRoom(roomInfo) }
|
onClick = { onRemoveRoom(roomInfo) }
|
||||||
),
|
),
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = CompoundIcons.Close(),
|
imageVector = CompoundIcons.Close(),
|
||||||
contentDescription = stringResource(id = CommonStrings.action_remove),
|
contentDescription = stringResource(id = CommonStrings.action_remove),
|
||||||
tint = MaterialTheme.colorScheme.onPrimary,
|
tint = ElementTheme.colors.iconOnSolidPrimary,
|
||||||
modifier = Modifier.padding(2.dp)
|
modifier = Modifier.padding(2.dp)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.heightIn
|
import androidx.compose.foundation.layout.heightIn
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
|
@ -58,7 +57,7 @@ fun UnresolvedUserRow(
|
||||||
text = id,
|
text = id,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
color = MaterialTheme.colorScheme.primary,
|
color = ElementTheme.colors.textPrimary,
|
||||||
style = ElementTheme.typography.fontBodyLgMedium,
|
style = ElementTheme.typography.fontBodyLgMedium,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -75,12 +74,11 @@ fun UnresolvedUserRow(
|
||||||
.size(18.dp)
|
.size(18.dp)
|
||||||
.align(Alignment.Top)
|
.align(Alignment.Top)
|
||||||
.padding(2.dp),
|
.padding(2.dp),
|
||||||
tint = MaterialTheme.colorScheme.error,
|
tint = ElementTheme.colors.iconCriticalPrimary,
|
||||||
)
|
)
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
text = stringResource(CommonStrings.common_invite_unknown_profile),
|
text = stringResource(CommonStrings.common_invite_unknown_profile),
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
style = ElementTheme.typography.fontBodySmRegular.copy(lineHeight = 16.sp),
|
style = ElementTheme.typography.fontBodySmRegular.copy(lineHeight = 16.sp),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ fun UnsavedAvatar(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.align(Alignment.Center)
|
.align(Alignment.Center)
|
||||||
.size(40.dp),
|
.size(40.dp),
|
||||||
tint = MaterialTheme.colorScheme.secondary,
|
tint = ElementTheme.colors.iconSecondary,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.heightIn
|
import androidx.compose.foundation.layout.heightIn
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
|
@ -51,14 +50,14 @@ internal fun UserRow(
|
||||||
text = name,
|
text = name,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
color = MaterialTheme.colorScheme.primary,
|
color = ElementTheme.colors.textPrimary,
|
||||||
style = ElementTheme.typography.fontBodyLgRegular,
|
style = ElementTheme.typography.fontBodyLgRegular,
|
||||||
)
|
)
|
||||||
// Id
|
// Id
|
||||||
subtext?.let {
|
subtext?.let {
|
||||||
Text(
|
Text(
|
||||||
text = subtext,
|
text = subtext,
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
style = ElementTheme.typography.fontBodySmRegular,
|
style = ElementTheme.typography.fontBodySmRegular,
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,7 @@ private fun ReplyToErrorContent(
|
||||||
Text(
|
Text(
|
||||||
text = data.message,
|
text = data.message,
|
||||||
style = ElementTheme.typography.fontBodyMdRegular,
|
style = ElementTheme.typography.fontBodyMdRegular,
|
||||||
color = MaterialTheme.colorScheme.error,
|
color = ElementTheme.colors.textCriticalPrimary,
|
||||||
maxLines = 2,
|
maxLines = 2,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
)
|
)
|
||||||
|
|
@ -171,7 +171,7 @@ private fun ReplyToContentText(metadata: InReplyToMetadata?) {
|
||||||
if (iconResourceId != null) {
|
if (iconResourceId != null) {
|
||||||
Icon(
|
Icon(
|
||||||
resourceId = iconResourceId,
|
resourceId = iconResourceId,
|
||||||
tint = MaterialTheme.colorScheme.secondary,
|
tint = ElementTheme.colors.iconSecondary,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
modifier = Modifier.size(16.dp)
|
modifier = Modifier.size(16.dp)
|
||||||
)
|
)
|
||||||
|
|
@ -182,7 +182,7 @@ private fun ReplyToContentText(metadata: InReplyToMetadata?) {
|
||||||
style = ElementTheme.typography.fontBodyMdRegular,
|
style = ElementTheme.typography.fontBodyMdRegular,
|
||||||
fontStyle = fontStyle,
|
fontStyle = fontStyle,
|
||||||
textAlign = TextAlign.Start,
|
textAlign = TextAlign.Start,
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
maxLines = 2,
|
maxLines = 2,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ package io.element.android.libraries.matrix.ui.messages.sender
|
||||||
import androidx.compose.foundation.layout.Arrangement
|
import androidx.compose.foundation.layout.Arrangement
|
||||||
import androidx.compose.foundation.layout.Row
|
import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.RowScope
|
import androidx.compose.foundation.layout.RowScope
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
|
@ -77,7 +76,7 @@ private fun RowScope.MainText(
|
||||||
val color = when (mode) {
|
val color = when (mode) {
|
||||||
is SenderNameMode.Timeline -> mode.mainColor
|
is SenderNameMode.Timeline -> mode.mainColor
|
||||||
SenderNameMode.ActionList,
|
SenderNameMode.ActionList,
|
||||||
SenderNameMode.Reply -> MaterialTheme.colorScheme.primary
|
SenderNameMode.Reply -> ElementTheme.colors.textPrimary
|
||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
modifier = modifier.clipToBounds(),
|
modifier = modifier.clipToBounds(),
|
||||||
|
|
@ -108,7 +107,7 @@ private fun RowScope.SecondaryText(
|
||||||
modifier = modifier.clipToBounds(),
|
modifier = modifier.clipToBounds(),
|
||||||
text = text,
|
text = text,
|
||||||
style = style,
|
style = style,
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@
|
||||||
|
|
||||||
package io.element.android.libraries.matrix.ui.model
|
package io.element.android.libraries.matrix.ui.model
|
||||||
|
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.Immutable
|
import androidx.compose.runtime.Immutable
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
|
|
@ -15,6 +14,7 @@ import androidx.compose.ui.res.stringResource
|
||||||
import androidx.compose.ui.text.AnnotatedString
|
import androidx.compose.ui.text.AnnotatedString
|
||||||
import androidx.compose.ui.text.SpanStyle
|
import androidx.compose.ui.text.SpanStyle
|
||||||
import androidx.compose.ui.text.font.FontWeight
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
|
import io.element.android.compound.theme.ElementTheme
|
||||||
import io.element.android.libraries.designsystem.components.avatar.AvatarData
|
import io.element.android.libraries.designsystem.components.avatar.AvatarData
|
||||||
import io.element.android.libraries.designsystem.components.avatar.AvatarSize
|
import io.element.android.libraries.designsystem.components.avatar.AvatarSize
|
||||||
import io.element.android.libraries.matrix.api.core.UserId
|
import io.element.android.libraries.matrix.api.core.UserId
|
||||||
|
|
@ -37,7 +37,7 @@ data class InviteSender(
|
||||||
AnnotatedString.Range(
|
AnnotatedString.Range(
|
||||||
SpanStyle(
|
SpanStyle(
|
||||||
fontWeight = FontWeight.Medium,
|
fontWeight = FontWeight.Medium,
|
||||||
color = MaterialTheme.colorScheme.primary
|
color = ElementTheme.colors.textPrimary
|
||||||
),
|
),
|
||||||
start = senderNameStart,
|
start = senderNameStart,
|
||||||
end = senderNameStart + displayName.length
|
end = senderNameStart + displayName.length
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.material3.Text
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
|
|
@ -141,7 +140,7 @@ private fun MediaRow(
|
||||||
// Info
|
// Info
|
||||||
Text(
|
Text(
|
||||||
text = state.mediaInfo.mimeType + " - " + state.mediaInfo.formattedFileSize,
|
text = state.mediaInfo.mimeType + " - " + state.mediaInfo.formattedFileSize,
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
style = ElementTheme.typography.fontBodySmRegular,
|
style = ElementTheme.typography.fontBodySmRegular,
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@ import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.material3.Text
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
|
|
@ -165,7 +164,7 @@ private fun SenderRow(
|
||||||
// Id
|
// Id
|
||||||
Text(
|
Text(
|
||||||
text = mediaInfo.senderId?.value.orEmpty(),
|
text = mediaInfo.senderId?.value.orEmpty(),
|
||||||
color = MaterialTheme.colorScheme.secondary,
|
color = ElementTheme.colors.textSecondary,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
style = ElementTheme.typography.fontBodyMdRegular,
|
style = ElementTheme.typography.fontBodyMdRegular,
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ import androidx.compose.foundation.shape.CircleShape
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.outlined.GraphicEq
|
import androidx.compose.material.icons.outlined.GraphicEq
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.LaunchedEffect
|
import androidx.compose.runtime.LaunchedEffect
|
||||||
import androidx.compose.runtime.derivedStateOf
|
import androidx.compose.runtime.derivedStateOf
|
||||||
|
|
@ -261,13 +260,13 @@ private fun ExoPlayerMediaAudioView(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.size(72.dp)
|
.size(72.dp)
|
||||||
.clip(CircleShape)
|
.clip(CircleShape)
|
||||||
.background(MaterialTheme.colorScheme.onBackground),
|
.background(ElementTheme.colors.iconPrimary),
|
||||||
contentAlignment = Alignment.Center,
|
contentAlignment = Alignment.Center,
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = Icons.Outlined.GraphicEq,
|
imageVector = Icons.Outlined.GraphicEq,
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = MaterialTheme.colorScheme.background,
|
tint = ElementTheme.colors.iconOnSolidPrimary,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.size(32.dp),
|
.size(32.dp),
|
||||||
)
|
)
|
||||||
|
|
@ -335,7 +334,7 @@ private fun AudioInfoView(
|
||||||
style = ElementTheme.typography.fontBodyMdRegular,
|
style = ElementTheme.typography.fontBodyMdRegular,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
color = MaterialTheme.colorScheme.primary
|
color = ElementTheme.colors.textPrimary
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (info != null) {
|
if (info != null) {
|
||||||
|
|
@ -346,7 +345,7 @@ private fun AudioInfoView(
|
||||||
style = ElementTheme.typography.fontBodyLgRegular,
|
style = ElementTheme.typography.fontBodyLgRegular,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
color = MaterialTheme.colorScheme.primary
|
color = ElementTheme.colors.textPrimary
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(4.dp))
|
Spacer(modifier = Modifier.height(4.dp))
|
||||||
Text(
|
Text(
|
||||||
|
|
@ -354,7 +353,7 @@ private fun AudioInfoView(
|
||||||
style = ElementTheme.typography.fontBodyMdRegular,
|
style = ElementTheme.typography.fontBodyMdRegular,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
color = MaterialTheme.colorScheme.primary
|
color = ElementTheme.colors.textPrimary
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@ import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.foundation.shape.CircleShape
|
import androidx.compose.foundation.shape.CircleShape
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.outlined.GraphicEq
|
import androidx.compose.material.icons.outlined.GraphicEq
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
|
|
@ -72,13 +71,13 @@ fun MediaFileView(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.size(72.dp)
|
.size(72.dp)
|
||||||
.clip(CircleShape)
|
.clip(CircleShape)
|
||||||
.background(MaterialTheme.colorScheme.onBackground),
|
.background(ElementTheme.colors.iconPrimary),
|
||||||
contentAlignment = Alignment.Center,
|
contentAlignment = Alignment.Center,
|
||||||
) {
|
) {
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = if (isAudio) Icons.Outlined.GraphicEq else CompoundIcons.Attachment(),
|
imageVector = if (isAudio) Icons.Outlined.GraphicEq else CompoundIcons.Attachment(),
|
||||||
contentDescription = null,
|
contentDescription = null,
|
||||||
tint = MaterialTheme.colorScheme.background,
|
tint = ElementTheme.colors.iconOnSolidPrimary,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.size(32.dp)
|
.size(32.dp)
|
||||||
.rotate(if (isAudio) 0f else -45f),
|
.rotate(if (isAudio) 0f else -45f),
|
||||||
|
|
@ -92,7 +91,7 @@ fun MediaFileView(
|
||||||
style = ElementTheme.typography.fontBodyLgRegular,
|
style = ElementTheme.typography.fontBodyLgRegular,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
color = MaterialTheme.colorScheme.primary
|
color = ElementTheme.colors.textPrimary
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(4.dp))
|
Spacer(modifier = Modifier.height(4.dp))
|
||||||
Text(
|
Text(
|
||||||
|
|
@ -100,7 +99,7 @@ fun MediaFileView(
|
||||||
style = ElementTheme.typography.fontBodyMdRegular,
|
style = ElementTheme.typography.fontBodyMdRegular,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis,
|
||||||
color = MaterialTheme.colorScheme.primary
|
color = ElementTheme.colors.textPrimary
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,7 @@ private fun ReplyToModeView(
|
||||||
Icon(
|
Icon(
|
||||||
imageVector = CompoundIcons.Close(),
|
imageVector = CompoundIcons.Close(),
|
||||||
contentDescription = stringResource(CommonStrings.action_close),
|
contentDescription = stringResource(CommonStrings.action_close),
|
||||||
tint = MaterialTheme.colorScheme.secondary,
|
tint = ElementTheme.colors.iconSecondary,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(end = 4.dp, top = 4.dp, start = 8.dp, bottom = 16.dp)
|
.padding(end = 4.dp, top = 4.dp, start = 8.dp, bottom = 16.dp)
|
||||||
.size(16.dp)
|
.size(16.dp)
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ import android.content.res.Configuration
|
||||||
import android.os.LocaleList
|
import android.os.LocaleList
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.CompositionLocalProvider
|
import androidx.compose.runtime.CompositionLocalProvider
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.platform.LocalConfiguration
|
import androidx.compose.ui.platform.LocalConfiguration
|
||||||
|
|
@ -55,7 +54,7 @@ object ScreenshotTest {
|
||||||
ElementTheme {
|
ElementTheme {
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.background(MaterialTheme.colorScheme.background)
|
.background(ElementTheme.colors.bgCanvasDefault)
|
||||||
) {
|
) {
|
||||||
preview()
|
preview()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME}#end
|
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME}#end
|
||||||
|
|
||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
import androidx.compose.material3.MaterialTheme
|
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.tooling.preview.Preview
|
import androidx.compose.ui.tooling.preview.Preview
|
||||||
import androidx.compose.ui.tooling.preview.PreviewParameter
|
import androidx.compose.ui.tooling.preview.PreviewParameter
|
||||||
|
import io.element.android.compound.theme.ElementTheme
|
||||||
import io.element.android.libraries.designsystem.preview.ElementPreview
|
import io.element.android.libraries.designsystem.preview.ElementPreview
|
||||||
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
|
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
|
||||||
import io.element.android.libraries.designsystem.theme.components.Text
|
import io.element.android.libraries.designsystem.theme.components.Text
|
||||||
|
|
@ -19,7 +19,7 @@ fun ${NAME}View(
|
||||||
Box(modifier, contentAlignment = Alignment.Center) {
|
Box(modifier, contentAlignment = Alignment.Center) {
|
||||||
Text(
|
Text(
|
||||||
"${NAME} feature view",
|
"${NAME} feature view",
|
||||||
color = MaterialTheme.colorScheme.primary,
|
color = ElementTheme.colors.textprimary,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue