Skip to content

Commit

Permalink
chore: Center CircularProgressIndicator
Browse files Browse the repository at this point in the history
  • Loading branch information
wba2hi committed Feb 19, 2024
1 parent 5777ca2 commit 292a554
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
Expand All @@ -46,6 +47,7 @@ import org.eclipse.kuksa.companion.feature.connection.viewModel.ConnectionStatus

val StatusBarHeight = 50.dp
private val iconSize = 30.dp
private val progressBarHeight = 25.dp
private val paddingEnd = 5.dp

@Composable
Expand Down Expand Up @@ -85,7 +87,8 @@ fun HorizontalConnectionStatusView(
CircularProgressIndicator(
color = MaterialTheme.colorScheme.error,
modifier = Modifier
.size(iconSize)
.width(iconSize)
.height(progressBarHeight) // otherwise takes to much height => circle is not centered
.padding(end = paddingEnd),
)
}
Expand Down

0 comments on commit 292a554

Please sign in to comment.