Skip to content

Commit

Permalink
Tweak LiveButton alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
MattiasBuelens committed Dec 16, 2024
1 parent e9dbc6f commit 24f4bce
Showing 1 changed file with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions ui/src/main/java/com/theoplayer/android/ui/LiveButton.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 24f4bce

Please sign in to comment.