forked from townforge/townforge
game: fix auction screen layout with large item count
This commit is contained in:
parent
7f27bbdd13
commit
47757ab641
@ -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"
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user