From 0cdf3cc5a3f7861e577545fb348d269de4b59bd3 Mon Sep 17 00:00:00 2001 From: Joffrey Bion Date: Sun, 22 Mar 2020 20:44:51 +0100 Subject: FIx lobby items alignment --- .../sevenwonders/ui/components/lobby/RadialPlayerList.kt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'sw-ui-kt') diff --git a/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/components/lobby/RadialPlayerList.kt b/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/components/lobby/RadialPlayerList.kt index 78f7fbed..d243d901 100644 --- a/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/components/lobby/RadialPlayerList.kt +++ b/sw-ui-kt/src/main/kotlin/org/luxons/sevenwonders/ui/components/lobby/RadialPlayerList.kt @@ -4,8 +4,10 @@ import com.palantir.blueprintjs.IconName import com.palantir.blueprintjs.Intent import com.palantir.blueprintjs.icon import kotlinx.css.Align +import kotlinx.css.Display import kotlinx.css.FlexDirection -import kotlinx.css.alignContent +import kotlinx.css.alignItems +import kotlinx.css.display import kotlinx.css.flexDirection import kotlinx.css.margin import kotlinx.css.opacity @@ -67,8 +69,9 @@ private fun PlayerDTO?.elementBuilder(): ElementBuilder { private fun RBuilder.playerItem(player: PlayerDTO): ReactElement = styledDiv { css { + display = Display.flex flexDirection = FlexDirection.column - alignContent = Align.center + alignItems = Align.center } val title = if (player.isGameOwner) "Game owner" else null userIcon(isUser = player.isUser, isOwner = player.isGameOwner, title = title) @@ -82,8 +85,9 @@ private fun RBuilder.playerItem(player: PlayerDTO): ReactElement = styledDiv { private fun RBuilder.playerPlaceholder(): ReactElement = styledDiv { css { + display = Display.flex flexDirection = FlexDirection.column - alignContent = Align.center + alignItems = Align.center opacity = 0.3 } userIcon(isUser = false, isOwner = false, title = "Waiting for player...") -- cgit