mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-08-29 07:16:08 +00:00
icons
This commit is contained in:
parent
352dd6e93f
commit
34175988a5
3
app/src/main/assets/design-icons/star-filled.svg
Normal file
3
app/src/main/assets/design-icons/star-filled.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
||||
<path transform="translate(-16 -446)" d="M26 446.925L28.1637 453.836H35.375L29.645 458.143L31.8975 465.075L26 460.79L20.1025 465.075L22.355 458.143L16.625 453.836H23.8363L26 446.925Z" fill="currentColor" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 388 B |
@ -58,13 +58,12 @@ import com.bitchat.android.ui.theme.LocalBitchatPalette
|
||||
val ChatHeaderHeight = 52.dp
|
||||
|
||||
/**
|
||||
* The single icon size used by every glyph in the top bar.
|
||||
* The single visible glyph size used by every icon in the top bar.
|
||||
*
|
||||
* Previously the bar mixed 12/14/16/18.dp icons, which is why it read as a collection of
|
||||
* unrelated glyphs rather than one control strip. One size for everything, and large enough to
|
||||
* actually see.
|
||||
* The Figma header pairs 16 px icons with compact labels. At our 17sp header scale, 19dp preserves
|
||||
* that icon-to-cap-height relationship without affecting the surrounding 44dp touch targets.
|
||||
*/
|
||||
internal val HeaderIconSize = 22.dp
|
||||
internal val HeaderIconSize = 19.dp
|
||||
|
||||
/**
|
||||
* Text size for the top bar's labels: nickname, channel name, peer count.
|
||||
@ -392,7 +391,7 @@ fun PeerCounter(
|
||||
|
||||
Row(
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.spacedBy(4.dp),
|
||||
horizontalArrangement = Arrangement.spacedBy(6.dp),
|
||||
modifier = modifier
|
||||
.clip(HeaderClusterShape)
|
||||
.pressScaleClickable(onClick = onClick)
|
||||
@ -400,8 +399,8 @@ fun PeerCounter(
|
||||
.padding(horizontal = 6.dp)
|
||||
) {
|
||||
Icon(
|
||||
// A single silhouette rather than a crowd: at 22.dp a multi-person glyph collapses
|
||||
// into an indistinct blob, and the number beside it already conveys "how many".
|
||||
// The extracted people glyph stays legible at the compact header scale; the number
|
||||
// beside it carries the precise count.
|
||||
painter = painterResource(R.drawable.ic_spec_people),
|
||||
contentDescription = when (selectedLocationChannel) {
|
||||
is com.bitchat.android.geohash.ChannelID.Location -> stringResource(R.string.cd_geohash_participants)
|
||||
@ -696,7 +695,7 @@ private fun LocationChannelsButton(
|
||||
|
||||
Row(
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.spacedBy(4.dp),
|
||||
horizontalArrangement = Arrangement.spacedBy(6.dp),
|
||||
modifier = Modifier
|
||||
.clip(HeaderClusterShape)
|
||||
.pressScaleClickable(
|
||||
|
||||
@ -691,7 +691,9 @@ private fun PeerItem(
|
||||
contentAlignment = Alignment.Center
|
||||
) {
|
||||
Icon(
|
||||
painter = painterResource(R.drawable.ic_spec_star),
|
||||
painter = painterResource(
|
||||
if (isFavorite) R.drawable.ic_spec_star_filled else R.drawable.ic_spec_star
|
||||
),
|
||||
contentDescription = if (isFavorite) "Remove from favorites" else "Add to favorites",
|
||||
modifier = Modifier.size(PeerRowIconSize),
|
||||
tint = if (isFavorite) palette.accentOrange else palette.textTertiary
|
||||
@ -1040,7 +1042,13 @@ fun PrivateChatSheet(
|
||||
modifier = Modifier.size(28.dp)
|
||||
) {
|
||||
Icon(
|
||||
painter = painterResource(R.drawable.ic_spec_star),
|
||||
painter = painterResource(
|
||||
if (isFavorite) {
|
||||
R.drawable.ic_spec_star_filled
|
||||
} else {
|
||||
R.drawable.ic_spec_star
|
||||
}
|
||||
),
|
||||
contentDescription = if (isFavorite) stringResource(R.string.cd_remove_favorite) else stringResource(R.string.cd_add_favorite),
|
||||
modifier = Modifier.size(16.dp),
|
||||
tint = if (isFavorite) Color(0xFFFFD700) else colorScheme.onSurface.copy(alpha = 0.6f)
|
||||
|
||||
8
app/src/main/res/drawable/ic_spec_star_filled.xml
Normal file
8
app/src/main/res/drawable/ic_spec_star_filled.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="20dp" android:height="20dp" android:viewportWidth="20" android:viewportHeight="20">
|
||||
<group android:translateX="-16" android:translateY="-446">
|
||||
<path android:fillColor="#FFFFFFFF" android:strokeColor="#FFFFFFFF" android:strokeWidth="1.25"
|
||||
android:strokeLineCap="round" android:strokeLineJoin="round"
|
||||
android:pathData="M26,446.925L28.1637,453.836H35.375L29.645,458.143L31.8975,465.075L26,460.79L20.1025,465.075L22.355,458.143L16.625,453.836H23.8363L26,446.925Z"/>
|
||||
</group>
|
||||
</vector>
|
||||
Loading…
x
Reference in New Issue
Block a user