additional margin for M$ product

This commit is contained in:
maj00r
2026-08-25 21:44:19 +02:00
parent f9960e5113
commit 7503765aca
2 changed files with 15 additions and 10 deletions

View File

@@ -20,10 +20,9 @@
<DockPanel LastChildFill="True">
<!-- ── Top bar: thin caption strip (row 0) + toolbar (row 1) ────────────
The OS minimise / maximise / close buttons render at the top-right of
the caption strip, so they sit ABOVE the social-icon cluster, which
lives on the right of the toolbar row. -->
<!-- ── 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"
Background="{StaticResource CarbonPanelBg}"
BorderBrush="{StaticResource CarbonBorderLight}"
@@ -66,10 +65,11 @@
HorizontalContentAlignment="Center" />
</StackPanel>
<!-- Right cluster: version, language, social links.
In the toolbar row, so it sits below the OS caption buttons. -->
<StackPanel Grid.Column="3" Orientation="Horizontal" VerticalAlignment="Center"
Margin="0,0,8,0" Spacing="4">
<!-- 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"
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}}"
FontSize="10" Foreground="{StaticResource CarbonFgDim}" Padding="0" />

View File

@@ -4,6 +4,7 @@ using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Interactivity;
@@ -32,10 +33,14 @@ public partial class MainWindow : Window
// caption buttons, so only the two supported hints are set here (this
// Avalonia build no longer exposes ExtendClientAreaChromeHints).
ExtendClientAreaToDecorationsHint = true;
// Match the thin caption strip (row 0 of the top bar): the OS min/max/close
// buttons fill this height at the top-right, sitting above the social row.
ExtendClientAreaTitleBarHeightHint = 32;
// Windows draws the min / max / close buttons over the top-right corner of
// the extended client area, on top of the version + social cluster. Keep
// that corner free (3 buttons at the default 46px, plus a little air).
if (OperatingSystem.IsWindows())
RightCluster.Margin = new Thickness(0, 0, 146, 0);
PopulateLangCombo();
// Keep Start enabled/caption in sync with selection (Pascal actStartUpdate).