feat(ui): add sticky version label to variables pane\n\n- Split left SplitView pane into scroll area + bottom bar\n- Show current app version from AssemblyInformationalVersion\n- Uses theme surface + top border per design tokens
This commit is contained in:
parent
a64cc5a683
commit
74c5b403ae
2 changed files with 15 additions and 1 deletions
|
@ -6,6 +6,7 @@ using AdvancedCalculator.Models;
|
||||||
using AdvancedCalculator.Services;
|
using AdvancedCalculator.Services;
|
||||||
using CSMic;
|
using CSMic;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
namespace AdvancedCalculator.ViewModels;
|
namespace AdvancedCalculator.ViewModels;
|
||||||
|
|
||||||
|
@ -42,6 +43,12 @@ public partial class MainViewModel : ViewModelBase
|
||||||
public ObservableCollection<HistoryItem> History { get; }
|
public ObservableCollection<HistoryItem> History { get; }
|
||||||
public ObservableCollection<VariableItem> Variables { get; }
|
public ObservableCollection<VariableItem> Variables { get; }
|
||||||
|
|
||||||
|
// App version string, sourced from AssemblyInformationalVersion
|
||||||
|
public string AppVersion { get; } =
|
||||||
|
typeof(MainViewModel).Assembly
|
||||||
|
.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?
|
||||||
|
.InformationalVersion ?? "0.0.0";
|
||||||
|
|
||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
private void ToggleFunctions()
|
private void ToggleFunctions()
|
||||||
{
|
{
|
||||||
|
|
|
@ -26,7 +26,8 @@
|
||||||
|
|
||||||
<!-- Left pane: Variables only (Functions moved to flyout) -->
|
<!-- Left pane: Variables only (Functions moved to flyout) -->
|
||||||
<SplitView.Pane>
|
<SplitView.Pane>
|
||||||
<Grid Background="{DynamicResource Brush.Surface}">
|
<Grid Background="{DynamicResource Brush.Surface}"
|
||||||
|
RowDefinitions="*,Auto">
|
||||||
|
|
||||||
<!-- Variables list with empty-state hint overlay -->
|
<!-- Variables list with empty-state hint overlay -->
|
||||||
<Grid Grid.Row="0">
|
<Grid Grid.Row="0">
|
||||||
|
@ -64,6 +65,12 @@
|
||||||
HorizontalAlignment="Center" VerticalAlignment="Center" />
|
HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
<!-- Bottom sticky version bar -->
|
||||||
|
<Border Grid.Row="1" Padding="10" Background="{DynamicResource Brush.Surface}"
|
||||||
|
BorderBrush="{DynamicResource Brush.Border}" BorderThickness="0,1,0,0">
|
||||||
|
<TextBlock Text="{Binding AppVersion, StringFormat='Version {0}'}"
|
||||||
|
HorizontalAlignment="Left"/>
|
||||||
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
</SplitView.Pane>
|
</SplitView.Pane>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue