100 lines
5.2 KiB
XML
100 lines
5.2 KiB
XML
<Window xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:loc="using:EarthModelStudio.Services"
|
|
x:Class="EarthModelStudio.Views.MainWindow"
|
|
Title="{loc:Loc app.name}"
|
|
Width="1220" Height="800"
|
|
MinWidth="1040" MinHeight="700"
|
|
Background="#0A1120"
|
|
TransparencyLevelHint="None"
|
|
SystemDecorations="None"
|
|
WindowStartupLocation="CenterScreen">
|
|
|
|
<!-- 禁用系统标题栏,改用自建标题栏;外层圆角容器让整个窗口四角变圆。
|
|
用深色不透明底,避免透明/亚克力在无边框窗口下露出系统白边。 -->
|
|
<Border CornerRadius="16" ClipToBounds="True"
|
|
Background="{DynamicResource AppBg}"
|
|
BorderBrush="#0A1120" BorderThickness="1"
|
|
BoxShadow="0 18 50 0 #400A1226">
|
|
<Grid RowDefinitions="44,*">
|
|
<!-- 自建标题栏 -->
|
|
<Border x:Name="TitleBar" Grid.Row="0" Background="{DynamicResource TitleBarBg}"
|
|
PointerPressed="OnTitleBarPointerPressed">
|
|
<Grid ColumnDefinitions="*,Auto,Auto" Margin="16,0,8,0">
|
|
<StackPanel Orientation="Horizontal" Spacing="10" VerticalAlignment="Center">
|
|
<Border Width="22" Height="22" CornerRadius="7" Background="#1C2C4C">
|
|
<TextBlock Text="◎" FontSize="13" Foreground="#8FB6FF"
|
|
HorizontalAlignment="Center" VerticalAlignment="Center" />
|
|
</Border>
|
|
<TextBlock Text="{loc:Loc app.name}" Foreground="#F2F6FF" FontSize="12.5"
|
|
FontWeight="SemiBold" VerticalAlignment="Center" />
|
|
</StackPanel>
|
|
<Button x:Name="MinimizeButton" Grid.Column="1" Classes="titlebtn"
|
|
Content="—" Click="OnMinimizeClick" />
|
|
<Button x:Name="CloseButton" Grid.Column="2" Classes="titlebtn close"
|
|
Content="✕" Click="OnCloseClick" />
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- 原内容整体下移一行 -->
|
|
<Grid Grid.Row="1" ColumnDefinitions="236,*" RowDefinitions="*,Auto">
|
|
|
|
<!-- 侧栏:品牌已在标题栏展示,这里只留一句副标题,避免重复 -->
|
|
<Border Grid.Column="0" Grid.RowSpan="2" Background="{DynamicResource SideBgBrush}">
|
|
<Grid RowDefinitions="Auto,*,Auto" Margin="16,20,16,18">
|
|
|
|
<StackPanel Spacing="3" Margin="2,0,0,0">
|
|
<TextBlock Text="{loc:Loc app.tagline}" Foreground="#7C90B4" FontSize="10.5"
|
|
TextWrapping="Wrap" />
|
|
</StackPanel>
|
|
|
|
<StackPanel Grid.Row="1" Margin="0,26,0,0" Spacing="6">
|
|
<TextBlock Text="MENU" Foreground="#4C5F80" FontSize="9.5" FontWeight="SemiBold" Margin="14,0,0,4" />
|
|
<Button Classes="nav" Classes.active="{Binding IsHomeActive}"
|
|
Command="{Binding GoHomeCommand}" Content="{loc:Loc nav.home}" />
|
|
<Button Classes="nav" Classes.active="{Binding IsDownloadActive}"
|
|
Command="{Binding GoDownloadCommand}" Content="{loc:Loc nav.download}" />
|
|
<Button Classes="nav" Classes.active="{Binding IsSettingsActive}"
|
|
Command="{Binding GoSettingsCommand}" Content="{loc:Loc nav.settings}" />
|
|
</StackPanel>
|
|
|
|
<StackPanel Grid.Row="2" Spacing="4">
|
|
<Border Height="1" Background="{DynamicResource SideLine}" Margin="0,0,0,10" />
|
|
<TextBlock Text="{Binding VersionText}" Foreground="#6F82A6" FontSize="10.5" Margin="14,0,0,0" />
|
|
<TextBlock Text="{Binding PlatformText}" Foreground="#4F6080" FontSize="10" Margin="14,0,0,0" />
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- 内容:页面切换由 MainWindow 做淡入过渡,避免硬切 -->
|
|
<ContentControl x:Name="PageHost" Grid.Column="1" Grid.Row="0" Content="{Binding Current}" />
|
|
|
|
<!-- 启动更新状态条:模型立即生效,启动器下次启动生效 -->
|
|
<Border Grid.Column="1" Grid.Row="1"
|
|
Background="{DynamicResource Surface}"
|
|
BorderBrush="{DynamicResource Line}" BorderThickness="0,1,0,0"
|
|
Padding="20,9" IsVisible="{Binding UpdateBarVisible}">
|
|
<Grid ColumnDefinitions="Auto,*,Auto,Auto">
|
|
<TextBlock Grid.Column="0" Text="⟳" FontSize="16" Foreground="{DynamicResource Accent}"
|
|
VerticalAlignment="Center" Margin="0,0,12,0" />
|
|
<StackPanel Grid.Column="1" Spacing="2" VerticalAlignment="Center">
|
|
<TextBlock Text="{Binding UpdateStatus}" FontSize="12.5" FontWeight="SemiBold"
|
|
Foreground="{DynamicResource Ink}" TextTrimming="CharacterEllipsis" />
|
|
<TextBlock Text="{Binding UpdateDetail}" Classes="faint" TextTrimming="CharacterEllipsis" />
|
|
<TextBlock Text="{Binding LauncherNotice}" FontSize="11" Foreground="{DynamicResource Warn}"
|
|
TextWrapping="Wrap" />
|
|
</StackPanel>
|
|
<ProgressBar Grid.Column="2" Width="130" Minimum="0" Maximum="1"
|
|
Value="{Binding UpdateProgress}" IsVisible="{Binding UpdateBusy}"
|
|
VerticalAlignment="Center" Margin="14,0" />
|
|
<Button Grid.Column="3" Classes="ghost small" Content="{loc:Loc update.checkNow}"
|
|
Command="{Binding CheckUpdateCommand}" IsEnabled="{Binding !UpdateBusy}"
|
|
VerticalAlignment="Center" />
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
</Grid>
|
|
</Border>
|
|
</Window>
|