Interactive 2D wave optics simulator. Turn any image into a refractive scene, add sources, watch waves refract, diffract and interfere. Probes, intensity maps, video export.
C#
Tree toolbar with icons and a plus badge, 23 px rows; menus open below their header The project tree's toolbar buttons are flat like the glyph buttons beside them, in the order Source, Probe, Part, each with the icon its folder shows and a plus badge in the accent colour (IconView.PlusBadge; the text colour on a pressed or disabled button); the labels lost their "+", and Part ends in the combo boxes' drop-down arrow, since it opens the menu of kinds. The source, probe and part icons are drawn for the 16 px grid instead of the handle glyphs scaled to 0.8, which had put lines between pixels. The toolbar buttons and every tree row are 23 px high (the rows had been 18 px, 20 with glyph buttons): the 9 rows of text ink and the icons' 15 centre only in an odd height, the tree's text needed no padding above it (a half pixel rounded to the even row had put it a pixel low), and the expander chevrons moved up a pixel with it.
Alexander Graefc6130b861a96
diff --git a/WaveDudeNext.WPF/Controls/IconView.cs b/WaveDudeNext.WPF/Controls/IconView.csindex b7bf801..fa933b0 100644--- a/WaveDudeNext.WPF/Controls/IconView.cs+++ b/WaveDudeNext.WPF/Controls/IconView.cs@@ -38,6 +38,10 @@ public sealed class IconView : ContentControlpublic static readonly DependencyProperty DrawingProperty = DependencyProperty.Register(nameof(Drawing), typeof(string), typeof(IconView), new PropertyMetadata(null, OnIconChanged));+ /// <summary>Identifies the <see cref="PlusBadge"/> property.</summary>+ public static readonly DependencyProperty PlusBadgeProperty = DependencyProperty.Register(+ nameof(PlusBadge), typeof(bool), typeof(IconView), new PropertyMetadata(false, OnIconChanged));+public IconView(){Focusable = false;@@ -63,10 +67,28 @@ public sealed class IconView : ContentControlset => SetValue(DrawingProperty, value);}+ /// <summary>+ /// Whether the <see cref="Drawing"/> carries the plus of an add command (2026-10-23, the tree's toolbar): the theme's+ /// <c>IconPlusBadge</c> in its bottom-right corner, which the drawings leave free, styled by <c>IconPlusBadgeStyle</c>+ /// (the accent colour, the text colour on a pressed or disabled button).+ /// </summary>+ public bool PlusBadge+ {+ get => (bool)GetValue(PlusBadgeProperty);+ set => SetValue(PlusBadgeProperty, value);+ }+private static void OnIconChanged(DependencyObject d, DependencyPropertyChangedEventArgs e){var view = (IconView)d;- view.Content = Create(view.Glyph, view.Drawing);+ UIElement? icon = Create(view.Glyph, view.Drawing);+ if (view.PlusBadge && icon is Grid drawn)+ {+ var badge = new Path();+ badge.SetResourceReference(FrameworkElement.StyleProperty, "IconPlusBadgeStyle");+ drawn.Children.Add(badge);+ }+ view.Content = icon;}/// <summary>The element showing <paramref name="glyph"/>, else <paramref name="drawing"/>; null for neither.</summary>diff --git a/WaveDudeNext.WPF/Panes/PreviewPane.xaml b/WaveDudeNext.WPF/Panes/PreviewPane.xamlindex f8b8038..c8a8edb 100644--- a/WaveDudeNext.WPF/Panes/PreviewPane.xaml+++ b/WaveDudeNext.WPF/Panes/PreviewPane.xaml@@ -540,7 +540,19 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file orpoint 9: his previews had the scale factor beside them), so turned on the side the box and button turnwith it and end at the picture's bottom edge; the caption gives way first when the strip is short --><controls:PictureFrame>- <controls:HeaderStrip Margin="0,10,0,4">+ <controls:HeaderStrip>+ <!-- above the picture, no margin over it (2026-10-23, the user's request: 10 px had put the title a+ good way below the pane's top, against 8 px at the side); turned on its side it keeps 10 px -->+ <controls:HeaderStrip.Style>+ <Style TargetType="{x:Type controls:HeaderStrip}">+ <Setter Property="Margin" Value="0,0,0,4" />+ <Style.Triggers>+ <DataTrigger Binding="{Binding IsLabelOnSide, RelativeSource={RelativeSource AncestorType={x:Type controls:PictureFrame}}}" Value="True">+ <Setter Property="Margin" Value="0,10,0,4" />+ </DataTrigger>+ </Style.Triggers>+ </Style>+ </controls:HeaderStrip.Style><TextBlock Style="{StaticResource PictureLabel}" Margin="0" TextTrimming="CharacterEllipsis" Text="{TemplateBinding Header}" /><TextBlock Text="{DynamicResource Label.DisplayLayer.Brightness}" Foreground="{DynamicResource WindowForeground}" Margin="0,0,4,0" /><StackPanel Orientation="Horizontal">diff --git a/WaveDudeNext.WPF/Panes/ProjectTree.xaml b/WaveDudeNext.WPF/Panes/ProjectTree.xamlindex 0613551..d6c4fed 100644--- a/WaveDudeNext.WPF/Panes/ProjectTree.xaml+++ b/WaveDudeNext.WPF/Panes/ProjectTree.xaml@@ -1,4 +1,4 @@-<!--+<!--SPDX-License-Identifier: GPL-3.0-or-laterCopyright (C) 2026 Alexander Graef <[email protected]>@@ -78,9 +78,17 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<Setter Property="Focusable" Value="True" /><Setter Property="IsTabStop" Value="True" /></Style>+ <!-- the toolbar's add buttons (2026-10-23, the user's choice): flat like the glyph buttons beside them, the hover+ background and, with the keyboard focus, the accent border; an icon with the add plus, then the label. 23 px high+ (the user's request for more room), the height of the tree's rows, the content one pixel down: with Display text+ formatting the capitals' ink is 9 rows, which only an odd height centres, 3 rows down its 15 px line; in 23 px the+ 16 px icon lands on rows 4 to 19 and the line beside it on 4 to 18 (its half pixel rounded to the even 0), the+ text's ink on 7 to 15 and the icon's 15 rows on 4 to 18, both centred --><Style x:Key="TextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">- <Setter Property="Padding" Value="6,0" />- <Setter Property="MinHeight" Value="20" />+ <Setter Property="Background" Value="Transparent" />+ <Setter Property="BorderBrush" Value="Transparent" />+ <Setter Property="Padding" Value="6,1,6,0" />+ <Setter Property="MinHeight" Value="23" /><Setter Property="Margin" Value="1,0" /></Style><!-- the part entries, the optics first and the plain shapes after a separator, in one place for both menus that offer@@ -122,12 +130,31 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<!-- pane toolbar: acts on the tree selection --><Border DockPanel.Dock="Top" BorderBrush="{DynamicResource ToolWindowBorder}" BorderThickness="0,0,0,1" Padding="2,2"><StackPanel Orientation="Horizontal">- <Button Style="{StaticResource TextButton}" Content="{DynamicResource ToolAddSource}" ToolTip="{DynamicResource TipAddSource}" AutomationProperties.Name="{DynamicResource TipAddSource}"- Command="{x:Static commands:ProjectCommands.AddSource}" AutomationProperties.AutomationId="ToolAddSource" />- <Button Style="{StaticResource TextButton}" Content="{DynamicResource ToolAddPart}" ToolTip="{DynamicResource TipAddPart}" AutomationProperties.Name="{DynamicResource TipAddPart}"- Command="{x:Static commands:ProjectCommands.AddPart}" ContextMenu="{StaticResource PartKindMenu}" AutomationProperties.AutomationId="ToolAddPart" />- <Button Style="{StaticResource TextButton}" Content="{DynamicResource ToolAddProbe}" ToolTip="{DynamicResource TipAddProbe}" AutomationProperties.Name="{DynamicResource TipAddProbe}"- Command="{x:Static commands:ProjectCommands.AddProbe}" AutomationProperties.AutomationId="ToolAddProbe" />+ <!-- each with the icon of what it adds, the one its folder in the tree shows, with the add plus; source, probe, then part (2026-10-23,+ the user's order); the part's button opens the menu of kinds rather than adding one, so it ends in the drop-down arrow of the combo boxes+ (the user's choice, in place of an ellipsis), in the text colour -->+ <Button Style="{StaticResource TextButton}" ToolTip="{DynamicResource TipAddSource}" AutomationProperties.Name="{DynamicResource TipAddSource}"+ Command="{x:Static commands:ProjectCommands.AddSource}" AutomationProperties.AutomationId="ToolAddSource">+ <StackPanel Orientation="Horizontal">+ <controls:IconView Drawing="Source" PlusBadge="True" Margin="0,0,4,0" VerticalAlignment="Center" />+ <TextBlock Text="{DynamicResource ToolAddSource}" VerticalAlignment="Center" />+ </StackPanel>+ </Button>+ <Button Style="{StaticResource TextButton}" ToolTip="{DynamicResource TipAddProbe}" AutomationProperties.Name="{DynamicResource TipAddProbe}"+ Command="{x:Static commands:ProjectCommands.AddProbe}" AutomationProperties.AutomationId="ToolAddProbe">+ <StackPanel Orientation="Horizontal">+ <controls:IconView Drawing="Probe" PlusBadge="True" Margin="0,0,4,0" VerticalAlignment="Center" />+ <TextBlock Text="{DynamicResource ToolAddProbe}" VerticalAlignment="Center" />+ </StackPanel>+ </Button>+ <Button Style="{StaticResource TextButton}" ToolTip="{DynamicResource TipAddPart}" AutomationProperties.Name="{DynamicResource TipAddPart}"+ Command="{x:Static commands:ProjectCommands.AddPart}" ContextMenu="{StaticResource PartKindMenu}" AutomationProperties.AutomationId="ToolAddPart">+ <StackPanel Orientation="Horizontal">+ <controls:IconView Drawing="Part" PlusBadge="True" Margin="0,0,4,0" VerticalAlignment="Center" />+ <TextBlock Text="{DynamicResource ToolAddPart}" VerticalAlignment="Center" />+ <Path Data="{StaticResource DropDownGeometry}" Fill="{Binding (TextElement.Foreground), RelativeSource={RelativeSource Self}}" Margin="5,0,0,0" VerticalAlignment="Center" />+ </StackPanel>+ </Button><Rectangle Width="1" Margin="4,2" Fill="{DynamicResource ToolWindowBorder}" /><Button Style="{StaticResource ToolGlyphButton}" Content="{StaticResource ChevronUpGeometry}" ToolTip="{DynamicResource TipMoveUp}" AutomationProperties.Name="{DynamicResource TipMoveUp}"Command="{x:Static commands:ProjectCommands.MoveUp}" AutomationProperties.AutomationId="ToolMoveUp" />diff --git a/WaveDudeNext.WPF/Strings/Strings.DE.xaml b/WaveDudeNext.WPF/Strings/Strings.DE.xamlindex e8a0c64..442405e 100644--- a/WaveDudeNext.WPF/Strings/Strings.DE.xaml+++ b/WaveDudeNext.WPF/Strings/Strings.DE.xaml@@ -148,9 +148,9 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<s:String x:Key="MenuProjectMoveDown">Nach _unten</s:String><s:String x:Key="MenuProjectSelectAll">_Alles auswählen</s:String><s:String x:Key="MenuProjectToggleSelected">Zur Auswahl hinzufügen oder en_tfernen</s:String>- <s:String x:Key="ToolAddSource">+ Quelle</s:String>- <s:String x:Key="ToolAddProbe">+ Sonde</s:String>- <s:String x:Key="ToolAddPart">+ Bauteil</s:String>+ <s:String x:Key="ToolAddSource">Quelle</s:String>+ <s:String x:Key="ToolAddProbe">Sonde</s:String>+ <s:String x:Key="ToolAddPart">Bauteil</s:String><s:String x:Key="TipAddSource">Quelle hinzufügen (am Ende angefügt)</s:String><s:String x:Key="TipAddProbe">Sonde hinzufügen (am Ende angefügt)</s:String><s:String x:Key="TipAddPart">Optisches Bauteil hinzufügen (Menü der Arten; am Ende angefügt)</s:String>diff --git a/WaveDudeNext.WPF/Strings/Strings.EN.xaml b/WaveDudeNext.WPF/Strings/Strings.EN.xamlindex 26d90c3..320b455 100644--- a/WaveDudeNext.WPF/Strings/Strings.EN.xaml+++ b/WaveDudeNext.WPF/Strings/Strings.EN.xaml@@ -150,9 +150,9 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<s:String x:Key="MenuProjectMoveDown">Move _down</s:String><s:String x:Key="MenuProjectSelectAll">Select _all</s:String><s:String x:Key="MenuProjectToggleSelected">Add to or remove from selec_tion</s:String>- <s:String x:Key="ToolAddSource">+ Source</s:String>- <s:String x:Key="ToolAddProbe">+ Probe</s:String>- <s:String x:Key="ToolAddPart">+ Part</s:String>+ <s:String x:Key="ToolAddSource">Source</s:String>+ <s:String x:Key="ToolAddProbe">Probe</s:String>+ <s:String x:Key="ToolAddPart">Part</s:String><s:String x:Key="TipAddSource">Add a source (appended at the end)</s:String><s:String x:Key="TipAddProbe">Add a probe (appended at the end)</s:String><s:String x:Key="TipAddPart">Add an optical part (a menu of kinds; appended at the end)</s:String>diff --git a/WaveDudeNext.WPF/Strings/Strings.FR.xaml b/WaveDudeNext.WPF/Strings/Strings.FR.xamlindex 2c38e3a..c39ef82 100644--- a/WaveDudeNext.WPF/Strings/Strings.FR.xaml+++ b/WaveDudeNext.WPF/Strings/Strings.FR.xaml@@ -148,9 +148,9 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<s:String x:Key="MenuProjectMoveDown">D_escendre</s:String><s:String x:Key="MenuProjectSelectAll">_Tout sélectionner</s:String><s:String x:Key="MenuProjectToggleSelected">Ajouter à la sélection ou en re_tirer</s:String>- <s:String x:Key="ToolAddSource">+ Source</s:String>- <s:String x:Key="ToolAddProbe">+ Sonde</s:String>- <s:String x:Key="ToolAddPart">+ Composant</s:String>+ <s:String x:Key="ToolAddSource">Source</s:String>+ <s:String x:Key="ToolAddProbe">Sonde</s:String>+ <s:String x:Key="ToolAddPart">Composant</s:String><s:String x:Key="TipAddSource">Ajouter une source (à la fin)</s:String><s:String x:Key="TipAddProbe">Ajouter une sonde (à la fin)</s:String><s:String x:Key="TipAddPart">Ajouter un composant optique (menu des types ; à la fin)</s:String>diff --git a/WaveDudeNext.WPF/Strings/Strings.NL.xaml b/WaveDudeNext.WPF/Strings/Strings.NL.xamlindex 66ee0a4..ab19b74 100644--- a/WaveDudeNext.WPF/Strings/Strings.NL.xaml+++ b/WaveDudeNext.WPF/Strings/Strings.NL.xaml@@ -148,9 +148,9 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<s:String x:Key="MenuProjectMoveDown">Om_laag</s:String><s:String x:Key="MenuProjectSelectAll">_Alles selecteren</s:String><s:String x:Key="MenuProjectToggleSelected">Aan selectie toevoegen of eruit verwij_deren</s:String>- <s:String x:Key="ToolAddSource">+ Bron</s:String>- <s:String x:Key="ToolAddProbe">+ Sonde</s:String>- <s:String x:Key="ToolAddPart">+ Onderdeel</s:String>+ <s:String x:Key="ToolAddSource">Bron</s:String>+ <s:String x:Key="ToolAddProbe">Sonde</s:String>+ <s:String x:Key="ToolAddPart">Onderdeel</s:String><s:String x:Key="TipAddSource">Bron toevoegen (achteraan)</s:String><s:String x:Key="TipAddProbe">Sonde toevoegen (achteraan)</s:String><s:String x:Key="TipAddPart">Optisch onderdeel toevoegen (menu met soorten; achteraan)</s:String>diff --git a/WaveDudeNext.WPF/Themes/Controls.xaml b/WaveDudeNext.WPF/Themes/Controls.xamlindex f30334f..5ecdfff 100644--- a/WaveDudeNext.WPF/Themes/Controls.xaml+++ b/WaveDudeNext.WPF/Themes/Controls.xaml@@ -91,7 +91,9 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<Border x:Name="Bd" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True"><Grid><ContentPresenter ContentSource="Header" RecognizesAccessKey="True" VerticalAlignment="Center" />- <Popup x:Name="PART_Popup" Placement="Bottom" VerticalOffset="1"+ <!-- placed by the whole header, not this grid inside its padding (2026-10-23: the menu opened 7 px in and over+ the header's bottom 3 px): left-aligned with the header, right below it -->+ <Popup x:Name="PART_Popup" Placement="Bottom" PlacementTarget="{Binding ElementName=Bd}"IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}"AllowsTransparency="True" Focusable="False" PopupAnimation="None"><Border Background="{DynamicResource MenuPopupBackground}"@@ -107,7 +109,7 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<Setter Property="Foreground" Value="{DynamicResource MenuItemHoverForeground}" /></Trigger><Trigger Property="IsSubmenuOpen" Value="True">- <Setter TargetName="Bd" Property="Background" Value="{DynamicResource MenuPopupBackground}" />+ <Setter TargetName="Bd" Property="Background" Value="{DynamicResource MenuHeaderOpen}" /></Trigger><Trigger Property="IsEnabled" Value="False"><Setter Property="Foreground" Value="{DynamicResource GrayText}" />@@ -182,7 +184,10 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file orMargin="4,2,8,2" VerticalAlignment="Center" /><Path x:Name="Arrow" Grid.Column="3" Data="{StaticResource SubmenuArrowGeometry}"Fill="{DynamicResource MenuGlyph}" HorizontalAlignment="Center" VerticalAlignment="Center" />- <Popup x:Name="PART_Popup" Placement="Right" HorizontalOffset="-1" VerticalOffset="-3"+ <!-- placed by the whole entry (2026-10-23; by the grid inside its padding it covered the entry's last 3 px and+ its first entry came 2 px low): over the menu's padding and border, clear of this entry, the first entry level+ with this one -->+ <Popup x:Name="PART_Popup" Placement="Right" PlacementTarget="{Binding ElementName=Bd}" VerticalOffset="-3"IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}"AllowsTransparency="True" Focusable="False" PopupAnimation="None"><Border Background="{DynamicResource MenuPopupBackground}"@@ -233,10 +238,31 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<StreamGeometry x:Key="SourceGlyph">M4,10 A6,6 0 1 1 16,10 A6,6 0 1 1 4,10 M10,0 L10,2.5 M10,17.5 L10,20 M0,10 L2.5,10 M17.5,10 L20,10</StreamGeometry><StreamGeometry x:Key="ProbeGlyph">M4.5,4.5 L15.5,4.5 L15.5,15.5 L4.5,15.5 Z M10,0 L10,2.5 M10,17.5 L10,20 M0,10 L2.5,10 M17.5,10 L20,10</StreamGeometry><StreamGeometry x:Key="PartGlyph">M4,10 A6,6 0 1 1 16,10 A6,6 0 1 1 4,10 M7.5,10 A2.5,2.5 0 1 1 12.5,10 A2.5,2.5 0 1 1 7.5,10 M10,0 L10,2.5 M10,17.5 L10,20 M0,10 L2.5,10 M17.5,10 L20,10</StreamGeometry>- <!-- the same glyphs as 16 px icons for the tree's rows and folders (IconView Drawing="Source", "Probe", "Part") -->- <GeometryGroup x:Key="IconSource" Transform="0.8,0,0,0.8,0,0"><StaticResource ResourceKey="SourceGlyph" /></GeometryGroup>- <GeometryGroup x:Key="IconProbe" Transform="0.8,0,0,0.8,0,0"><StaticResource ResourceKey="ProbeGlyph" /></GeometryGroup>- <GeometryGroup x:Key="IconPart" Transform="0.8,0,0,0.8,0,0"><StaticResource ResourceKey="PartGlyph" /></GeometryGroup>+ <!-- the same glyphs as 16 px icons for the tree's rows and folders and the tree's toolbar (IconView Drawing="Source",+ "Probe", "Part"), drawn for the pixel grid (2026-10-23; the handle glyphs scaled to 0.8 had put ticks and edges between+ pixels, grey and heavier than the text): 1 px lines on half pixels around the pixel (7, 7), the ink in rows and columns+ 0 to 14, an odd 15 so it centres in the 23 px toolbar buttons and tree rows as the text does; the probe's square is+ 7 px, which weighs as much as the 9 px ring and leaves the corner free for the plus of an add button (IconPlusBadge) -->+ <StreamGeometry x:Key="IconSource">M3.5,7.5 A4,4 0 1 1 11.5,7.5 A4,4 0 1 1 3.5,7.5 M7.5,0 V2 M7.5,13 V15 M0,7.5 H2 M13,7.5 H15</StreamGeometry>+ <StreamGeometry x:Key="IconProbe">M4.5,4.5 H10.5 V10.5 H4.5 Z M7.5,0 V2 M7.5,13 V15 M0,7.5 H2 M13,7.5 H15</StreamGeometry>+ <StreamGeometry x:Key="IconPart">M3.5,7.5 A4,4 0 1 1 11.5,7.5 A4,4 0 1 1 3.5,7.5 M5.5,7.5 A2,2 0 1 1 9.5,7.5 A2,2 0 1 1 5.5,7.5 M7.5,0 V2 M7.5,13 V15 M0,7.5 H2 M13,7.5 H15</StreamGeometry>+ <!-- the plus of an add command over an icon (IconView PlusBadge): 5 px in the bottom-right corner, inside the 15 px ink,+ a pixel clear of the ring, the square and the ticks; stroked in the accent colour, in the text colour where the+ accent is the background (a pressed button) or the text is greyed (a disabled one) -->+ <StreamGeometry x:Key="IconPlusBadge">M12.5,10 V15 M10,12.5 H15</StreamGeometry>+ <Style x:Key="IconPlusBadgeStyle" TargetType="{x:Type Path}">+ <Setter Property="Data" Value="{StaticResource IconPlusBadge}" />+ <Setter Property="StrokeThickness" Value="1" />+ <Setter Property="Stroke" Value="{DynamicResource Accent}" />+ <Style.Triggers>+ <DataTrigger Binding="{Binding IsPressed, RelativeSource={RelativeSource AncestorType={x:Type ButtonBase}}}" Value="True">+ <Setter Property="Stroke" Value="{Binding (TextElement.Foreground), RelativeSource={RelativeSource Self}}" />+ </DataTrigger>+ <Trigger Property="IsEnabled" Value="False">+ <Setter Property="Stroke" Value="{Binding (TextElement.Foreground), RelativeSource={RelativeSource Self}}" />+ </Trigger>+ </Style.Triggers>+ </Style><!-- the project root: a wave on its canvas --><StreamGeometry x:Key="IconProject">M1.5,2.5 H14.5 V13.5 H1.5 Z M3,8 C4.5,4.5 6.5,4.5 8,8 C9.5,11.5 11.5,11.5 13,8</StreamGeometry>@@ -288,7 +314,9 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<Style TargetType="{x:Type MenuItem}"><Setter Property="Background" Value="Transparent" /><Setter Property="Foreground" Value="{DynamicResource MenuForeground}" />- <Setter Property="Padding" Value="7,3" />+ <!-- the menu bar's headers alone (the submenu templates pad themselves): 23 px high like the entries of their menus+ (2026-10-23, the user's request; 21 px before), the 15 px text line on rows 4 to 18 in both -->+ <Setter Property="Padding" Value="7,4" /><!-- set here so the system theme's bindings to the parent ItemsControl never apply: the templates below do not usethem, and a menu item made before its menu (the shared part entries in ProjectTree.xaml) logged a binding error --><Setter Property="HorizontalContentAlignment" Value="Left" />@@ -531,7 +559,9 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<Setter Property="Template"><Setter.Value><ControlTemplate TargetType="{x:Type ToggleButton}">- <Border Background="Transparent" Width="16" Height="16">+ <!-- a pixel above the middle of the 23 px row: the box on row 3, where the 16 px icons beside it round to 4, so+ the chevrons centre on the text (2026-10-23) -->+ <Border Background="Transparent" Width="16" Height="16" Margin="0,0,0,1"><Path x:Name="Glyph" Data="{StaticResource ChevronRightGeometry}" Stroke="{DynamicResource TreeViewGlyph}"StrokeThickness="1" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="2,0,0,0" /></Border>@@ -549,10 +579,14 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or</Setter></Style>+ <!-- every row 23 px high (2026-10-23, the user's request for more room; the rows had been 18 px, 20 with glyph buttons),+ no padding above or below: the 15 px text line centres on row 4 and the 16 px icon on 3.5, which layout rounding takes+ to the even 4, so the text's 9 rows of ink land on 7 to 15 and an icon's 15 on 4 to 18, both centred, as in the+ project toolbar's buttons (a pixel of padding above had put the text on 3.5, rounded to 4, a pixel low) --><Style TargetType="{x:Type TreeViewItem}"><Setter Property="Foreground" Value="{DynamicResource TreeViewForeground}" /><Setter Property="Background" Value="Transparent" />- <Setter Property="Padding" Value="3,1" />+ <Setter Property="Padding" Value="3,0" /><Setter Property="HorizontalContentAlignment" Value="Left" /><!-- set so the system theme's binding to the parent ItemsControl never applies (the template does not use it): itlogged an error for every row dropped when a list was cleared and refilled, as Undo and Redo do -->@@ -571,7 +605,7 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or</Grid.RowDefinitions><ToggleButton x:Name="Expander" Style="{StaticResource TreeViewToggleStyle}" ClickMode="Press"IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" />- <Border x:Name="Bd" Grid.Column="1" Background="{TemplateBinding Background}"+ <Border x:Name="Bd" Grid.Column="1" Background="{TemplateBinding Background}" MinHeight="23"Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True"><ContentPresenter x:Name="PART_Header" ContentSource="Header"HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />diff --git a/WaveDudeNext.WPF/Themes/Dark.xaml b/WaveDudeNext.WPF/Themes/Dark.xamlindex 7d4d832..57fb306 100644--- a/WaveDudeNext.WPF/Themes/Dark.xaml+++ b/WaveDudeNext.WPF/Themes/Dark.xaml@@ -36,6 +36,8 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<SolidColorBrush x:Key="MenuPopupBorder" Color="#FF333337" /><SolidColorBrush x:Key="MenuItemHover" Color="#FF333334" /><SolidColorBrush x:Key="MenuItemHoverForeground" Color="#FFF1F1F1" />+ <!-- a menu bar header with its menu open: the menu's own background, joining the two -->+ <SolidColorBrush x:Key="MenuHeaderOpen" Color="#FF1B1B1C" /><SolidColorBrush x:Key="MenuSeparator" Color="#FF333337" /><SolidColorBrush x:Key="MenuGlyph" Color="#FF999999" /><SolidColorBrush x:Key="MenuGlyphHover" Color="#FF007ACC" />diff --git a/WaveDudeNext.WPF/Themes/Light.xaml b/WaveDudeNext.WPF/Themes/Light.xamlindex cf66460..f963181 100644--- a/WaveDudeNext.WPF/Themes/Light.xaml+++ b/WaveDudeNext.WPF/Themes/Light.xaml@@ -36,6 +36,8 @@ version. It is distributed WITHOUT ANY WARRANTY. See the LICENSE.md file or<SolidColorBrush x:Key="MenuPopupBorder" Color="#FFCCCEDB" /><SolidColorBrush x:Key="MenuItemHover" Color="#FFC9DEF5" /><SolidColorBrush x:Key="MenuItemHoverForeground" Color="#FF1E1E1E" />+ <!-- a menu bar header with its menu open: the hover blue (2026-10-23; the menu's near-white barely showed on the bar) -->+ <SolidColorBrush x:Key="MenuHeaderOpen" Color="#FFC9DEF5" /><SolidColorBrush x:Key="MenuSeparator" Color="#FFCCCEDB" /><SolidColorBrush x:Key="MenuGlyph" Color="#FF717171" /><SolidColorBrush x:Key="MenuGlyphHover" Color="#FF007ACC" />diff --git a/_tools/ui_check/KeyboardCheck.ps1 b/_tools/ui_check/KeyboardCheck.ps1index b26b335..4975910 100644--- a/_tools/ui_check/KeyboardCheck.ps1+++ b/_tools/ui_check/KeyboardCheck.ps1@@ -17,7 +17,7 @@# The keyboard gaps closed on 2026-10-15: the toolbars of the Project and Messages panes are in the Tab cycle and the# dock pane titles are visible to UI Automation. On the default project: Tab walks the Project toolbar (the disabled-# buttons skipped) into the tree ("+ Part" between the two since 2026-10-18), Space on "+ Source" adds Source 2 and Space on the remove button takes it away, the+# buttons skipped) into the tree ("Part" between the two since 2026-10-18), Space on "Source" adds Source 2 and Space on the remove button takes it away, the# Messages pane is opened through View > Panes by keyboard, Tab walks its toolbar left to right, Space flips a level# and clears the list, and both pane titles read through their ids. See Common.ps1 for the rules (no mouse, no# activation, no UIA patterns). Prints PASS/FAIL per check and exits with the failure count.@@ -48,24 +48,24 @@ try {# ------------------------------------------------------------ the Project toolbar (the default project has no sources)FocusOn "ToolAddSource"$order = @(); for ($i = 0; $i -lt 3; $i++) { Key $VK_TAB 120; $order += (FocusedId) }- Check "Tab walks + Source > + Part > + Probe > the tree (move and remove are disabled with nothing selected and skipped)" (($order -join ",") -eq "ToolAddPart,ToolAddProbe,tree") ($order -join ",")+ Check "Tab walks Source > Probe > Part > the tree (move and remove are disabled with nothing selected and skipped)" (($order -join ",") -eq "ToolAddProbe,ToolAddPart,tree") ($order -join ",")FocusOn "ToolAddSource"Step "Space" $VK_SPACE 400$null = WaitFor { Has "Tree:Source 1" } 3000 100- Check "Space on + Source adds Source 1, selected in the tree, the focus on its first editor" ((Has "Tree:Source 1") -and (TreeItemSelected "Source 1")) (FocusedId)+ Check "Space on the Source button adds Source 1, selected in the tree, the focus on its first editor" ((Has "Tree:Source 1") -and (TreeItemSelected "Source 1")) (FocusedId)FocusOn "ToolAddSource" # round through the preview pane and backStep "Space" $VK_SPACE 400$null = WaitFor { Has "Tree:Source 2" } 3000 100Check "a second Space adds Source 2" ((Has "Tree:Source 2") -and (TreeItemSelected "Source 2"))# the walk to the toolbar passes the preview's source handles, and focusing a handle selects its source: the toolbar# acts on whatever is selected when it is reached, so that is read first and the action checked against it- FocusOn "ToolAddProbe"+ FocusOn "ToolAddPart"Key $VK_TAB 150$move = FocusedId$sel = if (TreeItemSelected "Source 2") { "Source 2" } else { "Source 1" }$other = if ($sel -eq "Source 2") { "Source 1" } else { "Source 2" }$selBelow = (Find "Tree:$sel").Current.BoundingRectangle.Top -gt (Find "Tree:$other").Current.BoundingRectangle.Top- Check "after + Probe, Tab reaches the one move button that applies: up for the lower item, down for the upper (the other is disabled and skipped)" (($move -eq "ToolMoveUp") -eq $selBelow -and ($move -eq "ToolMoveDown") -eq (-not $selBelow)) ("{0}, {1} selected, below: {2}" -f $move, $sel, $selBelow)+ Check "after Part, Tab reaches the one move button that applies: up for the lower item, down for the upper (the other is disabled and skipped)" (($move -eq "ToolMoveUp") -eq $selBelow -and ($move -eq "ToolMoveDown") -eq (-not $selBelow)) ("{0}, {1} selected, below: {2}" -f $move, $sel, $selBelow)Step "Space" $VK_SPACE 300$selBelowNow = (Find "Tree:$sel").Current.BoundingRectangle.Top -gt (Find "Tree:$other").Current.BoundingRectangle.TopCheck "Space on it swaps the two sources, the selection kept" ($selBelowNow -ne $selBelow -and (TreeItemSelected $sel)) ("{0} below: {1} -> {2}" -f $sel, $selBelow, $selBelowNow)