refactor: ResouceView

Move ResourceView and all related to ui core namespace GSS2.UI.Core
Split ResourceView on separate elements
Make parts folding depended on size
This commit is contained in:
2026-02-06 08:19:18 +03:00
parent c0336a55fd
commit 55260e0360
16 changed files with 528 additions and 545 deletions
@@ -0,0 +1,27 @@
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:GSS2.UI.Core.Views"
xmlns:vm="using:GSS2.UI.Core.ViewModels"
xmlns:behaviors="using:GSS2.UI.Core.Behaviors"
xmlns:lvc="using:LiveChartsCore.SkiaSharpView.Avalonia"
x:Class="GSS2.UI.Core.Views.ResourceCpuUsageBarsView"
x:DataType="vm:ResourceCpuUsageBarsViewModel"
Bounds="{Binding Bounds, Mode=OneWayToSource}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="*" behaviors:GridColumnHideBehavior.IsVisible="{Binding IsCoresColumnVisible}" />
<ColumnDefinition Width="*" behaviors:GridColumnHideBehavior.IsVisible="{Binding IsCoresColumnVisible}" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<local:ResourceBarView Grid.Row="0" Grid.RowSpan="2" Grid.Column="0" DataContext="{Binding Cpu}" />
<local:ResourceBarView Grid.Row="0" Grid.Column="1" DataContext="{Binding Cpu0}" />
<local:ResourceBarView Grid.Row="0" Grid.Column="2" DataContext="{Binding Cpu1}" />
<local:ResourceBarView Grid.Row="1" Grid.Column="1" DataContext="{Binding Cpu2}" />
<local:ResourceBarView Grid.Row="1" Grid.Column="2" DataContext="{Binding Cpu3}" />
</Grid>
</UserControl>