35 references to PanelFontRole
aspire-tray (35)
src\Aspire.Tray\Common\TrayPanel.cs (25)
989
sink.Add(new TextCommand(headerBounds, general ? "GENERAL" : "ABOUT",
PanelFontRole
.Section, palette.TextTertiary));
1172
internal static double HeaderBaseline => HeaderHeight / 2 + PanelFonts.CapHeight(
PanelFontRole
.Title) / 2;
1179
commands.Add(new TextCommand(title, "Aspire",
PanelFontRole
.Title, palette.TextPrimary));
1184
var statusMiddle = HeaderBaseline - PanelFonts.CapHeight(
PanelFontRole
.Body) / 2;
1188
commands.Add(new TextCommand(statusBounds, status,
PanelFontRole
.Body, palette.TextSecondary, ExplicitBaseline: HeaderBaseline));
1214
? new TextCommand(text, notice,
PanelFontRole
.Body, palette.BannerText)
1215
: new TextCommand(text, notice,
PanelFontRole
.Body, palette.BannerText, MaxLines: 2));
1237
commands.Add(new TextCommand(titleBounds, title,
PanelFontRole
.Name, palette.TextPrimary, PanelTextAlignment.Center));
1238
commands.Add(new TextCommand(hintBounds, hint,
PanelFontRole
.Body, palette.TextSecondary,
1256
commands.Add(new TextCommand(labelBounds, label,
PanelFontRole
.Section, palette.TextTertiary));
1266
commands.Add(new TextCommand(labelBounds, label,
PanelFontRole
.Section, palette.TextTertiary));
1277
commands.Add(new TextCommand(clear, "Clear",
PanelFontRole
.Body, palette.Accent, PanelTextAlignment.Center));
1306
commands.Add(new TextCommand(new(TextLeft, top + 8, textRight - TextLeft, 18), host.DisplayName,
PanelFontRole
.Name, palette.TextPrimary));
1307
commands.Add(new TextCommand(new(TextLeft, top + 27, textRight - TextLeft, 16), detail,
PanelFontRole
.Body,
1422
PanelFontRole
.Body, palette.TextPrimary));
1436
commands.Add(new TextCommand(new(TextLeft, item.Y, labelRight - TextLeft, item.Height), label,
PanelFontRole
.Body, palette.TextPrimary));
1489
commands.Add(new TextCommand(questionBounds, question,
PanelFontRole
.Name, palette.TextPrimary));
1490
commands.Add(new TextCommand(detailBounds, detail,
PanelFontRole
.Body, palette.TextSecondary,
1509
commands.Add(new TextCommand(cancelBounds, "Cancel",
PanelFontRole
.Button, palette.TextPrimary, PanelTextAlignment.Center));
1523
commands.Add(new TextCommand(acceptBounds, accept,
PanelFontRole
.Button, palette.OnColor, PanelTextAlignment.Center));
1536
commands.Add(new TextCommand(title, TraySettingsText.PanelTitle,
PanelFontRole
.Title, palette.TextPrimary));
1559
commands.Add(new TextCommand(new(20, top + 8, textWidth, 20), title,
PanelFontRole
.Name,
1561
commands.Add(new TextCommand(new(20, top + 28, textWidth, 30), description,
PanelFontRole
.Body,
1570
commands.Add(new TextCommand(name, "Aspire Tray",
PanelFontRole
.Name, palette.TextPrimary));
1580
commands.Add(new TextCommand(bounds, line,
PanelFontRole
.Body, palette.TextSecondary, Truncation: PanelTruncation.Middle));
src\Aspire.Tray\Common\TrayPanelScene.cs (8)
26
public static double Size(
PanelFontRole
role) => role switch
28
PanelFontRole
.Title => 15,
29
PanelFontRole
.Name => 13,
30
PanelFontRole
.Section => 11,
34
public static bool IsSemibold(
PanelFontRole
role) => role is not
PanelFontRole
.Body;
40
public static double CapHeight(
PanelFontRole
role) => 0.7 * Size(role);
74
PanelFontRole
Font,
TrayApplication.Panel.cs (2)
23
private readonly Dictionary<(
PanelFontRole
Role, uint Dpi), nint> _panelFonts = [];
801
private nint GetPanelFont(nint dc,
PanelFontRole
role)