From 1e44b1a235ec5caefbca459e9f63a1d96ba5951c Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Mon, 14 Feb 2022 22:00:17 +0200 Subject: [PATCH] Fixed misplaced back arrow --- core/src/com/unciv/ui/utils/IconTextButton.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/com/unciv/ui/utils/IconTextButton.kt b/core/src/com/unciv/ui/utils/IconTextButton.kt index 72a50051a3..437e2b02a8 100644 --- a/core/src/com/unciv/ui/utils/IconTextButton.kt +++ b/core/src/com/unciv/ui/utils/IconTextButton.kt @@ -5,6 +5,7 @@ import com.badlogic.gdx.scenes.scene2d.Actor import com.badlogic.gdx.scenes.scene2d.ui.Button import com.badlogic.gdx.scenes.scene2d.ui.Cell import com.badlogic.gdx.scenes.scene2d.ui.Label +import com.badlogic.gdx.utils.Align import com.unciv.Constants /** @@ -22,10 +23,10 @@ class IconTextButton(text: String, val icon: Actor? = null, fontSize: Int = Cons /** Table cell containing the [icon] if any, or `null`. */ val iconCell: Cell? = if (icon != null) { val size = fontSize.toFloat() + icon.setSize(size,size) + icon.setOrigin(Align.center) add(icon).size(size).padRight(size / 3) - } else { - null - } + } else null /** Table cell instance containing the [label]. */ val labelCell: Cell