ElementTheme + MaterialTheme3
This commit is contained in:
parent
1f44550624
commit
decd3a9585
52 changed files with 202 additions and 446 deletions
|
|
@ -27,6 +27,7 @@ import androidx.compose.material.icons.filled.Close
|
|||
import androidx.compose.material.icons.filled.Search
|
||||
import androidx.compose.material.icons.filled.Settings
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.TopAppBarScrollBehavior
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
|
|
@ -45,7 +46,6 @@ import androidx.compose.ui.text.font.FontWeight
|
|||
import androidx.compose.ui.unit.sp
|
||||
import io.element.android.libraries.designsystem.components.avatar.Avatar
|
||||
import io.element.android.libraries.designsystem.components.form.textFieldState
|
||||
import io.element.android.libraries.designsystem.theme.ElementTheme
|
||||
import io.element.android.libraries.designsystem.theme.components.Icon
|
||||
import io.element.android.libraries.designsystem.theme.components.IconButton
|
||||
import io.element.android.libraries.designsystem.theme.components.MediumTopAppBar
|
||||
|
|
@ -130,7 +130,7 @@ fun SearchRoomListTopBar(
|
|||
placeholder = {
|
||||
Text(
|
||||
text = "Search",
|
||||
color = ElementTheme.colors.onBackground.copy(alpha = ContentAlpha.medium)
|
||||
color = MaterialTheme.colorScheme.onBackground.copy(alpha = ContentAlpha.medium)
|
||||
)
|
||||
},
|
||||
singleLine = true,
|
||||
|
|
@ -144,7 +144,7 @@ fun SearchRoomListTopBar(
|
|||
Icon(
|
||||
imageVector = Icons.Default.Close,
|
||||
contentDescription = "clear",
|
||||
tint = ElementTheme.colors.onBackground
|
||||
tint = MaterialTheme.colorScheme.onBackground
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -160,7 +160,7 @@ fun SearchRoomListTopBar(
|
|||
Icon(
|
||||
imageVector = Icons.Default.ArrowBack,
|
||||
contentDescription = "close",
|
||||
tint = ElementTheme.colors.onBackground
|
||||
tint = MaterialTheme.colorScheme.onBackground
|
||||
)
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ import androidx.compose.foundation.layout.padding
|
|||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.material.ripple.rememberRipple
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Alignment
|
||||
|
|
@ -103,7 +104,7 @@ internal fun DefaultRoomSummaryRow(
|
|||
modifier = Modifier.placeholder(
|
||||
visible = room.isPlaceholder,
|
||||
shape = CircleShape,
|
||||
color = ElementTheme.colors.roomListPlaceHolder,
|
||||
color = ElementTheme.colors.roomListPlaceHolder(),
|
||||
)
|
||||
)
|
||||
Column(
|
||||
|
|
@ -117,12 +118,12 @@ internal fun DefaultRoomSummaryRow(
|
|||
modifier = Modifier.placeholder(
|
||||
visible = room.isPlaceholder,
|
||||
shape = TextPlaceholderShape,
|
||||
color = ElementTheme.colors.roomListPlaceHolder,
|
||||
color = ElementTheme.colors.roomListPlaceHolder(),
|
||||
),
|
||||
fontSize = 16.sp,
|
||||
fontWeight = FontWeight.SemiBold,
|
||||
text = room.name,
|
||||
color = ElementTheme.colors.roomListRoomName,
|
||||
color = MaterialTheme.roomListRoomName(),
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis
|
||||
)
|
||||
|
|
@ -131,10 +132,10 @@ internal fun DefaultRoomSummaryRow(
|
|||
modifier = Modifier.placeholder(
|
||||
visible = room.isPlaceholder,
|
||||
shape = TextPlaceholderShape,
|
||||
color = ElementTheme.colors.roomListPlaceHolder,
|
||||
color = ElementTheme.colors.roomListPlaceHolder(),
|
||||
),
|
||||
text = room.lastMessage?.toString().orEmpty(),
|
||||
color = ElementTheme.colors.roomListRoomMessage,
|
||||
color = MaterialTheme.roomListRoomMessage(),
|
||||
fontSize = 14.sp,
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis
|
||||
|
|
@ -149,15 +150,15 @@ internal fun DefaultRoomSummaryRow(
|
|||
modifier = Modifier.placeholder(
|
||||
visible = room.isPlaceholder,
|
||||
shape = TextPlaceholderShape,
|
||||
color = ElementTheme.colors.roomListPlaceHolder,
|
||||
color = ElementTheme.colors.roomListPlaceHolder(),
|
||||
),
|
||||
fontSize = 12.sp,
|
||||
text = room.timestamp ?: "",
|
||||
color = ElementTheme.colors.roomListRoomMessageDate,
|
||||
color = MaterialTheme.roomListRoomMessageDate(),
|
||||
)
|
||||
Spacer(Modifier.size(4.dp))
|
||||
val unreadIndicatorColor =
|
||||
if (room.hasUnread) ElementTheme.colors.roomListUnreadIndicator else Color.Transparent
|
||||
if (room.hasUnread) MaterialTheme.roomListUnreadIndicator() else Color.Transparent
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.size(12.dp)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue