- tweak: prettify

This commit is contained in:
2025-01-23 20:43:52 +03:00
parent 019dd13d8e
commit 1374772d46
7 changed files with 124 additions and 81 deletions

View File

@@ -1,5 +1,5 @@
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<SolidColorBrush x:Key="DefaultBackground">#121212</SolidColorBrush> <SolidColorBrush x:Key="DefaultBackground">#222222</SolidColorBrush>
<SolidColorBrush x:Key="DefaultForeground">#222222</SolidColorBrush> <SolidColorBrush x:Key="DefaultForeground">#121212</SolidColorBrush>
<SolidColorBrush x:Key="DefaultSelected">#D95F59</SolidColorBrush> <SolidColorBrush x:Key="DefaultSelected">#D95F59</SolidColorBrush>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -1,6 +1,6 @@
<Styles xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Styles xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style Selector="Window"> <Style Selector="Window">
<Setter Property="Background" Value="{StaticResource DefaultBackground}"/> <Setter Property="Background" Value="{StaticResource DefaultBackground}" />
</Style> </Style>
<Style Selector="Border"> <Style Selector="Border">
<Setter Property="CornerRadius" Value="10" /> <Setter Property="CornerRadius" Value="10" />
@@ -48,23 +48,35 @@
<Setter Property="BorderBrush" Value="#f7f7ff" /> <Setter Property="BorderBrush" Value="#f7f7ff" />
<Setter Property="Background" Value="Transparent" /> <Setter Property="Background" Value="Transparent" />
</Style> </Style>
<Style Selector="TextBox"></Style> <Style Selector="TextBox" />
<Style Selector="ListBoxItem"> <Style Selector="ListBoxItem /template/ ContentPresenter">
<Setter Property="CornerRadius" Value="0,8,8,0" /> <Setter Property="CornerRadius" Value="0,8,8,0" />
<Setter Property="Margin" Value="0,0,0,5" /> <Setter Property="Margin" Value="0,0,0,5" />
<Setter Property="Padding" Value="8" /> <Setter Property="Padding" Value="8" />
<Setter Property="Background" Value="Transparent" /> <Setter Property="Background" Value="Transparent" />
</Style> </Style>
<Style Selector="ListBoxItem:selected"> <Style Selector="ListBoxItem:selected /template/ ContentPresenter">
<Setter Property="Background" Value="{StaticResource DefaultSelected}"/> <Setter Property="CornerRadius" Value="0,8,8,0" />
<Setter Property="Background" Value="{StaticResource DefaultSelected}" />
<Setter Property="BoxShadow" Value="0 0 15 1 #1212" />
</Style> </Style>
<Style Selector="ListBoxItem:pressed"> <Style Selector="ListBoxItem:pointerover">
<Setter Property="Background" Value="{StaticResource DefaultSelected}"/> <Setter Property="CornerRadius" Value="0,8,8,0" />
<Setter Property="Margin" Value="0,0,5,0" />
</Style>
<Style Selector="ListBoxItem:pressed /template/ ContentPresenter">
<Setter Property="CornerRadius" Value="0,8,8,0" />
<Setter Property="Background" Value="{StaticResource DefaultSelected}" />
</Style> </Style>
<Style Selector="TextBox"> <Style Selector="TextBox">
<Setter Property="Background" Value="Transparent" /> <Setter Property="Background" Value="Transparent" />
</Style> </Style>
<Style Selector="TextBox:focus /template/ Border#PART_BorderElement">
<Setter Property="BorderBrush" Value="White" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="0,0,0,1" />
</Style>
</Styles> </Styles>

View File

@@ -35,19 +35,19 @@
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Grid.Row="0" Grid.Row="0"
IsPaneOpen="{Binding IsPaneOpen}" IsPaneOpen="{Binding IsPaneOpen}"
PaneBackground="#00000000"> PaneBackground="Transparent">
<SplitView.Pane> <SplitView.Pane>
<Border <Border
Background="{StaticResource DefaultForeground}" Background="{StaticResource DefaultBackground}"
BorderThickness="0,0,2,0" BoxShadow="0 0 5 0 #121212"
CornerRadius="0,8,8,0" CornerRadius="0,8,8,0"
Grid.Column="0" Grid.Column="0"
Grid.Row="0" Grid.Row="0"
Margin="0,0,5,0" Margin="0,0,5,0"
Padding="0"> Padding="0,0,-4,0">
<Grid ColumnDefinitions="*" RowDefinitions="*,40"> <Grid ColumnDefinitions="*" RowDefinitions="*,40">
<ListBox <ListBox
Background="#00000000" Background="Transparent"
ItemsSource="{Binding Items}" ItemsSource="{Binding Items}"
Padding="0" Padding="0"
SelectedItem="{Binding SelectedListItem}"> SelectedItem="{Binding SelectedListItem}">
@@ -78,9 +78,9 @@
</SplitView> </SplitView>
<Border <Border
BorderThickness="0,2,0,0" Background="{StaticResource DefaultBackground}"
BoxShadow="0 0 5 0 #121212"
CornerRadius="0,0,0,0" CornerRadius="0,0,0,0"
Background="{StaticResource DefaultForeground}"
Grid.Column="0" Grid.Column="0"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Grid.Row="1" Grid.Row="1"
@@ -96,7 +96,12 @@
Margin="0" Margin="0"
Padding="0" Padding="0"
VerticalAlignment="Center"> VerticalAlignment="Center">
<TextBlock Foreground="#777777" HorizontalAlignment="Left" VerticalAlignment="Center">https://cinka.ru/nebula-launcher/</TextBlock> <TextBlock
Foreground="#777777"
HorizontalAlignment="Left"
VerticalAlignment="Center">
https://cinka.ru/nebula-launcher/
</TextBlock>
</Button> </Button>
<TextBlock HorizontalAlignment="Right" VerticalAlignment="Center">prototype-product-v0.01</TextBlock> <TextBlock HorizontalAlignment="Right" VerticalAlignment="Center">prototype-product-v0.01</TextBlock>
</Panel> </Panel>
@@ -106,9 +111,13 @@
<Panel IsVisible="{Binding Popup}"> <Panel IsVisible="{Binding Popup}">
<Border Background="#111" Opacity="50" /> <Border Background="#111" Opacity="50" />
<Border CornerRadius="10" Margin="40" Background="{StaticResource DefaultBackground}"> <Border
Background="{StaticResource DefaultBackground}"
CornerRadius="10"
Margin="40">
<Grid RowDefinitions="35,*,20"> <Grid RowDefinitions="35,*,20">
<Border <Border
BorderBrush="{StaticResource DefaultForeground}"
BorderThickness="0,0,0,2" BorderThickness="0,0,0,2"
CornerRadius="10,10,0,0" CornerRadius="10,10,0,0"
Grid.Row="0"> Grid.Row="0">
@@ -131,7 +140,8 @@
<TransitioningContentControl Content="{Binding CurrentPopup}" Grid.Row="1" /> <TransitioningContentControl Content="{Binding CurrentPopup}" Grid.Row="1" />
<Border <Border
BorderThickness="0,2,0,2" BorderBrush="{StaticResource DefaultForeground}"
BorderThickness="0,2,0,0"
CornerRadius="0,0,10,10" CornerRadius="0,0,10,10"
Grid.Row="2"> Grid.Row="2">
<Panel Margin="12,0,12,0" VerticalAlignment="Center"> <Panel Margin="12,0,12,0" VerticalAlignment="Center">

View File

@@ -1,3 +1,4 @@
using Avalonia;
using Avalonia.Controls; using Avalonia.Controls;
namespace Nebula.Launcher.Views; namespace Nebula.Launcher.Views;
@@ -15,5 +16,8 @@ public partial class MainWindow : Window
: this() : this()
{ {
Content = mainView; Content = mainView;
#if DEBUG
this.AttachDevTools();
#endif
} }
} }

View File

@@ -7,8 +7,8 @@
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:pages="clr-namespace:Nebula.Launcher.ViewModels.Pages"
xmlns:pages="clr-namespace:Nebula.Launcher.ViewModels.Pages"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Design.DataContext> <Design.DataContext>
<pages:AccountInfoViewModel /> <pages:AccountInfoViewModel />
</Design.DataContext> </Design.DataContext>
@@ -18,6 +18,7 @@
RowDefinitions="*"> RowDefinitions="*">
<StackPanel Grid.Column="1" Grid.Row="0"> <StackPanel Grid.Column="1" Grid.Row="0">
<Border <Border
BoxShadow="0 -1 15 0 #121212"
CornerRadius="10,10,0,0" CornerRadius="10,10,0,0"
Margin="5,5,5,0" Margin="5,5,5,0"
Padding="5"> Padding="5">
@@ -31,8 +32,9 @@
<ItemsControl.ItemTemplate> <ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type pages:AuthLoginPasswordModel}"> <DataTemplate DataType="{x:Type pages:AuthLoginPasswordModel}">
<Border <Border
BoxShadow="0 1 15 0 #121212"
CornerRadius="0,10,0,10" CornerRadius="0,10,0,10"
Margin="5,5,5,0" Margin="5,5,5,5"
VerticalAlignment="Center"> VerticalAlignment="Center">
<Panel> <Panel>
<StackPanel Margin="10,5,5,5" Orientation="Horizontal"> <StackPanel Margin="10,5,5,5" Orientation="Horizontal">
@@ -51,7 +53,6 @@
</Label> </Label>
</Button> </Button>
<Button <Button
BorderThickness="2,0,0,0"
Command="{Binding OnDelete}" Command="{Binding OnDelete}"
CornerRadius="0,10,0,0" CornerRadius="0,10,0,0"
Padding="5"> Padding="5">
@@ -73,6 +74,7 @@
Grid.ColumnSpan="{Binding AuthViewSpan}" Grid.ColumnSpan="{Binding AuthViewSpan}"
Grid.Row="0"> Grid.Row="0">
<Border <Border
BoxShadow="0 0 15 0 #121212"
CornerRadius="10" CornerRadius="10"
Margin="5" Margin="5"
Padding="15"> Padding="15">
@@ -81,7 +83,7 @@
<Svg <Svg
Height="100" Height="100"
Margin="0,0,0,20" Margin="0,0,0,20"
Path="/Assets/svg/user.svg"/> Path="/Assets/svg/user.svg" />
<StackPanel HorizontalAlignment="Center"> <StackPanel HorizontalAlignment="Center">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<Label VerticalAlignment="Center"> <Label VerticalAlignment="Center">
@@ -107,7 +109,7 @@
</StackPanel> </StackPanel>
<Border <Border
Background="#333333" BoxShadow="0 0 5 0 #121212"
CornerRadius="10" CornerRadius="10"
IsVisible="{Binding AuthUrlConfigExpand}"> IsVisible="{Binding AuthUrlConfigExpand}">
<ScrollViewer Height="80"> <ScrollViewer Height="80">
@@ -127,12 +129,14 @@
</ListBox> </ListBox>
</ScrollViewer> </ScrollViewer>
</Border> </Border>
<Button <Border BoxShadow="0 0 5 0 #121212">
Command="{Binding DoAuth}" <Button
HorizontalAlignment="Stretch" Command="{Binding DoAuth}"
HorizontalContentAlignment="Center"> HorizontalAlignment="Stretch"
<Label>Auth</Label> HorizontalContentAlignment="Center">
</Button> <Label>Auth</Label>
</Button>
</Border>
<Button Command="{Binding ExpandAuthViewCommand}" HorizontalAlignment="Right"> <Button Command="{Binding ExpandAuthViewCommand}" HorizontalAlignment="Right">
<Label> <Label>
> >
@@ -144,7 +148,7 @@
<Svg <Svg
Height="100" Height="100"
Margin="0,0,0,20" Margin="0,0,0,20"
Path="/Assets/svg/user.svg"/> Path="/Assets/svg/user.svg" />
<Label> <Label>
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal"> <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
<TextBlock>Hello,</TextBlock> <TextBlock>Hello,</TextBlock>
@@ -156,12 +160,16 @@
Margin="5,20,5,5" Margin="5,20,5,5"
Orientation="Horizontal" Orientation="Horizontal"
Spacing="5"> Spacing="5">
<Button Command="{Binding Logout}"> <Border BoxShadow="0 0 5 0 #121212">
<Label>Logout</Label> <Button Command="{Binding Logout}">
</Button> <Label>Logout</Label>
<Button Command="{Binding SaveProfileCommand}"> </Button>
<Label>Save profile</Label> </Border>
</Button> <Border BoxShadow="0 0 5 0 #121212">
<Button Command="{Binding SaveProfileCommand}">
<Label>Save profile</Label>
</Button>
</Border>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</Panel> </Panel>

View File

@@ -7,8 +7,8 @@
xmlns="https://github.com/avaloniaui" xmlns="https://github.com/avaloniaui"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:pages="clr-namespace:Nebula.Launcher.ViewModels.Pages"
xmlns:pages="clr-namespace:Nebula.Launcher.ViewModels.Pages"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Design.DataContext> <Design.DataContext>
<pages:ServerListViewModel /> <pages:ServerListViewModel />
@@ -18,18 +18,24 @@
ColumnDefinitions="*" ColumnDefinitions="*"
Margin="0" Margin="0"
RowDefinitions="*,40"> RowDefinitions="*,40">
<ScrollViewer Margin="0,0,0,10" Padding="0,0,10,0" Grid.RowSpan="2"> <ScrollViewer
<ItemsControl Grid.RowSpan="2"
ItemsSource="{Binding ServerInfos}" Margin="0,0,0,10"
Padding="0"> Padding="0,0,10,0">
</ItemsControl> <ItemsControl ItemsSource="{Binding ServerInfos}" Padding="0" />
</ScrollViewer> </ScrollViewer>
<Border Grid.Row="1" Background="{StaticResource DefaultBackground}" BorderThickness="0"> <Border
Background="{StaticResource DefaultBackground}"
BoxShadow="0 2 25 0 #121212"
CornerRadius="0"
Grid.Row="1" />
</Border> <Grid
ColumnDefinitions="*,40,40"
<Grid Grid.Row="1" ColumnDefinitions="*,40,40" RowDefinitions="*" Margin="5,0,0,0"> Grid.Row="1"
Margin="5,0,0,0"
RowDefinitions="*">
<TextBox <TextBox
Margin="0" Margin="0"
Text="{Binding SearchText}" Text="{Binding SearchText}"
@@ -40,13 +46,13 @@
Command="{Binding FilterRequired}" Command="{Binding FilterRequired}"
Grid.Column="1" Grid.Column="1"
Padding="10"> Padding="10">
<Svg Path="/Assets/svg/filter.svg"></Svg> <Svg Path="/Assets/svg/filter.svg" />
</Button> </Button>
<Button <Button
Command="{Binding UpdateRequired}" Command="{Binding UpdateRequired}"
Grid.Column="2" Grid.Column="2"
Padding="10"> Padding="10">
<Svg Path="/Assets/svg/refresh.svg"></Svg> <Svg Path="/Assets/svg/refresh.svg" />
</Button> </Button>
</Grid> </Grid>
</Grid> </Grid>

View File

@@ -18,15 +18,13 @@
<Border <Border
Background="Transparent" Background="Transparent"
BorderThickness="3,1,0,1" BoxShadow="-2 0 18 -1 #121212"
BorderBrush="{StaticResource DefaultForeground}"
CornerRadius="10" CornerRadius="10"
Margin="5"> Margin="5">
<Grid ColumnDefinitions="*,80,50" RowDefinitions="35,*,*"> <Grid ColumnDefinitions="*,80,50" RowDefinitions="35,*,*">
<Border <Border
BorderBrush="{StaticResource DefaultForeground}" Background="Transparent"
Background="#00000000" BoxShadow="0 3 3 -1 #121212"
BorderThickness="0,0,0,2"
CornerRadius="10" CornerRadius="10"
Grid.Column="0" Grid.Column="0"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
@@ -38,7 +36,8 @@
Command="{Binding ExpandInfoRequired}" Command="{Binding ExpandInfoRequired}"
Grid.Column="0" Grid.Column="0"
Grid.Row="0" Grid.Row="0"
VerticalAlignment="Stretch" HorizontalAlignment="Stretch"> HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
<ScrollViewer <ScrollViewer
HorizontalScrollBarVisibility="Hidden" HorizontalScrollBarVisibility="Hidden"
Margin="10,0,0,0" Margin="10,0,0,0"
@@ -89,24 +88,26 @@
</Grid> </Grid>
</Panel> </Panel>
<Label FontSize="12" Grid.Column="0" HorizontalAlignment="Left" <Label
Grid.ColumnSpan="2" FontSize="12"
Grid.Row="1" Grid.Column="0"
IsVisible="{Binding ExpandInfo}" Grid.ColumnSpan="2"
Margin="15"> Grid.Row="1"
HorizontalAlignment="Left"
IsVisible="{Binding ExpandInfo}"
Margin="15">
<TextBlock Text="{Binding Description}" TextWrapping="Wrap" /> <TextBlock Text="{Binding Description}" TextWrapping="Wrap" />
</Label> </Label>
<Border <Border
BorderBrush="{StaticResource DefaultForeground}"
Background="Transparent" Background="Transparent"
BorderThickness="0,2,0,0" BoxShadow="0 -3 3 -1 #121212"
CornerRadius="10" CornerRadius="10"
Grid.Column="0" Grid.Column="0"
Grid.ColumnSpan="2" Grid.ColumnSpan="3"
Grid.Row="2" Grid.Row="2"
IsVisible="{Binding ExpandInfo}" IsVisible="{Binding ExpandInfo}"
Margin="5,15,15,5"> Margin="5">
<StackPanel Margin="5" Spacing="5"> <StackPanel Margin="5" Spacing="5">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<Label FontSize="10" VerticalAlignment="Center">Tags:</Label> <Label FontSize="10" VerticalAlignment="Center">Tags:</Label>
@@ -115,8 +116,8 @@
<DataTemplate DataType="{x:Type system:String}"> <DataTemplate DataType="{x:Type system:String}">
<Border <Border
Background="{StaticResource DefaultForeground}" Background="{StaticResource DefaultForeground}"
CornerRadius="8"
BorderThickness="0" BorderThickness="0"
CornerRadius="8"
HorizontalAlignment="Center" HorizontalAlignment="Center"
Margin="1,1,1,1" Margin="1,1,1,1"
VerticalAlignment="Center"> VerticalAlignment="Center">
@@ -128,21 +129,23 @@
</ItemsControl.ItemTemplate> </ItemsControl.ItemTemplate>
<ItemsControl.ItemsPanel> <ItemsControl.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<StackPanel Margin="5" <StackPanel
HorizontalAlignment="Left" HorizontalAlignment="Left"
Margin="5"
Orientation="Horizontal" Orientation="Horizontal"
VerticalAlignment="Center" Spacing="8"/> Spacing="8"
VerticalAlignment="Center" />
</ItemsPanelTemplate> </ItemsPanelTemplate>
</ItemsControl.ItemsPanel> </ItemsControl.ItemsPanel>
</ItemsControl> </ItemsControl>
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal" > <StackPanel Orientation="Horizontal">
<Label FontSize="10" VerticalAlignment="Center">Map:</Label> <Label FontSize="10" VerticalAlignment="Center">Map:</Label>
<Border <Border
Background="{StaticResource DefaultForeground}" Background="{StaticResource DefaultForeground}"
CornerRadius="8"
BorderThickness="0" BorderThickness="0"
CornerRadius="8"
HorizontalAlignment="Center" HorizontalAlignment="Center"
Margin="5" Margin="5"
VerticalAlignment="Center"> VerticalAlignment="Center">
@@ -156,8 +159,8 @@
<Label FontSize="10" VerticalAlignment="Center">Preset:</Label> <Label FontSize="10" VerticalAlignment="Center">Preset:</Label>
<Border <Border
Background="{StaticResource DefaultForeground}" Background="{StaticResource DefaultForeground}"
CornerRadius="8"
BorderThickness="0" BorderThickness="0"
CornerRadius="8"
HorizontalAlignment="Center" HorizontalAlignment="Center"
Margin="5" Margin="5"
VerticalAlignment="Center"> VerticalAlignment="Center">