Update trade UI. (#8185)

* delete unnecessary icon space.

* replace table fixed size with preferred size.
This commit is contained in:
nacro711072
2022-12-19 22:11:11 +08:00
committed by GitHub
parent 1f284fee57
commit e159b400b1
2 changed files with 4 additions and 3 deletions

View File

@ -59,8 +59,8 @@ class OfferColumnsTable(private val tradeLogic: TradeLogic, val screen: Diplomac
add("Our items".tr())
add("[${tradeLogic.otherCivilization.civName}]'s items".tr()).row()
add(ourAvailableOffersTable).size(columnWidth, screen.stage.height / 2)
add(theirAvailableOffersTable).size(columnWidth, screen.stage.height / 2).row()
add(ourAvailableOffersTable).prefSize(columnWidth, screen.stage.height / 2)
add(theirAvailableOffersTable).prefSize(columnWidth, screen.stage.height / 2).row()
addSeparator().height(2f)

View File

@ -96,7 +96,8 @@ class OffersListScroll(
else -> null
}
val tradeButton = IconTextButton(tradeLabel, tradeIcon).apply {
iconCell?.size(30f)
if (tradeIcon != null)
iconCell.size(30f)
label.setAlignment(Align.center)
labelCell.pad(5f).grow()
}