Скруглена таблица
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
using Sms.Environment;
|
|
||||||
|
|
||||||
namespace Sms.Environment.Linux;
|
namespace Sms.Environment.Linux;
|
||||||
|
|
||||||
public sealed class LinuxEnvironmentVariableStore : IEnvironmentVariableStore
|
public sealed class LinuxEnvironmentVariableStore : IEnvironmentVariableStore
|
||||||
|
|||||||
@@ -17,10 +17,24 @@
|
|||||||
<Style Selector="Button.titleButton:pointerover">
|
<Style Selector="Button.titleButton:pointerover">
|
||||||
<Setter Property="Background" Value="#D8D8D8" />
|
<Setter Property="Background" Value="#D8D8D8" />
|
||||||
</Style>
|
</Style>
|
||||||
|
<Style Selector="Button.titleButton.close">
|
||||||
|
<Setter Property="CornerRadius" Value="0,11,0,0" />
|
||||||
|
</Style>
|
||||||
<Style Selector="Button.titleButton.close:pointerover">
|
<Style Selector="Button.titleButton.close:pointerover">
|
||||||
<Setter Property="Background" Value="#E81123" />
|
<Setter Property="Background" Value="#E81123" />
|
||||||
<Setter Property="Foreground" Value="White" />
|
<Setter Property="Foreground" Value="White" />
|
||||||
</Style>
|
</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">
|
<Style Selector="DataGridRow.appSettings">
|
||||||
<Setter Property="Background" Value="#E3F2FD" />
|
<Setter Property="Background" Value="#E3F2FD" />
|
||||||
</Style>
|
</Style>
|
||||||
@@ -34,8 +48,5 @@
|
|||||||
<Style Selector="DataGridRow.appSettings.userStore">
|
<Style Selector="DataGridRow.appSettings.userStore">
|
||||||
<Setter Property="Background" Value="#C8E6C9" />
|
<Setter Property="Background" Value="#C8E6C9" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="DataGrid">
|
|
||||||
<Setter Property="RowHeight" Value="32" />
|
|
||||||
</Style>
|
|
||||||
</Application.Styles>
|
</Application.Styles>
|
||||||
</Application>
|
</Application>
|
||||||
|
|||||||
6
src/Sms.TaskTwo.Avalonia/AppResources.cs
Normal file
6
src/Sms.TaskTwo.Avalonia/AppResources.cs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
namespace Sms.TaskTwo.Avalonia;
|
||||||
|
|
||||||
|
public static class AppResources
|
||||||
|
{
|
||||||
|
public const string WindowTitle = "Тестовое Avalonia-приложение для SmartMealService";
|
||||||
|
}
|
||||||
@@ -6,8 +6,8 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
x:Class="Sms.TaskTwo.Avalonia.Views.MainWindow"
|
x:Class="Sms.TaskTwo.Avalonia.Views.MainWindow"
|
||||||
x:DataType="vm:MainWindowViewModel"
|
x:DataType="vm:MainWindowViewModel"
|
||||||
Title="{x:Static core:AppResources.WindowTitle}"
|
Title="{x:Static app:AppResources.WindowTitle}"
|
||||||
xmlns:core="using:Sms.TaskTwo.Core"
|
xmlns:app="using:Sms.TaskTwo.Avalonia"
|
||||||
Width="960"
|
Width="960"
|
||||||
Height="600"
|
Height="600"
|
||||||
MinWidth="760"
|
MinWidth="760"
|
||||||
@@ -20,14 +20,17 @@
|
|||||||
Background="White"
|
Background="White"
|
||||||
BorderBrush="#C8C8C8"
|
BorderBrush="#C8C8C8"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
Margin="8">
|
Margin="8"
|
||||||
|
ClipToBounds="True">
|
||||||
<Grid RowDefinitions="Auto,Auto,Auto,Auto,*">
|
<Grid RowDefinitions="Auto,Auto,Auto,Auto,*">
|
||||||
<Grid Grid.Row="0"
|
<Border Grid.Row="0"
|
||||||
ColumnDefinitions="*,Auto,Auto"
|
|
||||||
Background="#ECECEC"
|
Background="#ECECEC"
|
||||||
|
CornerRadius="11,11,0,0"
|
||||||
|
ClipToBounds="True"
|
||||||
Height="44">
|
Height="44">
|
||||||
|
<Grid ColumnDefinitions="*,Auto,Auto">
|
||||||
<TextBlock Grid.Column="0"
|
<TextBlock Grid.Column="0"
|
||||||
Text="{x:Static core:AppResources.WindowTitle}"
|
Text="{x:Static app:AppResources.WindowTitle}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Margin="16,0,8,0"
|
Margin="16,0,8,0"
|
||||||
FontSize="14" />
|
FontSize="14" />
|
||||||
@@ -40,6 +43,7 @@
|
|||||||
Content="×"
|
Content="×"
|
||||||
Click="OnCloseClick" />
|
Click="OnCloseClick" />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
|
||||||
<Grid Grid.Row="1"
|
<Grid Grid.Row="1"
|
||||||
Margin="12,8,12,0"
|
Margin="12,8,12,0"
|
||||||
@@ -89,9 +93,15 @@
|
|||||||
IsVisible="{Binding ReloadEnvironmentMessage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}" />
|
IsVisible="{Binding ReloadEnvironmentMessage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<DataGrid x:Name="VariablesGrid"
|
<Border Grid.Row="4"
|
||||||
Grid.Row="4"
|
|
||||||
Margin="12,4,12,12"
|
Margin="12,4,12,12"
|
||||||
|
CornerRadius="8"
|
||||||
|
ClipToBounds="True"
|
||||||
|
Background="White"
|
||||||
|
BorderBrush="#B0B0B0"
|
||||||
|
BorderThickness="1">
|
||||||
|
<DataGrid x:Name="VariablesGrid"
|
||||||
|
Classes="roundedGrid"
|
||||||
ItemsSource="{Binding Rows}"
|
ItemsSource="{Binding Rows}"
|
||||||
AutoGenerateColumns="False"
|
AutoGenerateColumns="False"
|
||||||
CanUserReorderColumns="False"
|
CanUserReorderColumns="False"
|
||||||
@@ -99,8 +109,7 @@
|
|||||||
CanUserSortColumns="False"
|
CanUserSortColumns="False"
|
||||||
GridLinesVisibility="All"
|
GridLinesVisibility="All"
|
||||||
HeadersVisibility="Column"
|
HeadersVisibility="Column"
|
||||||
BorderThickness="1"
|
BorderThickness="0"
|
||||||
BorderBrush="#B0B0B0"
|
|
||||||
LoadingRow="OnLoadingRow">
|
LoadingRow="OnLoadingRow">
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTemplateColumn Header=""
|
<DataGridTemplateColumn Header=""
|
||||||
@@ -134,6 +143,7 @@
|
|||||||
MinWidth="180" />
|
MinWidth="180" />
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
namespace Sms.TaskTwo.Core;
|
|
||||||
|
|
||||||
public static class AppResources
|
|
||||||
{
|
|
||||||
public const string WindowTitle = "Тестовое WPF-приложение для SmartMealService";
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user