From 8bb177d08f5790a06b8e4e79a555392fbd863667 Mon Sep 17 00:00:00 2001 From: mfkvfhpdx Date: Sun, 3 May 2026 18:24:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=90=88=E5=B9=B6=E5=A2=9E?= =?UTF-8?q?=E9=87=8F=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UI/Xaml/View/Page/CultivationPage.xaml | 35 +++++++++++++++++-- .../Cultivation/StatisticsCultivateItem.cs | 21 +++++++++++ 2 files changed, 53 insertions(+), 3 deletions(-) diff --git a/src/Snap.Hutao/Snap.Hutao/UI/Xaml/View/Page/CultivationPage.xaml b/src/Snap.Hutao/Snap.Hutao/UI/Xaml/View/Page/CultivationPage.xaml index 56fd22c..783e278 100644 --- a/src/Snap.Hutao/Snap.Hutao/UI/Xaml/View/Page/CultivationPage.xaml +++ b/src/Snap.Hutao/Snap.Hutao/UI/Xaml/View/Page/CultivationPage.xaml @@ -256,11 +256,40 @@ VerticalAlignment="Center" Text="{Binding Inner.Name}" TextTrimming="CharacterEllipsis"/> - + Orientation="Horizontal" + Spacing="0"> + + + + + + + + + + + + diff --git a/src/Snap.Hutao/Snap.Hutao/ViewModel/Cultivation/StatisticsCultivateItem.cs b/src/Snap.Hutao/Snap.Hutao/ViewModel/Cultivation/StatisticsCultivateItem.cs index ae44bcf..afb5aaf 100644 --- a/src/Snap.Hutao/Snap.Hutao/ViewModel/Cultivation/StatisticsCultivateItem.cs +++ b/src/Snap.Hutao/Snap.Hutao/ViewModel/Cultivation/StatisticsCultivateItem.cs @@ -40,6 +40,27 @@ internal sealed class StatisticsCultivateItem public string FormattedCount { get => $"{DisplayCurrent}/{Count}"; } + /// 未启用合并展示链时,使用紧凑 + public bool ShowNonMergeCompactCount { get => !MergeAdjustedCurrent.HasValue; } + + /// 已合并但合成前后有效持有量与背包数一致,不显示括号,仅「合并后 / 需求」加空格。 + public bool ShowMergeSpacedWithoutParen { get => MergeAdjustedCurrent.HasValue && DisplayCurrent == Current; } + + /// 合并后有效持有与背包原数不同,显示「(背包原数)」并着色。 + public bool ShowMergeInventoryParen { get => MergeAdjustedCurrent.HasValue && DisplayCurrent != Current; } + + /// 合并后 > 背包原数:括号用强调色(蓝系)。 + public bool MergeInventoryParenUseBlue { get => MergeAdjustedCurrent.HasValue && DisplayCurrent > Current; } + + /// 合并后 < 背包原数:括号用警告色(红系,低级被向上消耗)。 + public bool MergeInventoryParenUseRed { get => MergeAdjustedCurrent.HasValue && DisplayCurrent < Current; } + + /// 背包同步原数,带前导空格与括号。 + public string RawInventoryParenthetical { get => $" ({Current})"; } + + /// 「 / 需求数」段,含前导空格。 + public string SlashCountSuffix { get => $" / {Count}"; } + public bool IsToday { get => Inner.IsItemOfToday(offset, true); } internal bool ExcludedFromPresentation { get; set; }