feat(design) : update send button to match new background
This commit is contained in:
parent
1b20b6cf1a
commit
6e8b9439dd
1 changed files with 5 additions and 19 deletions
|
|
@ -18,10 +18,8 @@ import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.draw.clip
|
import androidx.compose.ui.draw.clip
|
||||||
import androidx.compose.ui.draw.drawWithCache
|
import androidx.compose.ui.draw.drawWithCache
|
||||||
import androidx.compose.ui.geometry.Offset
|
import androidx.compose.ui.geometry.Offset
|
||||||
import androidx.compose.ui.graphics.BlendMode
|
|
||||||
import androidx.compose.ui.graphics.Color
|
import androidx.compose.ui.graphics.Color
|
||||||
import androidx.compose.ui.graphics.LinearGradientShader
|
import androidx.compose.ui.graphics.LinearGradientShader
|
||||||
import androidx.compose.ui.graphics.RadialGradientShader
|
|
||||||
import androidx.compose.ui.graphics.ShaderBrush
|
import androidx.compose.ui.graphics.ShaderBrush
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
|
|
@ -39,6 +37,7 @@ import io.element.android.libraries.ui.strings.CommonStrings
|
||||||
/**
|
/**
|
||||||
* Send button for the message composer.
|
* Send button for the message composer.
|
||||||
* Figma: https://www.figma.com/design/G1xy0HDZKJf5TCRFmKb5d5/Compound-Android-Components?node-id=1956-37575&node-type=frame&m=dev
|
* Figma: https://www.figma.com/design/G1xy0HDZKJf5TCRFmKb5d5/Compound-Android-Components?node-id=1956-37575&node-type=frame&m=dev
|
||||||
|
* Temporary Figma : https://www.figma.com/design/Ni6Ii8YKtmXCKYNE90cC67/Timeline-(new)?node-id=2274-39944&m=dev
|
||||||
*/
|
*/
|
||||||
@Composable
|
@Composable
|
||||||
internal fun SendButton(
|
internal fun SendButton(
|
||||||
|
|
@ -105,18 +104,10 @@ private fun buttonBackgroundModifier() = Modifier.drawWithCache {
|
||||||
from = Offset(0f, 0f),
|
from = Offset(0f, 0f),
|
||||||
to = Offset(0f, height),
|
to = Offset(0f, height),
|
||||||
colors = listOf(
|
colors = listOf(
|
||||||
Color(0xFF0BC491),
|
Color(0xFF79DD98),
|
||||||
Color(0xFF0467DD),
|
Color(0xFF0DBD8B),
|
||||||
)
|
Color(0xFF128585),
|
||||||
)
|
Color(0xFF24446B),
|
||||||
)
|
|
||||||
val radialGradientBrush = ShaderBrush(
|
|
||||||
RadialGradientShader(
|
|
||||||
center = Offset(height / 2f, height / 2f),
|
|
||||||
radius = height / 2f,
|
|
||||||
colors = listOf(
|
|
||||||
Color(0xFF0BC491),
|
|
||||||
Color(0xFF0467DD),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
@ -124,11 +115,6 @@ private fun buttonBackgroundModifier() = Modifier.drawWithCache {
|
||||||
drawRect(
|
drawRect(
|
||||||
brush = verticalGradientBrush,
|
brush = verticalGradientBrush,
|
||||||
)
|
)
|
||||||
drawRect(
|
|
||||||
brush = radialGradientBrush,
|
|
||||||
alpha = 0.4f,
|
|
||||||
blendMode = BlendMode.Overlay,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue