mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-05 21:29:09 +01:00
additional margin for M$ product
This commit is contained in:
@@ -20,10 +20,9 @@
|
|||||||
|
|
||||||
<DockPanel LastChildFill="True">
|
<DockPanel LastChildFill="True">
|
||||||
|
|
||||||
<!-- ── Top bar: thin caption strip (row 0) + toolbar (row 1) ────────────
|
<!-- ── Top bar: logo, navigation and the right cluster in one row.
|
||||||
The OS minimise / maximise / close buttons render at the top-right of
|
The OS minimise / maximise / close buttons render over its top-right
|
||||||
the caption strip, so they sit ABOVE the social-icon cluster, which
|
corner (see RightCluster). -->
|
||||||
lives on the right of the toolbar row. -->
|
|
||||||
<Border DockPanel.Dock="Top"
|
<Border DockPanel.Dock="Top"
|
||||||
Background="{StaticResource CarbonPanelBg}"
|
Background="{StaticResource CarbonPanelBg}"
|
||||||
BorderBrush="{StaticResource CarbonBorderLight}"
|
BorderBrush="{StaticResource CarbonBorderLight}"
|
||||||
@@ -66,10 +65,11 @@
|
|||||||
HorizontalContentAlignment="Center" />
|
HorizontalContentAlignment="Center" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<!-- Right cluster: version, language, social links.
|
<!-- Right cluster: version, language, social links. On Windows
|
||||||
In the toolbar row, so it sits below the OS caption buttons. -->
|
the OS caption buttons are drawn over this corner, so the
|
||||||
<StackPanel Grid.Column="3" Orientation="Horizontal" VerticalAlignment="Center"
|
margin is widened in code-behind to clear them. -->
|
||||||
Margin="0,0,8,0" Spacing="4">
|
<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">
|
<StackPanel Orientation="Vertical" VerticalAlignment="Center" Margin="0,0,8,0">
|
||||||
<Label Content="{Binding [Version], Source={x:Static starterNg:App.Loc}}"
|
<Label Content="{Binding [Version], Source={x:Static starterNg:App.Loc}}"
|
||||||
FontSize="10" Foreground="{StaticResource CarbonFgDim}" Padding="0" />
|
FontSize="10" Foreground="{StaticResource CarbonFgDim}" Padding="0" />
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Input;
|
using Avalonia.Input;
|
||||||
using Avalonia.Interactivity;
|
using Avalonia.Interactivity;
|
||||||
@@ -32,10 +33,14 @@ public partial class MainWindow : Window
|
|||||||
// caption buttons, so only the two supported hints are set here (this
|
// caption buttons, so only the two supported hints are set here (this
|
||||||
// Avalonia build no longer exposes ExtendClientAreaChromeHints).
|
// Avalonia build no longer exposes ExtendClientAreaChromeHints).
|
||||||
ExtendClientAreaToDecorationsHint = true;
|
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;
|
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();
|
PopulateLangCombo();
|
||||||
|
|
||||||
// Keep Start enabled/caption in sync with selection (Pascal actStartUpdate).
|
// Keep Start enabled/caption in sync with selection (Pascal actStartUpdate).
|
||||||
|
|||||||
Reference in New Issue
Block a user