Add marquee for truncated ticket overview headings

This commit is contained in:
Meik
2026-07-18 23:45:34 +02:00
parent 62a5c97cbd
commit 2fbf2e2d2d
2 changed files with 73 additions and 0 deletions

View File

@@ -15,6 +15,39 @@
<UserControl.Resources>
<vc:LanguageDefinitionsConverter x:Key="LanguageConverter" />
<Style x:Key="TicketOverviewRowHeadingStyle"
TargetType="Label">
<Setter Property="HorizontalContentAlignment"
Value="Stretch" />
<Setter Property="VerticalContentAlignment"
Value="Center" />
<EventSetter Event="MouseEnter"
Handler="RowHeading_MouseEnter" />
<EventSetter Event="MouseLeave"
Handler="RowHeading_MouseLeave" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Label">
<Border x:Name="PART_TickerContainer"
Background="Transparent"
ClipToBounds="True"
Padding="{TemplateBinding Padding}">
<TextBlock x:Name="PART_TickerText"
Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}"
Foreground="{TemplateBinding Foreground}"
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
FontStretch="{TemplateBinding FontStretch}"
FontStyle="{TemplateBinding FontStyle}"
FontWeight="{TemplateBinding FontWeight}"
TextTrimming="CharacterEllipsis"
VerticalAlignment="Center" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- Style für Labels mit Auswahlzustand -->
<Style x:Key="RoundedSelectedLabelStyle"
TargetType="Label">
@@ -130,6 +163,7 @@
<!-- Tickets -->
<Label Grid.Row="2"
Grid.Column="0"
Style="{StaticResource TicketOverviewRowHeadingStyle}"
Foreground="{DynamicResource FontColor.DetailsPage.TitleSection.Header}"
Content="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=TicketOverview.Row.Heading.Tickets}"
FontWeight="Bold"
@@ -202,6 +236,7 @@
<!-- Incidents -->
<Label Grid.Row="3"
Grid.Column="0"
Style="{StaticResource TicketOverviewRowHeadingStyle}"
Foreground="{DynamicResource FontColor.DetailsPage.TitleSection.Header}"
Content="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=TicketOverview.Row.Heading.Incidents}"
FontWeight="Bold"
@@ -274,6 +309,7 @@
<!-- Service Requests -->
<Label Grid.Row="4"
Grid.Column="0"
Style="{StaticResource TicketOverviewRowHeadingStyle}"
Foreground="{DynamicResource FontColor.DetailsPage.TitleSection.Header}"
Content="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=TicketOverview.Row.Heading.ServiceRequests}"
FontWeight="Bold"
@@ -346,6 +382,7 @@
<!-- Unassigned -->
<Label Grid.Row="5"
Grid.Column="0"
Style="{StaticResource TicketOverviewRowHeadingStyle}"
Foreground="{DynamicResource FontColor.DetailsPage.TitleSection.Header}"
Content="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=TicketOverview.Row.Heading.UnassignedTickets}"
FontWeight="Bold"