Ben, 2026-08-28: four changes, then build it, sign it, and make it deployable
through Intune without alerts.
1. The row of icons is a fifth shorter. Every toolbar label mode comes down
together so the proportions between them are unchanged: 34 -> 27 for a
caption beside the icon, 52/56 -> 42/45 for a caption under it, with the
padding reduced to match. The row measures 48px on screen where it was 60.
2. Scan sits in the main bar. It is a solid white button on the band, to the
left of the window buttons, so a person can pull pages off a copier whatever
the toolbar is showing. Behind it, Services/ScanService.cs talks to the
copier through WIA - the imaging service that ships with Windows, reached
late-bound so a machine without it fails at a check instead of at load - and
Features/Scan/ScanDialog picks the copier, the feed, the colour, the detail
and the paper. Pages come back as images and take the same route into a
document as an imported photograph. "Make the words searchable" runs the
text recognition the application already carries.
3. The official MMD lockup, in white, because the band is red now.
4. The MMD design system locked on 2026-08-28: ONE merged top bar carrying the
mark, the name, the tabs and the tools; 4px corners; 24px window buttons;
the bevel on title bars only. Colours are NOT adjusted - the Red Plate
silver and ink set already in Themes/MMD.xaml is untouched.
Also fixed, both found by looking at the running application at 800x600:
- The default 1000x700 window does not fit an 800x600 plant screen, and a
window taller than the screen puts its own title bar - and therefore Scan,
the window buttons and the tabs - above the top edge where nobody can reach
them. MainWindow now starts maximised when the screen cannot hold the
default.
- The close button was invisible: CaptionCloseBrush defaults to the danger
red, which on a red band is red on red. The window buttons are white now,
and close inverts to a white plate with a red cross on hover.
Built and run on mmd-win-test-01 at 800x600 through keyboard and mouse only.
Signed with the internal MMD code-signing certificate and timestamped.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
164 lines
9.8 KiB
XML
164 lines
9.8 KiB
XML
<!-- Pull pages off a copier. Chrome follows the MMD design system locked on 2026-08-28:
|
|
a front-window title bar (white to silver, 3px red top edge, ink text), 4px corners,
|
|
flat buttons, one red fill for the single action the person came to do. Every colour and
|
|
radius is a theme key from Themes/MMD.xaml - nothing is picked here. -->
|
|
<Window x:Class="MmdPdf.Features.Scan.ScanDialog"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
Title="Scan a document"
|
|
Width="520" SizeToContent="Height"
|
|
WindowStyle="None" ResizeMode="NoResize" ShowInTaskbar="False"
|
|
Background="Transparent"
|
|
TextOptions.TextFormattingMode="Display"
|
|
TextOptions.TextRenderingMode="ClearType"
|
|
UseLayoutRounding="True" SnapsToDevicePixels="True"
|
|
WindowStartupLocation="CenterOwner">
|
|
|
|
<Border Background="{DynamicResource BgFlyout}"
|
|
BorderBrush="{DynamicResource AppBorderBrush}" BorderThickness="1"
|
|
CornerRadius="{DynamicResource ControlCornerRadius}">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Title bar: the front-window treatment from the design system -->
|
|
<Border Grid.Row="0" Height="34"
|
|
Background="{DynamicResource WindowFrontTitleBrush}"
|
|
BorderBrush="{DynamicResource PrimaryBrush}" BorderThickness="0,3,0,0"
|
|
MouseLeftButtonDown="TitleBar_MouseLeftButtonDown">
|
|
<Grid Margin="12,0,8,0">
|
|
<TextBlock x:Name="TitleText" Text="Scan a document" VerticalAlignment="Center"
|
|
FontFamily="Segoe UI" FontSize="12.5" FontWeight="Bold"
|
|
Foreground="{DynamicResource TextBrush}"/>
|
|
<Button x:Name="CloseChrome" Click="Cancel_Click" HorizontalAlignment="Right"
|
|
VerticalAlignment="Center" Width="24" Height="24"
|
|
Background="Transparent" BorderThickness="0" Cursor="Hand"
|
|
Foreground="{DynamicResource TextBrush}" Content="✕"
|
|
FontFamily="Segoe UI" FontSize="11"/>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Body -->
|
|
<Grid Grid.Row="1" Margin="16,14,16,6">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<StackPanel Grid.Column="0">
|
|
<Grid Margin="0,0,0,8">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="86"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Text="COPIER" VerticalAlignment="Center" FontFamily="Consolas" FontSize="9.5"
|
|
Foreground="{DynamicResource DimTextBrush}"/>
|
|
<ComboBox x:Name="CopierBox" Grid.Column="1" Height="26" FontSize="11.5"/>
|
|
</Grid>
|
|
<Grid Margin="0,0,0,8">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="86"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Text="FEED" VerticalAlignment="Center" FontFamily="Consolas" FontSize="9.5"
|
|
Foreground="{DynamicResource DimTextBrush}"/>
|
|
<ComboBox x:Name="FeedBox" Grid.Column="1" Height="26" FontSize="11.5"/>
|
|
</Grid>
|
|
<Grid Margin="0,0,0,8">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="86"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Text="COLOUR" VerticalAlignment="Center" FontFamily="Consolas" FontSize="9.5"
|
|
Foreground="{DynamicResource DimTextBrush}"/>
|
|
<ComboBox x:Name="ColourBox" Grid.Column="1" Height="26" FontSize="11.5"/>
|
|
</Grid>
|
|
<Grid Margin="0,0,0,8">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="86"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Text="DETAIL" VerticalAlignment="Center" FontFamily="Consolas" FontSize="9.5"
|
|
Foreground="{DynamicResource DimTextBrush}"/>
|
|
<ComboBox x:Name="DetailBox" Grid.Column="1" Height="26" FontSize="11.5"/>
|
|
</Grid>
|
|
<Grid Margin="0,0,0,10">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="86"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Text="PAPER" VerticalAlignment="Center" FontFamily="Consolas" FontSize="9.5"
|
|
Foreground="{DynamicResource DimTextBrush}"/>
|
|
<ComboBox x:Name="PaperBox" Grid.Column="1" Height="26" FontSize="11.5"/>
|
|
</Grid>
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="86"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Text="AFTERWARDS" VerticalAlignment="Top" Margin="0,2,0,0"
|
|
FontFamily="Consolas" FontSize="9.5"
|
|
Foreground="{DynamicResource DimTextBrush}"/>
|
|
<StackPanel Grid.Column="1">
|
|
<CheckBox x:Name="SearchableBox" IsChecked="True" FontSize="11.5">
|
|
<TextBlock Text="Make the words searchable, in French and English"
|
|
TextWrapping="Wrap" MaxWidth="180"/>
|
|
</CheckBox>
|
|
<CheckBox x:Name="StraightenBox" Margin="0,6,0,0" FontSize="11.5">
|
|
<TextBlock Text="Straighten crooked pages" TextWrapping="Wrap" MaxWidth="180"/>
|
|
</CheckBox>
|
|
</StackPanel>
|
|
</Grid>
|
|
</StackPanel>
|
|
|
|
<!-- Sheet preview: what one page will look like -->
|
|
<Border Grid.Column="1" Width="132" Margin="16,0,0,0"
|
|
Background="{DynamicResource BgCanvas}"
|
|
BorderBrush="{DynamicResource InputBorderBrush}" BorderThickness="1"
|
|
CornerRadius="{DynamicResource ControlCornerRadius}">
|
|
<Border Width="96" Height="132" Margin="10" VerticalAlignment="Center"
|
|
Background="White" BorderBrush="{DynamicResource InputBorderBrush}" BorderThickness="1">
|
|
<StackPanel Margin="9,9,8,0">
|
|
<Rectangle Height="3" Width="56" HorizontalAlignment="Left" Margin="0,0,0,5"
|
|
Fill="{DynamicResource DimTextBrush}"/>
|
|
<Rectangle Height="2" Margin="0,0,0,4" Fill="{DynamicResource TreeLineBrush}"/>
|
|
<Rectangle Height="2" Width="66" HorizontalAlignment="Left" Margin="0,0,0,4"
|
|
Fill="{DynamicResource TreeLineBrush}"/>
|
|
<Rectangle Height="2" Width="44" HorizontalAlignment="Left" Margin="0,0,0,4"
|
|
Fill="{DynamicResource TreeLineBrush}"/>
|
|
<Rectangle Height="2" Margin="0,0,0,4" Fill="{DynamicResource TreeLineBrush}"/>
|
|
<Rectangle Height="2" Width="60" HorizontalAlignment="Left" Fill="{DynamicResource TreeLineBrush}"/>
|
|
</StackPanel>
|
|
</Border>
|
|
</Border>
|
|
</Grid>
|
|
|
|
<!-- Footer -->
|
|
<Border Grid.Row="2" Background="{DynamicResource SurfaceBrush}"
|
|
BorderBrush="{DynamicResource PaneBorderBrush}" BorderThickness="0,1,0,0"
|
|
CornerRadius="0,0,4,4" Padding="16,10">
|
|
<Grid>
|
|
<TextBlock x:Name="FootNote" VerticalAlignment="Center" FontSize="10.5"
|
|
Foreground="{DynamicResource DimTextBrush}"
|
|
Text="Pages arrive as one document you can edit"/>
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
|
<Button x:Name="CancelBtn" Content="Cancel" Click="Cancel_Click"
|
|
Height="28" Padding="13,0" Margin="0,0,8,0" FontSize="11.5" FontWeight="SemiBold"/>
|
|
<Button x:Name="ScanBtn" Content="Scan" Click="Scan_Click"
|
|
Height="28" Padding="13,0" FontSize="11.5" FontWeight="SemiBold"
|
|
Background="{DynamicResource PrimaryBrush}"
|
|
Foreground="{DynamicResource OnPrimaryBrush}"
|
|
BorderBrush="{DynamicResource PrimaryBrush}" BorderThickness="1"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
</Border>
|
|
</Window>
|