fix(ui): kit follow-ups for lists, chart contrast, activation and RTL bars
- ListBox (and the Library card grid) get a theme template that keeps their fill when disabled; ListView keeps the system GridView template. - BarChart, HeatmapStrip, SeriesChart and TimelineBands draw their labels in TextMuted; heatmap cells without data take the Stroke tone. - Category charts show the hand cursor and take the keyboard (arrows, Home, End, Enter, Space) only while an activation handler is attached to them; the keyboard item is outlined, read out and exposed as ItemStatus. - Horizontal bar charts and stacked bars start on the reading side in right-to-left languages; vertical bars, heatmaps and time axes stay LTR. - Archive drops its local list template, Focus.Inset copy, chart brush aliases and the redundant FlowDirection on the template box. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
10 files changed
+350
-197
No files matched your search
@@ -8,36 +8,6 @@
|
||||
xmlns:infra="clr-namespace:Titano.App.Infrastructure"
|
||||
xmlns:shell="clr-namespace:Titano.App.Shell">
|
||||
<UserControl.Resources>
|
||||
<!-- Keyboard focus drawn inside the row (DESIGN §4 ring): an outer ring would be clipped by the list's scroll viewer. -->
|
||||
<Style x:Key="Focus.Inset">
|
||||
<Setter Property="Control.Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Border BorderBrush="{DynamicResource Brush.Accent}" BorderThickness="2" CornerRadius="{StaticResource Radius.Control}" SnapsToDevicePixels="True" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!--
|
||||
Lists keep their panel's fill while the screen behind a dialog is disabled: the system template would paint them
|
||||
white. Rows and buttons dim themselves.
|
||||
-->
|
||||
<Style TargetType="ListBox" BasedOn="{StaticResource {x:Type ListBox}}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ListBox">
|
||||
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Padding="1" SnapsToDevicePixels="True">
|
||||
<ScrollViewer Focusable="False" Padding="{TemplateBinding Padding}">
|
||||
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Text.PanelHeading" TargetType="TextBlock" BasedOn="{StaticResource Text.Section}">
|
||||
<Setter Property="FontSize" Value="13" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
@@ -162,7 +132,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{l:Loc Archive.Rename.Template}" Style="{StaticResource Text.DialogLabel}" />
|
||||
<!-- A naming template keeps its tokens and separators in order in every language. -->
|
||||
<TextBox Grid.Column="1" Style="{StaticResource TextBox.Mono}" FlowDirection="LeftToRight"
|
||||
<TextBox Grid.Column="1" Style="{StaticResource TextBox.Mono}"
|
||||
Text="{Binding Template.Text, UpdateSourceTrigger=PropertyChanged, ValidatesOnNotifyDataErrors=True}" shell:EditBehavior.Field="{Binding Template}"
|
||||
ToolTip="{Binding Template.ToolTip}" AutomationProperties.Name="{l:Loc Archive.Rename.Template}" />
|
||||
</Grid>
|
||||
@@ -366,13 +336,6 @@
|
||||
</Border>
|
||||
|
||||
<Grid Grid.Column="2">
|
||||
<!--
|
||||
Chart labels in TextMuted as in Archive.html: the kit's charts draw them in TextFaint, too faint for 11 px data
|
||||
labels (reported to the shared controls; remove this alias once they draw in TextMuted).
|
||||
-->
|
||||
<Grid.Resources>
|
||||
<SolidColorBrush x:Key="Brush.TextFaint" Color="{DynamicResource Color.TextMuted}" />
|
||||
</Grid.Resources>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="14" />
|
||||
@@ -432,12 +395,7 @@
|
||||
</DockPanel>
|
||||
<v:HeatmapStrip Rows="{Binding MonthRows}" ColumnLabels="{Binding MonthLabels}" ValueFormatter="{Binding CountFormatter}" MaxCellSize="32" ShowScale="False"
|
||||
ToolTip="{l:Loc Tooltips.Archive.Months}" AutomationProperties.Name="{l:Loc Archive.Chart.Months}"
|
||||
AutomationProperties.HelpText="{Binding MonthsDescription}">
|
||||
<!-- Months still to come in the Stroke tone: the kit fills them with Card, the panel's own colour in the light theme. -->
|
||||
<v:HeatmapStrip.Resources>
|
||||
<SolidColorBrush x:Key="Brush.Card" Color="{DynamicResource Color.Stroke}" />
|
||||
</v:HeatmapStrip.Resources>
|
||||
</v:HeatmapStrip>
|
||||
AutomationProperties.HelpText="{Binding MonthsDescription}" />
|
||||
</DockPanel>
|
||||
</Border>
|
||||
<Border Grid.Row="2" Grid.Column="2" Style="{StaticResource Border.Panel}" Padding="14,10">
|
||||
|
||||
Reference in new issue
Block a user