game: fix auction screen layout with large item count

This commit is contained in:
Crypto City 2023-03-30 16:08:03 +00:00
parent 7f27bbdd13
commit 47757ab641
2 changed files with 3 additions and 2 deletions

View File

@ -4,4 +4,4 @@ TBLayout: axis: x, size: "available", distribution: "gravity"
TBTextField: id: "type", gravity: "left right"
TBEditField: id: "amount", text: "0"
TBTextField: text: "/"
TBTextField: id: "max-amount", text: "0", text-align: "left"
TBTextField: id: "max-amount", text: "0", text-align: "right"

View File

@ -15,6 +15,7 @@
#include "game/game-state.h"
#include "game/game-wallet.h"
#include "game/game-util.h"
#include "UTBRendererBatcher.h"
#include "caching-source-builder.h"
#include "ui-auction-items.h"
@ -45,7 +46,7 @@ UIAuctionItemsDialog::SelectableItemWidget::SelectableItemWidget(SelectableItemI
font = g_font_manager->GetFontFace(fd);
else
font = g_font_manager->CreateFontFace(fd);
const int width = font->GetStringWidth("000000");
const int width = font->GetStringWidth("000000000");
LayoutParams lp;
lp.min_w = width;
maxAmountWidget->SetLayoutParams(lp);