Forge
csharpdeeb25a2
1#nullable enable
2
3namespace CascadeIDE.Views.Chat.Skia;
4
5/// <summary>Метрики пузырей: compact Forward feed (<see cref="SkiaChatSurfaceControl.ComfortableFeed"/> = false). Chrome spine/toolbar отдельно.</summary>
6internal static class SkiaChatDensity
7{
8 public static SkiaChatBubbleSpec Apply(in SkiaChatBubbleSpec spec, bool forwardHost)
9 {
10 if (!forwardHost)
11 return spec;
12
13 return spec with
14 {
15 GapAfter = Math.Max(3f, spec.GapAfter * 0.65f),
16 Padding = Math.Max(6f, spec.Padding - 3f),
17 LineHeight = Math.Max(13f, spec.LineHeight - 2f),
18 TitleHeight = spec.TitleHeight > 0 ? Math.Max(13f, spec.TitleHeight - 2f) : 0,
19 FooterHeight = spec.FooterHeight > 0 ? Math.Max(12f, spec.FooterHeight - 2f) : 0,
20 MinHeight = spec.MinHeight > 0 ? Math.Max(32f, spec.MinHeight - 8f) : 0,
21 ForwardFeedMetrics = true,
22 };
23 }
24}
25
View only · write via MCP/CIDE