Скруглена таблица

This commit is contained in:
2026-06-04 20:42:57 +03:00
parent 2565c138e4
commit 095ff99cf9
5 changed files with 96 additions and 77 deletions

View File

@@ -1,5 +1,3 @@
using Sms.Environment;
namespace Sms.Environment.Linux;
public sealed class LinuxEnvironmentVariableStore : IEnvironmentVariableStore

View File

@@ -17,10 +17,24 @@
<Style Selector="Button.titleButton:pointerover">
<Setter Property="Background" Value="#D8D8D8" />
</Style>
<Style Selector="Button.titleButton.close">
<Setter Property="CornerRadius" Value="0,11,0,0" />
</Style>
<Style Selector="Button.titleButton.close:pointerover">
<Setter Property="Background" Value="#E81123" />
<Setter Property="Foreground" Value="White" />
</Style>
<Style Selector="DataGrid.roundedGrid">
<Setter Property="RowHeight" Value="32" />
<Setter Property="Background" Value="Transparent" />
</Style>
<Style Selector="DataGrid.roundedGrid DataGridColumnHeader">
<Setter Property="Background" Value="Transparent" />
</Style>
<Style Selector="DataGrid.roundedGrid DataGridColumnHeader /template/ Border#HeaderBorder">
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="Transparent" />
</Style>
<Style Selector="DataGridRow.appSettings">
<Setter Property="Background" Value="#E3F2FD" />
</Style>
@@ -34,8 +48,5 @@
<Style Selector="DataGridRow.appSettings.userStore">
<Setter Property="Background" Value="#C8E6C9" />
</Style>
<Style Selector="DataGrid">
<Setter Property="RowHeight" Value="32" />
</Style>
</Application.Styles>
</Application>

View File

@@ -0,0 +1,6 @@
namespace Sms.TaskTwo.Avalonia;
public static class AppResources
{
public const string WindowTitle = "Тестовое Avalonia-приложение для SmartMealService";
}

View File

@@ -6,8 +6,8 @@
mc:Ignorable="d"
x:Class="Sms.TaskTwo.Avalonia.Views.MainWindow"
x:DataType="vm:MainWindowViewModel"
Title="{x:Static core:AppResources.WindowTitle}"
xmlns:core="using:Sms.TaskTwo.Core"
Title="{x:Static app:AppResources.WindowTitle}"
xmlns:app="using:Sms.TaskTwo.Avalonia"
Width="960"
Height="600"
MinWidth="760"
@@ -20,14 +20,17 @@
Background="White"
BorderBrush="#C8C8C8"
BorderThickness="1"
Margin="8">
Margin="8"
ClipToBounds="True">
<Grid RowDefinitions="Auto,Auto,Auto,Auto,*">
<Grid Grid.Row="0"
ColumnDefinitions="*,Auto,Auto"
<Border Grid.Row="0"
Background="#ECECEC"
CornerRadius="11,11,0,0"
ClipToBounds="True"
Height="44">
<Grid ColumnDefinitions="*,Auto,Auto">
<TextBlock Grid.Column="0"
Text="{x:Static core:AppResources.WindowTitle}"
Text="{x:Static app:AppResources.WindowTitle}"
VerticalAlignment="Center"
Margin="16,0,8,0"
FontSize="14" />
@@ -40,6 +43,7 @@
Content="×"
Click="OnCloseClick" />
</Grid>
</Border>
<Grid Grid.Row="1"
Margin="12,8,12,0"
@@ -89,9 +93,15 @@
IsVisible="{Binding ReloadEnvironmentMessage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}" />
</StackPanel>
<DataGrid x:Name="VariablesGrid"
Grid.Row="4"
<Border Grid.Row="4"
Margin="12,4,12,12"
CornerRadius="8"
ClipToBounds="True"
Background="White"
BorderBrush="#B0B0B0"
BorderThickness="1">
<DataGrid x:Name="VariablesGrid"
Classes="roundedGrid"
ItemsSource="{Binding Rows}"
AutoGenerateColumns="False"
CanUserReorderColumns="False"
@@ -99,8 +109,7 @@
CanUserSortColumns="False"
GridLinesVisibility="All"
HeadersVisibility="Column"
BorderThickness="1"
BorderBrush="#B0B0B0"
BorderThickness="0"
LoadingRow="OnLoadingRow">
<DataGrid.Columns>
<DataGridTemplateColumn Header=""
@@ -134,6 +143,7 @@
MinWidth="180" />
</DataGrid.Columns>
</DataGrid>
</Border>
</Grid>
</Border>
</Window>

View File

@@ -1,6 +0,0 @@
namespace Sms.TaskTwo.Core;
public static class AppResources
{
public const string WindowTitle = "Тестовое WPF-приложение для SmartMealService";
}