diff --git a/ui/src/main/java/com/theoplayer/android/ui/LiveButton.kt b/ui/src/main/java/com/theoplayer/android/ui/LiveButton.kt index 68d2c41..ad0ad9f 100644 --- a/ui/src/main/java/com/theoplayer/android/ui/LiveButton.kt +++ b/ui/src/main/java/com/theoplayer/android/ui/LiveButton.kt @@ -2,7 +2,9 @@ package com.theoplayer.android.ui import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.RowScope +import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.width import androidx.compose.material.icons.Icons import androidx.compose.material.icons.rounded.Circle import androidx.compose.material3.ButtonColors @@ -13,6 +15,7 @@ import androidx.compose.material3.IconButtonDefaults import androidx.compose.material3.Text import androidx.compose.material3.TextButton import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp @@ -43,20 +46,38 @@ fun LiveButton( live: @Composable RowScope.() -> Unit = { Icon( Icons.Rounded.Circle, - modifier = Modifier.size(12.dp), + modifier = Modifier + .size(12.dp) + .align(Alignment.CenterVertically), tint = THEOplayerTheme.playerColors.liveButtonLive, contentDescription = null ) - Text(text = " " + stringResource(R.string.theoplayer_ui_btn_live)) + Spacer( + modifier = Modifier + .width(4.dp) + ) + Text( + modifier = Modifier.align(Alignment.CenterVertically), + text = stringResource(R.string.theoplayer_ui_btn_live) + ) }, dvr: @Composable RowScope. () -> Unit = { Icon( Icons.Rounded.Circle, - modifier = Modifier.size(12.dp), + modifier = Modifier + .size(12.dp) + .align(Alignment.CenterVertically), tint = THEOplayerTheme.playerColors.liveButtonDvr, contentDescription = null ) - Text(text = " " + stringResource(R.string.theoplayer_ui_btn_live)) + Spacer( + modifier = Modifier + .width(4.dp) + ) + Text( + modifier = Modifier.align(Alignment.CenterVertically), + text = stringResource(R.string.theoplayer_ui_btn_live) + ) } ) { val player = Player.current