Fixed the source headings being oversized and their tooltip too long

This commit is contained in:
Thorsten Sommer committed 2026-09-15 16:08:50 +02:00
1 parent 0c7fffa2cf
commit 91d0e742de
5 files changed
+66 -11

No files matched your search

@@ -5,7 +5,9 @@
<div class="mud-markdown-body">
@foreach (var group in this.groups)
{
<MudText Typo="Typo.h2">
@* A level-two heading was shown as h5 while this list was Markdown, because that is what
Markdown.DefaultConfig overrides it to. The heading keeps that size here. *@
<MudText Typo="Typo.h5">
@group.Heading
</MudText>
<ul>
@@ -15,7 +17,7 @@
@($"[{entry.Number}] ")
@if (entry.Document is { } document)
{
<MudTooltip Text="@this.GetDocumentTooltip(document)" Placement="Placement.Top">
<MudTooltip Text="@T("Opens this document in the program your system uses for it")" Placement="Placement.Top">
<MudLink Typo="Typo.body1" OnClick="@(() => this.OpenDocument(document))">
@entry.Title
</MudLink>
@@ -65,10 +65,6 @@ public partial class SourcesList : MSGComponentBase
}
}
private string GetDocumentTooltip(SourceDocumentLocation document) => document.PageNumber is > 0
? string.Format(T("Opens {0} on page {1}"), document.Path, document.PageNumber)
: string.Format(T("Opens {0}"), document.Path);
/// <summary>
/// Opens a document in the program the system uses for it.
/// </summary>