Layout : sidebar spans full window height, footer scoped to content column
Restructured the outer Grid to a proper 2×3 layout instead of stacked
rows-with-margins :
Outer Grid Col 0 (200) | Col 1 (*)
Row 0 (Auto) ───── Top bar (ColSpan 2) ─────
Row 1 (*) Sidebar | Content area
(RowSpan 2) | (Library / Report / Doc)
Row 2 (Auto) | Footer (only on Library)
Previously the sidebar lived inside an inner body Grid limited to Row 1,
and the footer was at outer Row 2 with a hand-crafted 200px left margin
to fake the sidebar carve-out — which left a visible footer-background
strip across the bottom and broke the visual continuity of the sidebar.
Now :
- Sidebar Grid.Row=1 + RowSpan=2 → reaches the bottom of the window
regardless of footer visibility
- Footer Grid.Row=2 + Grid.Column=1 → cleanly cantonné dans la colonne
content, ne déborde plus
- Top bar Grid.Row=0 + Grid.ColumnSpan=2 → toujours full width
- Background image limitée à Row=1 + Col=1 → ne déborde ni sous la
sidebar ni sous le footer
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -173,19 +173,41 @@
|
||||
</DataTemplate>
|
||||
</Window.Resources>
|
||||
|
||||
<!--
|
||||
Layout principal — grille 2 colonnes × 3 rangées :
|
||||
|
||||
┌─────────────────────────────────────────────────────────────┐
|
||||
│ Top bar (ColSpan 2) │ Row 0
|
||||
├──────────┬──────────────────────────────────────────────────┤
|
||||
│ │ │
|
||||
│ Sidebar │ Content area │ Row 1
|
||||
│ (Library │ (Library / Report / Doc) │
|
||||
│ Report │ │
|
||||
│ Doc) ├──────────────────────────────────────────────────┤
|
||||
│ RowSpan2 │ Footer (DL/install) │ Row 2
|
||||
│ │ visible only on Library │
|
||||
└──────────┴──────────────────────────────────────────────────┘
|
||||
200px *
|
||||
|
||||
La sidebar a RowSpan=2 → s'étend du sous-topbar jusqu'au bas
|
||||
de fenêtre. Le footer est confiné à la colonne content.
|
||||
-->
|
||||
<Grid Background="Black">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="200" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Background image : limité au body uniquement (Grid.Row="1") pour ne pas
|
||||
se faire chevaucher par le footer quand un download tourne. ImageBrush
|
||||
avec AlignmentX=Right + AlignmentY=Bottom : si le ratio fenêtre force
|
||||
un crop, on rogne en haut/à gauche — le logo ASTERION VR en bas-droite
|
||||
reste TOUJOURS visible. -->
|
||||
<Rectangle Grid.Row="1" IsHitTestVisible="False">
|
||||
<!-- Background image : limité à la zone content (Row 1, Col 1) pour ne pas
|
||||
passer derrière la sidebar ni le footer. ImageBrush avec AlignmentX=Right
|
||||
+ AlignmentY=Bottom : si le ratio fenêtre force un crop, on rogne en
|
||||
haut/à gauche — le logo ASTERION VR en bas-droite reste TOUJOURS visible. -->
|
||||
<Rectangle Grid.Row="1" Grid.Column="1" IsHitTestVisible="False">
|
||||
<Rectangle.Fill>
|
||||
<ImageBrush ImageSource="pack://application:,,,/Resources/Background.png"
|
||||
Stretch="UniformToFill"
|
||||
@@ -195,8 +217,9 @@
|
||||
</Rectangle.Fill>
|
||||
</Rectangle>
|
||||
|
||||
<!-- Top bar : 3 colonnes (brand / license center / chrome) -->
|
||||
<Border Grid.Row="0" Background="{StaticResource Brush.Bg.Sidebar}"
|
||||
<!-- Top bar : 3 colonnes (brand / license center / chrome).
|
||||
Grid.ColumnSpan=2 → s'étend sur sidebar + content. -->
|
||||
<Border Grid.Row="0" Grid.ColumnSpan="2" Background="{StaticResource Brush.Bg.Sidebar}"
|
||||
BorderBrush="{StaticResource Brush.Border}" BorderThickness="0,0,0,1"
|
||||
Padding="20,12">
|
||||
<Grid>
|
||||
@@ -316,20 +339,10 @@
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!--
|
||||
Body : grid 2 colonnes — sidebar de navigation fixe à GAUCHE,
|
||||
content area swap-pable à droite. Le content area lui-même est un
|
||||
Grid qui superpose plusieurs blocs (Library / Report / Documentation)
|
||||
gérés par leur Visibility liée à CurrentPage.
|
||||
-->
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="200" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- ============== Content area (col 1, swap par CurrentPage) ============== -->
|
||||
<Grid Grid.Column="1">
|
||||
<!-- ============== Content area (Row 1, Col 1, swap par CurrentPage) ==============
|
||||
Superpose plusieurs blocs (Library / Report / Documentation) gérés par
|
||||
leur Visibility liée à CurrentPage. -->
|
||||
<Grid Grid.Row="1" Grid.Column="1">
|
||||
|
||||
<!-- ====================== LIBRARY PAGE ====================== -->
|
||||
<Grid Visibility="{Binding IsLibrary, Converter={StaticResource BoolToVisibility}}">
|
||||
@@ -588,50 +601,50 @@
|
||||
Visibility="{Binding HasDocumentationUrl, Converter={StaticResource InverseBoolToVisibility}}" />
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
<!-- ============== END Content area ============== -->
|
||||
|
||||
<!-- ============== Left sidebar : nav buttons ============== -->
|
||||
<Border Grid.Column="0"
|
||||
Background="#0A0A0E"
|
||||
BorderBrush="{StaticResource Brush.Border}"
|
||||
BorderThickness="0,0,1,0">
|
||||
<StackPanel Orientation="Vertical" Margin="0,16,0,0">
|
||||
<!-- Style des boutons définis dans Theme.xaml (NavButton) -->
|
||||
<Button Style="{StaticResource NavButton}"
|
||||
Command="{Binding NavigateLibraryCommand}"
|
||||
Tag="{Binding IsLibrary}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="📚" FontSize="16" Margin="0,0,12,0" VerticalAlignment="Center" />
|
||||
<TextBlock Text="{x:Static loc:Strings.NavLibrary}" VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Style="{StaticResource NavButton}"
|
||||
Command="{Binding NavigateReportCommand}"
|
||||
Tag="{Binding IsReport}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="📊" FontSize="16" Margin="0,0,12,0" VerticalAlignment="Center" />
|
||||
<TextBlock Text="{x:Static loc:Strings.NavReport}" VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Style="{StaticResource NavButton}"
|
||||
Command="{Binding NavigateDocumentationCommand}"
|
||||
Tag="{Binding IsDocumentation}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="📖" FontSize="16" Margin="0,0,12,0" VerticalAlignment="Center" />
|
||||
<TextBlock Text="{x:Static loc:Strings.NavDocumentation}" VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
<!-- ============== END Content area ============== -->
|
||||
|
||||
<!-- Footer : visible uniquement quand busy / status à afficher.
|
||||
Le bouton "Vérifier les MAJ" a été déplacé en flottant au-dessus du body.
|
||||
Margin gauche = 200px = largeur de la sidebar (Grid de la Row 1) ; ainsi
|
||||
le footer reste cantonné sous la zone Library/Report/Doc et ne déborde
|
||||
pas sous la sidebar. Si on change la largeur de la sidebar, ajuster ici. -->
|
||||
<Border Grid.Row="2" Background="{StaticResource Brush.Bg.Footer}"
|
||||
<!-- ============== Left sidebar : nav buttons ==============
|
||||
Row 1 + Row 2 (RowSpan=2) → la sidebar s'étend depuis le bas du
|
||||
top bar jusqu'en bas de la fenêtre, peu importe la visibilité du
|
||||
footer ou de la taille de la zone content. -->
|
||||
<Border Grid.Row="1" Grid.RowSpan="2" Grid.Column="0"
|
||||
Background="#0A0A0E"
|
||||
BorderBrush="{StaticResource Brush.Border}"
|
||||
BorderThickness="0,0,1,0">
|
||||
<StackPanel Orientation="Vertical" Margin="0,16,0,0">
|
||||
<!-- Style des boutons définis dans Theme.xaml (NavButton) -->
|
||||
<Button Style="{StaticResource NavButton}"
|
||||
Command="{Binding NavigateLibraryCommand}"
|
||||
Tag="{Binding IsLibrary}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="📚" FontSize="16" Margin="0,0,12,0" VerticalAlignment="Center" />
|
||||
<TextBlock Text="{x:Static loc:Strings.NavLibrary}" VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Style="{StaticResource NavButton}"
|
||||
Command="{Binding NavigateReportCommand}"
|
||||
Tag="{Binding IsReport}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="📊" FontSize="16" Margin="0,0,12,0" VerticalAlignment="Center" />
|
||||
<TextBlock Text="{x:Static loc:Strings.NavReport}" VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Style="{StaticResource NavButton}"
|
||||
Command="{Binding NavigateDocumentationCommand}"
|
||||
Tag="{Binding IsDocumentation}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="📖" FontSize="16" Margin="0,0,12,0" VerticalAlignment="Center" />
|
||||
<TextBlock Text="{x:Static loc:Strings.NavDocumentation}" VerticalAlignment="Center" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Footer : Row 2, Col 1 → cantonné à la colonne content, sous la zone
|
||||
Library/Report/Doc. La sidebar (RowSpan=2) le contourne par sa colonne. -->
|
||||
<Border Grid.Row="2" Grid.Column="1"
|
||||
Background="{StaticResource Brush.Bg.Footer}"
|
||||
BorderBrush="{StaticResource Brush.Border}" BorderThickness="0,1,0,0"
|
||||
Padding="20,10"
|
||||
Margin="200,0,0,0"
|
||||
|
||||
Reference in New Issue
Block a user