mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-08 14:59:40 +01:00
Pad the top bar down on Windows instead of the right cluster
The 146px right margin pushed the version and social icons inwards on every window width. Padding the whole bar down by the caption height gives the OS buttons a strip of their own and leaves the cluster where it was; the strip drags the window, so the handler moves to the bar's border.
This commit is contained in:
@@ -21,19 +21,18 @@
|
||||
<DockPanel LastChildFill="True">
|
||||
|
||||
<!-- ── Top bar: logo, navigation and the right cluster in one row.
|
||||
The OS minimise / maximise / close buttons render over its top-right
|
||||
corner (see RightCluster). -->
|
||||
<Border DockPanel.Dock="Top"
|
||||
On Windows the OS caption buttons are drawn over the top of the
|
||||
extended client area, so TopBar is padded down to clear them
|
||||
(see the constructor); the free strip drags the window. -->
|
||||
<Border x:Name="TopBar" DockPanel.Dock="Top"
|
||||
Background="{StaticResource CarbonPanelBg}"
|
||||
BorderBrush="{StaticResource CarbonBorderLight}"
|
||||
BorderThickness="0,0,0,1">
|
||||
BorderThickness="0,0,0,1"
|
||||
PointerPressed="TitleBar_OnPointerPressed">
|
||||
<Grid RowDefinitions="48">
|
||||
|
||||
<!-- Logo + navigation (left) and the right cluster (right) -->
|
||||
<!-- Drag-to-move handled by PointerPressed on parent grid -->
|
||||
<Grid ColumnDefinitions="Auto,Auto,*,Auto"
|
||||
Background="Transparent"
|
||||
PointerPressed="TitleBar_OnPointerPressed">
|
||||
<Grid ColumnDefinitions="Auto,Auto,*,Auto" Background="Transparent">
|
||||
|
||||
<!-- Logo -->
|
||||
<Image Grid.Column="0" Source="/Assets/Logo/maszyna_white.png"
|
||||
@@ -65,10 +64,8 @@
|
||||
HorizontalContentAlignment="Center" />
|
||||
</StackPanel>
|
||||
|
||||
<!-- Right cluster: version, language, social links. On Windows
|
||||
the OS caption buttons are drawn over this corner, so the
|
||||
margin is widened in code-behind to clear them. -->
|
||||
<StackPanel x:Name="RightCluster" Grid.Column="3" Orientation="Horizontal"
|
||||
<!-- Right cluster: version, language, social links. -->
|
||||
<StackPanel Grid.Column="3" Orientation="Horizontal"
|
||||
VerticalAlignment="Center" Margin="0,0,8,0" Spacing="4">
|
||||
<StackPanel Orientation="Vertical" VerticalAlignment="Center" Margin="0,0,8,0">
|
||||
<Label Content="{Binding [Version], Source={x:Static starterNg:App.Loc}}"
|
||||
|
||||
Reference in New Issue
Block a user