1
0
mirror of https://github.com/wangdage12/Snap.Hutao.git synced 2026-07-31 04:10:25 +08:00

调整增量减量材料颜色

This commit is contained in:
mfkvfhpdx
2026-05-03 18:34:04 +08:00
parent 8bb177d08f
commit a41b7e4a01
2 changed files with 20 additions and 17 deletions
@@ -276,18 +276,18 @@
Orientation="Horizontal"
Spacing="0"
Visibility="{Binding ShowMergeInventoryParen, Converter={StaticResource BoolToVisibilityConverter}}">
<TextBlock VerticalAlignment="Center" Text="{Binding DisplayCurrent, Mode=OneWay}"/>
<TextBlock
VerticalAlignment="Center"
Foreground="{ThemeResource AccentTextFillColorPrimaryBrush}"
Text="{Binding RawInventoryParenthetical, Mode=OneWay}"
Visibility="{Binding MergeInventoryParenUseBlue, Converter={StaticResource BoolToVisibilityConverter}}"/>
<TextBlock
VerticalAlignment="Center"
Foreground="{ThemeResource SystemFillColorCriticalBrush}"
Text="{Binding RawInventoryParenthetical, Mode=OneWay}"
Visibility="{Binding MergeInventoryParenUseRed, Converter={StaticResource BoolToVisibilityConverter}}"/>
<TextBlock VerticalAlignment="Center" Text="{Binding SlashCountSuffix, Mode=OneWay}"/>
Text="{Binding DisplayCurrent, Mode=OneWay}"
Visibility="{Binding MergeDisplayLeadUseRed, Converter={StaticResource BoolToVisibilityConverter}}"/>
<TextBlock
VerticalAlignment="Center"
Foreground="{ThemeResource SystemFillColorSuccessBrush}"
Text="{Binding DisplayCurrent, Mode=OneWay}"
Visibility="{Binding MergeDisplayLeadUseGreen, Converter={StaticResource BoolToVisibilityConverter}}"/>
<TextBlock VerticalAlignment="Center" Text="{Binding RawInventoryParenthetical, Mode=OneWay}"/>
<TextBlock VerticalAlignment="Center" Text="{Binding SlashCountSuffixForParen, Mode=OneWay}"/>
</StackPanel>
</StackPanel>
</Grid>
@@ -46,19 +46,22 @@ internal sealed class StatisticsCultivateItem
/// <summary>已合并但合成前后有效持有量与背包数一致,不显示括号,仅「合并后 / 需求」加空格。</summary>
public bool ShowMergeSpacedWithoutParen { get => MergeAdjustedCurrent.HasValue && DisplayCurrent == Current; }
/// <summary>合并后有效持有与背包原数不同,显示「(背包原数)」并着色。</summary>
/// <summary>合并后有效持有与背包原数不同,显示「合并后 (背包原数)」。</summary>
public bool ShowMergeInventoryParen { get => MergeAdjustedCurrent.HasValue && DisplayCurrent != Current; }
/// <summary>合并后 &gt; 背包原数:括号用强调色(蓝系)。</summary>
public bool MergeInventoryParenUseBlue { get => MergeAdjustedCurrent.HasValue && DisplayCurrent > Current; }
/// <summary>首位合并显示量 &gt; 背包原数时着红色(相对原库存变多)。</summary>
public bool MergeDisplayLeadUseRed { get => MergeAdjustedCurrent.HasValue && DisplayCurrent > Current; }
/// <summary>合并后 &lt; 背包原数:括号用警告色(红系,低级被向上消耗)。</summary>
public bool MergeInventoryParenUseRed { get => MergeAdjustedCurrent.HasValue && DisplayCurrent < Current; }
/// <summary>首位合并显示量 &lt; 背包原数时着绿色(相对原库存变少,如低档被向上消耗)。</summary>
public bool MergeDisplayLeadUseGreen { get => MergeAdjustedCurrent.HasValue && DisplayCurrent < Current; }
/// <summary>背包同步原数,带前导空格与括号。</summary>
public string RawInventoryParenthetical { get => $" ({Current})"; }
/// <summary>背包原数,紧接在合并后数字后,如 <c>(44)</c>。</summary>
public string RawInventoryParenthetical { get => $"({Current})"; }
/// <summary>「 / 需求数」段,含前导空格。</summary>
/// <summary>有括号行:「/需求」紧接括号,如 <c>/55</c>。</summary>
public string SlashCountSuffixForParen { get => $"/{Count}"; }
/// <summary>无括号行:「 / 需求」含空格。</summary>
public string SlashCountSuffix { get => $" / {Count}"; }
public bool IsToday { get => Inner.IsItemOfToday(offset, true); }