Skip to content

Commit

Permalink
Update trade UI. (#8185)
Browse files Browse the repository at this point in the history
* delete unnecessary icon space.

* replace table fixed size with preferred size.
  • Loading branch information
nacro711072 authored Dec 19, 2022
1 parent 1f284fe commit e159b40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions core/src/com/unciv/ui/trade/OfferColumnsTable.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
3 changes: 2 additions & 1 deletion core/src/com/unciv/ui/trade/OffersListScroll.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit e159b40

Please sign in to comment.