多语言布局:自动缩字、按语言放宽钱包表与手册列表、缩短过长标签
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f5de68aea9
commit
fa8f416545
11 files changed
+70
-23
No files matched your search
@@ -119,6 +119,7 @@ namespace Decentralized
|
||||
b.BeginPanel(w, 26f, align, 0f, 0f);
|
||||
_clear.Add(b.Last.image);
|
||||
b.AddLabel(header ? "<b>" + text + "</b>" : text);
|
||||
PledgerSkin.FitCurrent(b);
|
||||
b.End();
|
||||
}
|
||||
|
||||
@@ -984,7 +985,7 @@ namespace Decentralized
|
||||
{
|
||||
var d = Session.Data;
|
||||
b.AddLabel(L.T("wallets.count", d.Wallets.Count, Tuning.WalletMax), "wallets_count_dim");
|
||||
var cols = new[] { 100f, 110f, 85f, 70f, 375f };
|
||||
var cols = L.Wide ? new[] { 100f, 92f, 62f, 62f, 372f } : new[] { 100f, 110f, 85f, 70f, 375f };
|
||||
var aligns = new[] { TextAnchor.MiddleLeft, TextAnchor.MiddleLeft, TextAnchor.MiddleRight, TextAnchor.MiddleRight, TextAnchor.MiddleLeft };
|
||||
TableHeader(b, 740f, cols, aligns, L.T("wallets.col.name"), L.T("wallets.col.addr"), L.T("col.value"), L.T("wallets.col.taint"), "");
|
||||
for (int i = 0; i < d.Wallets.Count; i++)
|
||||
@@ -1009,7 +1010,7 @@ namespace Decentralized
|
||||
Cell(b, cols[3], Fmt.Credits(w.Taint), false, TextAnchor.MiddleRight);
|
||||
b.End();
|
||||
b.End();
|
||||
b.BeginPanel(cols[4] - 150f, 32f, TextAnchor.MiddleLeft, 0f, 0f);
|
||||
b.BeginPanel(cols[4] - (L.Wide ? 112f : 150f), 32f, TextAnchor.MiddleLeft, 0f, 0f);
|
||||
_clear.Add(b.Last.image);
|
||||
b.BeginRow(4f, TextAnchor.MiddleLeft);
|
||||
RowKey(b, L.T("wallets.open"), () => WalletWindow.Open(w));
|
||||
@@ -1018,11 +1019,11 @@ namespace Decentralized
|
||||
if (idx > 0) RowKey(b, _destroyPick == w.Address ? L.T("wallets.destroy.sure") : L.T("wallets.destroy"), () => DestroyWallet(w));
|
||||
b.End();
|
||||
b.End();
|
||||
b.BeginPanel(84f, 32f, TextAnchor.MiddleRight, 0f, 0f);
|
||||
b.BeginPanel(L.Wide ? 92f : 84f, 32f, TextAnchor.MiddleRight, 0f, 0f);
|
||||
_clear.Add(b.Last.image);
|
||||
b.BeginRow(0f, TextAnchor.MiddleRight);
|
||||
if (idx != d.Current) RowKey(b, L.T("wallets.use"), () => { d.Current = idx; Session.Save(); Open(); });
|
||||
else b.AddLabel(L.T("wallets.current"), "wallets_cur_dim");
|
||||
else { b.AddLabel(L.T("wallets.current"), "wallets_cur_dim"); PledgerSkin.FitCurrent(b); }
|
||||
b.End();
|
||||
b.End();
|
||||
b.End();
|
||||
@@ -1754,6 +1755,7 @@ namespace Decentralized
|
||||
var sprite = Icon(g.Item);
|
||||
if (sprite != null) c.AddImage(sprite, 64f, 64f); else c.AddSpace(64f);
|
||||
c.AddLabel("<b>" + ItemName(g.Item) + "</b>");
|
||||
PledgerSkin.FitBox(c, 52f);
|
||||
bool asic = g.Kind == GoodKind.Gpu && g.Model != null && Hardware.Specs.TryGetValue(g.Model, out var gs) && gs.Asic;
|
||||
c.AddLabel(asic ? (g.Health >= 100 ? L.T("black.kind.asicnew") : L.T("black.kind.asic", (int)Math.Round(g.Health))) : g.Kind == GoodKind.Gpu ? (g.Health >= 100 ? L.T("black.kind.gpunew") : L.T("black.kind.gpu", (int)Math.Round(g.Health))) : L.T("black.kind." + g.Kind + (g.Kind == GoodKind.Contraband ? "." + g.Level : "")), "good_kind_dim");
|
||||
if (!string.IsNullOrEmpty(line2)) c.AddLabel(line2, "good_line2_dim");
|
||||
|
||||
Reference in new issue
Block a user