- tweak: UI improvement
This commit is contained in:
46
Nebula.Launcher/Views/ExceptionView.axaml
Normal file
46
Nebula.Launcher/Views/ExceptionView.axaml
Normal file
@@ -0,0 +1,46 @@
|
||||
<UserControl
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d"
|
||||
x:Class="Nebula.Launcher.Views.ExceptionView"
|
||||
x:DataType="system:Exception"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:system="clr-namespace:System;assembly=System.Runtime"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Design.DataContext>
|
||||
<system:Exception />
|
||||
</Design.DataContext>
|
||||
<Border
|
||||
BoxShadow="{StaticResource DefaultShadow}"
|
||||
CornerRadius="5"
|
||||
Margin="0,0,0,5">
|
||||
<Border.Background>
|
||||
<LinearGradientBrush EndPoint="100%,50%" StartPoint="0%,50%">
|
||||
<GradientStop Color="#443333" Offset="0.0" />
|
||||
<GradientStop Color="#333333" Offset="1.0" />
|
||||
</LinearGradientBrush>
|
||||
</Border.Background>
|
||||
<StackPanel>
|
||||
<Border CornerRadius="5,5,0,0">
|
||||
<Border.Background>
|
||||
<LinearGradientBrush EndPoint="100%,50%" StartPoint="0%,50%">
|
||||
<GradientStop Color="#FF6B6B" Offset="0.0" />
|
||||
<GradientStop Color="#FF8E53" Offset="0.3" />
|
||||
<GradientStop Color="#FF5E3A" Offset="0.6" />
|
||||
<GradientStop Color="#FF5e5e" Offset="1.0" />
|
||||
</LinearGradientBrush>
|
||||
</Border.Background>
|
||||
<ScrollViewer>
|
||||
<Label Margin="4">
|
||||
<TextBlock Text="{Binding Message}" />
|
||||
</Label>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
<Label Margin="4">
|
||||
<TextBlock Text="{Binding StackTrace}" TextWrapping="Wrap" />
|
||||
</Label>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</UserControl>
|
||||
19
Nebula.Launcher/Views/ExceptionView.axaml.cs
Normal file
19
Nebula.Launcher/Views/ExceptionView.axaml.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace Nebula.Launcher.Views;
|
||||
|
||||
public partial class ExceptionView : UserControl
|
||||
{
|
||||
public ExceptionView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public ExceptionView(Exception exception): this()
|
||||
{
|
||||
DataContext = exception;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
<UserControl
|
||||
Background="#1a1a1a"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d"
|
||||
@@ -15,6 +14,12 @@
|
||||
<Design.DataContext>
|
||||
<viewModels:MainViewModel />
|
||||
</Design.DataContext>
|
||||
<UserControl.Background>
|
||||
<LinearGradientBrush EndPoint="100%,50%" StartPoint="0%,50%">
|
||||
<GradientStop Color="#121212" Offset="0.0" />
|
||||
<GradientStop Color="#181212" Offset="1.0" />
|
||||
</LinearGradientBrush>
|
||||
</UserControl.Background>
|
||||
|
||||
<Panel>
|
||||
<Grid
|
||||
@@ -29,7 +34,7 @@
|
||||
Grid.Row="0" />
|
||||
|
||||
<SplitView
|
||||
CompactPaneLength="65"
|
||||
CompactPaneLength="70"
|
||||
DisplayMode="CompactInline"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
@@ -38,13 +43,19 @@
|
||||
PaneBackground="Transparent">
|
||||
<SplitView.Pane>
|
||||
<Border
|
||||
Background="{StaticResource DefaultBackground}"
|
||||
BoxShadow="0 0 15 -2 #121212"
|
||||
CornerRadius="0,8,8,0"
|
||||
CornerRadius="0,0,0,0"
|
||||
Grid.Column="0"
|
||||
Grid.Row="0"
|
||||
Margin="0,0,5,0"
|
||||
Padding="0,0,-4,0">
|
||||
<Border.Background>
|
||||
<LinearGradientBrush EndPoint="100%,50%" StartPoint="0%,50%">
|
||||
<GradientStop Color="#1f1f1f" Offset="0.0" />
|
||||
<GradientStop Color="#222222" Offset="0.2" />
|
||||
<GradientStop Color="#222222" Offset="1.0" />
|
||||
</LinearGradientBrush>
|
||||
</Border.Background>
|
||||
<Grid ColumnDefinitions="*" RowDefinitions="*,40">
|
||||
<ListBox
|
||||
Background="Transparent"
|
||||
@@ -53,7 +64,7 @@
|
||||
SelectedItem="{Binding SelectedListItem}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type models:ListItemTemplate}">
|
||||
<StackPanel Orientation="Horizontal" Spacing="17">
|
||||
<StackPanel Orientation="Horizontal" Spacing="19">
|
||||
<Svg
|
||||
Height="40"
|
||||
Path="{Binding IconKey, Converter={x:Static converters:TypeConverters.IconConverter}}"
|
||||
@@ -78,14 +89,20 @@
|
||||
</SplitView>
|
||||
|
||||
<Border
|
||||
Background="{StaticResource DefaultBackground}"
|
||||
BoxShadow="{StaticResource DefaultShadow}"
|
||||
Background="{StaticResource DefaultGrad}"
|
||||
BorderThickness="0,2,0,0"
|
||||
CornerRadius="0,0,0,0"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
Grid.Row="1"
|
||||
Margin="0,0,0,0"
|
||||
Padding="5">
|
||||
<Border.BorderBrush>
|
||||
<LinearGradientBrush EndPoint="100%,50%" StartPoint="0%,50%">
|
||||
<GradientStop Color="#222222" Offset="0.0" />
|
||||
<GradientStop Color="#442222" Offset="1.0" />
|
||||
</LinearGradientBrush>
|
||||
</Border.BorderBrush>
|
||||
<Label FontSize="10" Foreground="#777777">
|
||||
<Panel>
|
||||
<Button
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
<Window
|
||||
Background="{x:Null}"
|
||||
ExtendClientAreaChromeHints="NoChrome"
|
||||
ExtendClientAreaTitleBarHeightHint="-1"
|
||||
ExtendClientAreaToDecorationsHint="True"
|
||||
Height="500"
|
||||
Icon="/Assets/avalonia-logo.ico"
|
||||
MinHeight="500"
|
||||
MinWidth="800"
|
||||
SystemDecorations="BorderOnly"
|
||||
Title="Nebula.Launcher"
|
||||
TransparencyLevelHint="AcrylicBlur"
|
||||
Width="800"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d"
|
||||
@@ -12,4 +19,54 @@
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" />
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Grid ColumnDefinitions="*" RowDefinitions="30,*">
|
||||
<Border
|
||||
Background="{StaticResource DefaultGrad}"
|
||||
BorderThickness="0,0,0,2"
|
||||
CornerRadius="0"
|
||||
Grid.Column="0"
|
||||
Grid.Row="0">
|
||||
<Border.BorderBrush>
|
||||
<LinearGradientBrush EndPoint="100%,50%" StartPoint="0%,50%">
|
||||
<GradientStop Color="#222222" Offset="0.0" />
|
||||
<GradientStop Color="#442222" Offset="1.0" />
|
||||
</LinearGradientBrush>
|
||||
</Border.BorderBrush>
|
||||
<Panel
|
||||
Background="{StaticResource DefaultGrad}"
|
||||
Height="30"
|
||||
PointerPressed="InputElement_OnPointerPressed">
|
||||
<TextBlock
|
||||
FontSize="10"
|
||||
Foreground="White"
|
||||
IsVisible="False"
|
||||
Margin="15,0"
|
||||
Text="Nebula Launcher"
|
||||
VerticalAlignment="Center" />
|
||||
<StackPanel
|
||||
HorizontalAlignment="Right"
|
||||
Margin="5,0,5,0"
|
||||
Orientation="Horizontal"
|
||||
Spacing="8">
|
||||
<Button
|
||||
Click="Minimize_Click"
|
||||
Content="🗕"
|
||||
Foreground="Azure" />
|
||||
<Button
|
||||
Click="Maximize_Click"
|
||||
Content="🗗"
|
||||
Foreground="Azure" />
|
||||
<Button
|
||||
Click="Close_Click"
|
||||
Content="🗙"
|
||||
Foreground="Azure" />
|
||||
</StackPanel>
|
||||
</Panel>
|
||||
</Border>
|
||||
<UserControl
|
||||
Grid.Column="0"
|
||||
Grid.Row="1"
|
||||
x:Name="Control" />
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -1,5 +1,7 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Interactivity;
|
||||
|
||||
namespace Nebula.Launcher.Views;
|
||||
|
||||
@@ -15,9 +17,29 @@ public partial class MainWindow : Window
|
||||
public MainWindow(MainView mainView)
|
||||
: this()
|
||||
{
|
||||
Content = mainView;
|
||||
Control.Content = mainView;
|
||||
#if DEBUG
|
||||
this.AttachDevTools();
|
||||
#endif
|
||||
}
|
||||
|
||||
private void Minimize_Click(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
WindowState = WindowState.Minimized;
|
||||
}
|
||||
|
||||
private void Maximize_Click(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
WindowState = WindowState == WindowState.Maximized ? WindowState.Normal : WindowState.Maximized;
|
||||
}
|
||||
|
||||
private void Close_Click(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
private void InputElement_OnPointerPressed(object? sender, PointerPressedEventArgs e)
|
||||
{
|
||||
BeginMoveDrag(e);
|
||||
}
|
||||
}
|
||||
@@ -18,11 +18,16 @@
|
||||
RowDefinitions="*">
|
||||
<StackPanel Grid.Column="1" Grid.Row="0">
|
||||
<Border
|
||||
Background="{StaticResource DefaultBackground}"
|
||||
BoxShadow="0 -1 15 -2 #121212"
|
||||
CornerRadius="10,10,0,0"
|
||||
Margin="5,5,5,0"
|
||||
Padding="5">
|
||||
<Border.Background>
|
||||
<LinearGradientBrush EndPoint="50%,100%" StartPoint="50%,0%">
|
||||
<GradientStop Color="#222222" Offset="0.0" />
|
||||
<GradientStop Color="#292222" Offset="1.0" />
|
||||
</LinearGradientBrush>
|
||||
</Border.Background>
|
||||
<Label HorizontalAlignment="Center">Profiles:</Label>
|
||||
</Border>
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
||||
@@ -33,11 +38,16 @@
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type pages:ProfileAuthCredentials}">
|
||||
<Border
|
||||
Background="{StaticResource DefaultBackground}"
|
||||
BoxShadow="0 1 15 -2 #121212"
|
||||
CornerRadius="0,10,0,10"
|
||||
Margin="5,5,5,5"
|
||||
VerticalAlignment="Center">
|
||||
<Border.Background>
|
||||
<LinearGradientBrush EndPoint="50%,100%" StartPoint="50%,0%">
|
||||
<GradientStop Color="#292222" Offset="0.0" />
|
||||
<GradientStop Color="#222222" Offset="1.0" />
|
||||
</LinearGradientBrush>
|
||||
</Border.Background>
|
||||
<Panel>
|
||||
<StackPanel Margin="10,5,5,5" Orientation="Horizontal">
|
||||
<Label>Name:</Label>
|
||||
@@ -76,11 +86,16 @@
|
||||
Grid.ColumnSpan="{Binding AuthViewSpan}"
|
||||
Grid.Row="0">
|
||||
<Border
|
||||
Background="{StaticResource DefaultBackground}"
|
||||
BoxShadow="{StaticResource DefaultShadow}"
|
||||
CornerRadius="10"
|
||||
Margin="5"
|
||||
Padding="15">
|
||||
<Border.Background>
|
||||
<LinearGradientBrush EndPoint="50%,100%" StartPoint="50%,0%">
|
||||
<GradientStop Color="#292222" Offset="0.0" />
|
||||
<GradientStop Color="#222222" Offset="1.0" />
|
||||
</LinearGradientBrush>
|
||||
</Border.Background>
|
||||
<Panel>
|
||||
<StackPanel IsVisible="{Binding !IsLogged}" Spacing="15">
|
||||
<Svg
|
||||
|
||||
@@ -20,9 +20,10 @@
|
||||
RowDefinitions="*,40">
|
||||
<ScrollViewer
|
||||
Grid.RowSpan="2"
|
||||
Margin="0,0,0,10"
|
||||
Margin="5,0,0,10"
|
||||
Padding="0,0,10,0">
|
||||
<Panel>
|
||||
<StackPanel>
|
||||
<ItemsControl ItemsSource="{Binding HubErrors}" Margin="10,0,10,0" />
|
||||
<ItemsControl
|
||||
IsVisible="{Binding IsFavoriteMode}"
|
||||
ItemsSource="{Binding FavoriteServers}"
|
||||
@@ -31,7 +32,7 @@
|
||||
IsVisible="{Binding !IsFavoriteMode}"
|
||||
ItemsSource="{Binding Servers}"
|
||||
Padding="0" />
|
||||
</Panel>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
||||
<Border
|
||||
@@ -43,10 +44,10 @@
|
||||
<Grid
|
||||
ColumnDefinitions="*,40,40,40"
|
||||
Grid.Row="1"
|
||||
Margin="5,0,0,0"
|
||||
Margin="-25,0,0,0"
|
||||
RowDefinitions="*">
|
||||
<TextBox
|
||||
Margin="0"
|
||||
Margin="25,0,0,0"
|
||||
Text="{Binding SearchText}"
|
||||
TextChanged="TextBox_OnTextChanged"
|
||||
VerticalAlignment="Center"
|
||||
|
||||
22
Nebula.Launcher/Views/Popup/ExceptionListView.axaml
Normal file
22
Nebula.Launcher/Views/Popup/ExceptionListView.axaml
Normal file
@@ -0,0 +1,22 @@
|
||||
<UserControl
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d"
|
||||
x:Class="Nebula.Launcher.Views.Popup.ExceptionListView"
|
||||
x:DataType="popup:ExceptionListViewModel"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:popup="clr-namespace:Nebula.Launcher.ViewModels.Popup"
|
||||
xmlns:system="clr-namespace:System;assembly=System.Runtime"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Design.DataContext>
|
||||
<popup:ExceptionListViewModel />
|
||||
</Design.DataContext>
|
||||
<ScrollViewer Margin="10" Padding="0,0,8,0">
|
||||
<ItemsControl
|
||||
Background="#00000000"
|
||||
ItemsSource="{Binding Errors}"
|
||||
Padding="0" />
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
17
Nebula.Launcher/Views/Popup/ExceptionListView.axaml.cs
Normal file
17
Nebula.Launcher/Views/Popup/ExceptionListView.axaml.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Avalonia.Controls;
|
||||
using Nebula.Launcher.ViewModels.Popup;
|
||||
|
||||
namespace Nebula.Launcher.Views.Popup;
|
||||
|
||||
public partial class ExceptionListView : UserControl
|
||||
{
|
||||
public ExceptionListView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public ExceptionListView(ExceptionListViewModel listViewModel) : this()
|
||||
{
|
||||
DataContext = listViewModel;
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:system="clr-namespace:System;assembly=System.Runtime"
|
||||
xmlns:popup="clr-namespace:Nebula.Launcher.ViewModels.Popup"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Nebula.Launcher.Views.Popup.ExceptionView"
|
||||
x:DataType="popup:ExceptionViewModel">
|
||||
<Design.DataContext>
|
||||
<popup:ExceptionViewModel />
|
||||
</Design.DataContext>
|
||||
<ScrollViewer Margin="10" Padding="0,0,8,0">
|
||||
<ItemsControl
|
||||
Background="#00000000"
|
||||
ItemsSource="{Binding Errors}"
|
||||
Padding="0">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type system:Exception}">
|
||||
<Border Background="#333333" CornerRadius="5" Margin="0,0,0,5">
|
||||
<StackPanel>
|
||||
<Border Background="#aa2222" CornerRadius="5,5,0,0">
|
||||
<Label Margin="4">
|
||||
<TextBlock Text="{Binding Message}" />
|
||||
</Label>
|
||||
</Border>
|
||||
<Label Margin="4">
|
||||
<TextBlock Text="{Binding StackTrace}" />
|
||||
</Label>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
@@ -1,17 +0,0 @@
|
||||
using Avalonia.Controls;
|
||||
using Nebula.Launcher.ViewModels.Popup;
|
||||
|
||||
namespace Nebula.Launcher.Views.Popup;
|
||||
|
||||
public partial class ExceptionView : UserControl
|
||||
{
|
||||
public ExceptionView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public ExceptionView(ExceptionViewModel viewModel) : this()
|
||||
{
|
||||
DataContext = viewModel;
|
||||
}
|
||||
}
|
||||
@@ -19,14 +19,15 @@
|
||||
</Design.DataContext>
|
||||
|
||||
<Border
|
||||
Background="{StaticResource DefaultBackground}"
|
||||
Background="{StaticResource DefaultGrad}"
|
||||
BoxShadow="-2 0 5 -1 #121212"
|
||||
CornerRadius="10"
|
||||
Margin="5">
|
||||
|
||||
<Grid ColumnDefinitions="*,80,50,50" RowDefinitions="35,*,*">
|
||||
<Border
|
||||
Background="Transparent"
|
||||
BoxShadow="0 3 3 -1 #121212"
|
||||
BoxShadow="0 3 3 -2 #121212"
|
||||
CornerRadius="10"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
@@ -34,7 +35,7 @@
|
||||
IsVisible="{Binding ExpandInfo}" />
|
||||
|
||||
<Button
|
||||
Background="#00000000"
|
||||
Background="Transparent"
|
||||
Command="{Binding ExpandInfoRequired}"
|
||||
Grid.Column="0"
|
||||
Grid.Row="0"
|
||||
@@ -124,7 +125,7 @@
|
||||
|
||||
<Border
|
||||
Background="Transparent"
|
||||
BoxShadow="0 -3 3 -1 #121212"
|
||||
BoxShadow="0 -3 3 -2 #121212"
|
||||
CornerRadius="10"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="3"
|
||||
|
||||
Reference in New Issue
Block a user