Removes the need to draw a background with the theme's background color on the verification symbol
@@ -25,7 +25,6 @@ import androidx.compose.foundation.layout.width
|
||||
import androidx.compose.foundation.layout.widthIn
|
||||
import androidx.compose.foundation.pager.PagerState
|
||||
import androidx.compose.foundation.pager.rememberPagerState
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.foundation.text.InlineTextContent
|
||||
import androidx.compose.foundation.text.appendInlineContent
|
||||
import androidx.compose.material.Icon
|
||||
@@ -48,7 +47,6 @@ import androidx.compose.runtime.rememberCoroutineScope
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.platform.LocalClipboardManager
|
||||
@@ -599,15 +597,7 @@ private fun HashVerificationSymbol(verifiedHash: Boolean, modifier: Modifier) {
|
||||
.height(40.dp)
|
||||
.padding(10.dp)
|
||||
) {
|
||||
Box(
|
||||
Modifier
|
||||
.clip(CircleShape)
|
||||
.fillMaxSize(0.6f)
|
||||
.align(Alignment.Center)
|
||||
.background(MaterialTheme.colors.background)
|
||||
)
|
||||
|
||||
if (verifiedHash == true) {
|
||||
if (verifiedHash) {
|
||||
IconButton(
|
||||
onClick = {
|
||||
scope.launch {
|
||||
@@ -626,7 +616,7 @@ private fun HashVerificationSymbol(verifiedHash: Boolean, modifier: Modifier) {
|
||||
modifier = Modifier.size(30.dp)
|
||||
)
|
||||
}
|
||||
} else if (verifiedHash == false) {
|
||||
} else {
|
||||
IconButton(
|
||||
onClick = {
|
||||
scope.launch {
|
||||
|
@@ -3240,30 +3240,12 @@ fun FollowingIcon(iconSize: Dp) {
|
||||
Modifier.size(iconSize)
|
||||
}
|
||||
|
||||
val backgroundColor = MaterialTheme.colors.background
|
||||
|
||||
val myIconBackgroundModifier = remember {
|
||||
Modifier
|
||||
.clip(CircleShape)
|
||||
.size(iconSize.times(0.6f))
|
||||
.drawBehind { drawRect(backgroundColor) }
|
||||
}
|
||||
|
||||
FollowingIcon(modifier, myIconBackgroundModifier)
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun FollowingIcon(modifier: Modifier, myIconBackgroundModifier: Modifier) {
|
||||
Box(modifier = modifier, contentAlignment = Alignment.Center) {
|
||||
Box(myIconBackgroundModifier)
|
||||
|
||||
Icon(
|
||||
painter = painterResource(R.drawable.ic_verified),
|
||||
stringResource(id = R.string.following),
|
||||
modifier = modifier,
|
||||
tint = Following
|
||||
)
|
||||
}
|
||||
Icon(
|
||||
painter = painterResource(R.drawable.ic_verified),
|
||||
stringResource(id = R.string.following),
|
||||
modifier = modifier,
|
||||
tint = Following
|
||||
)
|
||||
}
|
||||
|
||||
@Immutable
|
||||
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 5.5 KiB |
BIN
app/src/main/res/drawable-hdpi/ic_verified_transparent.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 5.1 KiB |
BIN
app/src/main/res/drawable-mdpi/ic_verified_transparent.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/drawable-night-hdpi/ic_verified.png
Normal file
After Width: | Height: | Size: 5.5 KiB |
BIN
app/src/main/res/drawable-night-mdpi/ic_verified.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
app/src/main/res/drawable-night-xhdpi/ic_verified.png
Normal file
After Width: | Height: | Size: 6.4 KiB |
BIN
app/src/main/res/drawable-night-xxhdpi/ic_verified.png
Normal file
After Width: | Height: | Size: 7.1 KiB |
BIN
app/src/main/res/drawable-night-xxxhdpi/ic_verified.png
Normal file
After Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 6.3 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_verified_transparent.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 7.0 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_verified_transparent.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 8.8 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/ic_verified_transparent.png
Normal file
After Width: | Height: | Size: 5.9 KiB |