Skip to content

Commit

Permalink
fix: design review adjustments for scroll to bottom (#2368)
Browse files Browse the repository at this point in the history
  • Loading branch information
yamilmedina committed Oct 24, 2023
1 parent 6b22ade commit 3d8626b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import androidx.compose.foundation.lazy.LazyListState
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.KeyboardArrowDown
import androidx.compose.material3.FloatingActionButtonDefaults
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
Expand Down Expand Up @@ -912,9 +913,17 @@ fun JumpToLastMessageButton(
) {
SmallFloatingActionButton(
onClick = { coroutineScope.launch { lazyListState.animateScrollToItem(0) } },
containerColor = MaterialTheme.wireColorScheme.onSecondaryButtonDisabled,
contentColor = MaterialTheme.wireColorScheme.secondaryButtonDisabled,
containerColor = MaterialTheme.wireColorScheme.scrollToBottomButtonColor,
contentColor = MaterialTheme.wireColorScheme.onScrollToBottomButtonColor,
shape = CircleShape,
elevation = FloatingActionButtonDefaults.elevation(dimensions().spacing0x),
modifier = Modifier
.padding(
PaddingValues(
bottom = dimensions().typingIndicatorHeight + dimensions().spacing8x,
end = dimensions().spacing16x
)
)
) {
Icon(
imageVector = Icons.Default.KeyboardArrowDown,
Expand Down
12 changes: 9 additions & 3 deletions app/src/main/kotlin/com/wire/android/ui/theme/WireColorScheme.kt
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ data class WireColorScheme(
val unclassifiedBannerBackgroundColor: Color,
val unclassifiedBannerForegroundColor: Color,
val recordAudioStartColor: Color,
val recordAudioStopColor: Color
val recordAudioStopColor: Color,
val scrollToBottomButtonColor: Color,
val onScrollToBottomButtonColor: Color,
) {
fun toColorScheme(): ColorScheme = ColorScheme(
primary = primary,
Expand Down Expand Up @@ -231,7 +233,9 @@ private val LightWireColorScheme = WireColorScheme(
unclassifiedBannerBackgroundColor = WireColorPalette.LightRed600,
unclassifiedBannerForegroundColor = Color.White,
recordAudioStartColor = WireColorPalette.LightBlue500,
recordAudioStopColor = WireColorPalette.LightRed500
recordAudioStopColor = WireColorPalette.LightRed500,
scrollToBottomButtonColor = WireColorPalette.Gray70,
onScrollToBottomButtonColor = Color.White,
)

// Dark WireColorScheme
Expand Down Expand Up @@ -336,7 +340,9 @@ private val DarkWireColorScheme = WireColorScheme(
unclassifiedBannerBackgroundColor = WireColorPalette.DarkRed500,
unclassifiedBannerForegroundColor = Color.Black,
recordAudioStartColor = WireColorPalette.LightBlue500,
recordAudioStopColor = WireColorPalette.LightRed500
recordAudioStopColor = WireColorPalette.LightRed500,
scrollToBottomButtonColor = WireColorPalette.Gray60,
onScrollToBottomButtonColor = Color.Black,
)

@PackagePrivate
Expand Down

0 comments on commit 3d8626b

Please sign in to comment.