-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Dark mode styling, ExtendClientAreaToDecorationsHint
- Loading branch information
Showing
3 changed files
with
139 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
<Application xmlns="https://github.com/avaloniaui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:Lumper.UI" | ||
x:Class="Lumper.UI.App"> | ||
<Application.DataTemplates> | ||
<local:ViewLocator /> | ||
</Application.DataTemplates> | ||
|
||
<Application.Styles> | ||
<FluentTheme Mode="Light" /> | ||
</Application.Styles> | ||
</Application> | ||
<Application xmlns="https://github.com/avaloniaui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:Lumper.UI" | ||
x:Class="Lumper.UI.App"> | ||
<Application.DataTemplates> | ||
<local:ViewLocator /> | ||
</Application.DataTemplates> | ||
|
||
<Application.Resources> | ||
<ResourceDictionary> | ||
<SolidColorBrush x:Key="BackgroundExtraDark" Color="#0e0e0e" /> | ||
<SolidColorBrush x:Key="BackgroundDark" Color="#151515" /> | ||
<SolidColorBrush x:Key="BackgroundMediumDark" Color="#242424" /> | ||
</ResourceDictionary> | ||
</Application.Resources> | ||
|
||
<Application.Styles> | ||
<FluentTheme Mode="Dark" /> | ||
</Application.Styles> | ||
</Application> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,39 @@ | ||
<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:bspviews="clr-namespace:Lumper.UI.Views.Bsp" | ||
xmlns:bspmodels="clr-namespace:Lumper.UI.ViewModels.Bsp" | ||
xmlns:converters="clr-namespace:Lumper.UI.Converters" | ||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" | ||
x:Class="Lumper.UI.Views.Bsp.BspBrowserView"> | ||
<UserControl.Resources> | ||
<converters:BitmapAssetValueConverter x:Key="variableImage" /> | ||
</UserControl.Resources> | ||
<Grid RowDefinitions="Auto, *"> | ||
<bspviews:BspBrowserSearchView Grid.Row="0" | ||
DataContext="{Binding}" /> | ||
<TreeView Grid.Row="1" | ||
Items="{Binding BspModel.FilteredNodes}" | ||
SelectedItem="{Binding SelectedNode}" | ||
Background="LightGray"> | ||
<TreeView.DataTemplates> | ||
<TreeDataTemplate DataType="bspmodels:BspNodeBase" | ||
ItemsSource="{Binding FilteredNodes}"> | ||
<StackPanel Orientation="Horizontal" | ||
IsVisible="{Binding IsVisible}"> | ||
<Image | ||
Source="{Binding NodeIcon, Converter={StaticResource variableImage}}" | ||
Width="24" Height="24" | ||
Margin="0,0,5,0" /> | ||
<TextBlock Text="*" | ||
IsVisible="{Binding IsModified}" | ||
Margin="0,0,5,0" /> | ||
<TextBlock Text="{Binding NodeName}" | ||
VerticalAlignment="Center" /> | ||
</StackPanel> | ||
</TreeDataTemplate> | ||
</TreeView.DataTemplates> | ||
</TreeView> | ||
</Grid> | ||
</UserControl> | ||
<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:bspviews="clr-namespace:Lumper.UI.Views.Bsp" | ||
xmlns:bspmodels="clr-namespace:Lumper.UI.ViewModels.Bsp" | ||
xmlns:converters="clr-namespace:Lumper.UI.Converters" | ||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" | ||
x:Class="Lumper.UI.Views.Bsp.BspBrowserView"> | ||
<UserControl.Resources> | ||
<converters:BitmapAssetValueConverter x:Key="variableImage" /> | ||
</UserControl.Resources> | ||
<Border BorderBrush="{DynamicResource BackgroundExtraDark}" | ||
BorderThickness="1" | ||
Margin="8"> | ||
<Grid RowDefinitions="Auto, *" Background="{DynamicResource BackgroundDark}"> | ||
<bspviews:BspBrowserSearchView Grid.Row="0" Margin="6" DataContext="{Binding}" /> | ||
<TreeView Grid.Row="1" | ||
Items="{Binding BspModel.FilteredNodes}" | ||
SelectedItem="{Binding SelectedNode}" | ||
Margin="0, 0, 0,8"> | ||
<TreeView.DataTemplates> | ||
<TreeDataTemplate DataType="bspmodels:BspNodeBase" | ||
ItemsSource="{Binding FilteredNodes}"> | ||
<StackPanel Orientation="Horizontal" IsVisible="{Binding IsVisible}"> | ||
<Image Source="{Binding NodeIcon, Converter={StaticResource variableImage}}" | ||
Width="24" Height="24" | ||
Margin="0,0,5,0" /> | ||
<TextBlock Text="*" | ||
IsVisible="{Binding IsModified}" | ||
Margin="0,0,5,0" /> | ||
<TextBlock Text="{Binding NodeName}" VerticalAlignment="Center" /> | ||
</StackPanel> | ||
</TreeDataTemplate> | ||
</TreeView.DataTemplates> | ||
</TreeView> | ||
</Grid> | ||
</Border> | ||
</UserControl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,80 @@ | ||
<Window xmlns="https://github.com/avaloniaui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:vm="using:Lumper.UI.ViewModels" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:bspviews="clr-namespace:Lumper.UI.Views.Bsp" | ||
xmlns:entviews="clr-namespace:Lumper.UI.Views.Bsp.Lumps.Entity" | ||
xmlns:entmodels="clr-namespace:Lumper.UI.ViewModels.Bsp.Lumps.Entity" | ||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" | ||
x:Class="Lumper.UI.Views.MainWindow" | ||
Icon="/Assets/momentum-logo.png" | ||
Closing="Window_OnClosing" | ||
Title="{Binding BspModel.FilePath, StringFormat='{}Lumper {0}'}"> | ||
|
||
<Design.DataContext> | ||
<vm:MainWindowViewModel /> | ||
</Design.DataContext> | ||
|
||
<Grid ColumnDefinitions="*,1,4*" RowDefinitions="Auto, *"> | ||
<DockPanel Grid.Column="0" Grid.ColumnSpan="3"> | ||
<Menu DockPanel.Dock="Top"> | ||
<MenuItem Header="_File"> | ||
<MenuItem Header="_Open..." Command="{Binding OpenCommand}" /> | ||
<Separator /> | ||
<MenuItem Header="_Save" Command="{Binding SaveCommand}" /> | ||
<MenuItem Header="_Save As..." | ||
Command="{Binding SaveAsCommand}" /> | ||
<Separator /> | ||
<MenuItem Header="_Close" Command="{Binding CloseCommand}" /> | ||
<MenuItem Header="_Exit" Command="{Binding ExitCommand}" /> | ||
</MenuItem> | ||
</Menu> | ||
</DockPanel> | ||
<bspviews:BspBrowserView Grid.Column="0" Grid.Row="1" | ||
DataContext="{Binding }" Margin="0,0,2,0" /> | ||
<GridSplitter Grid.Column="1" Grid.Row="1" ResizeDirection="Columns" /> | ||
<TabControl Grid.Column="2" Grid.Row="1" | ||
Items="{Binding OpenTabs}" | ||
SelectedItem="{Binding SelectedTab}"> | ||
<TabControl.ItemTemplate> | ||
<DataTemplate> | ||
<Grid ColumnDefinitions="Auto, *,Auto"> | ||
<TextBlock Grid.Column="0" | ||
Text="*" | ||
Margin="0,0,5,0" | ||
IsVisible="{Binding IsModified}" /> | ||
<TextBlock Grid.Column="1" | ||
Text="{Binding NodeName}" | ||
Margin="0,0,5,0" /> | ||
<Button Grid.Column="2" | ||
Width="15" Height="15" | ||
Command="{Binding Close}" /> | ||
</Grid> | ||
</DataTemplate> | ||
</TabControl.ItemTemplate> | ||
<!--TODO: Figure out how to wrap ScrollViewer over all possible data templates--> | ||
<TabControl.DataTemplates> | ||
<DataTemplate DataType="entmodels:EntityViewModel"> | ||
<ScrollViewer> | ||
<entviews:EntityTabView DataContext="{Binding }" /> | ||
</ScrollViewer> | ||
</DataTemplate> | ||
</TabControl.DataTemplates> | ||
</TabControl> | ||
</Grid> | ||
</Window> | ||
<Window xmlns="https://github.com/avaloniaui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:vm="using:Lumper.UI.ViewModels" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:bspviews="clr-namespace:Lumper.UI.Views.Bsp" | ||
xmlns:entviews="clr-namespace:Lumper.UI.Views.Bsp.Lumps.Entity" | ||
xmlns:entmodels="clr-namespace:Lumper.UI.ViewModels.Bsp.Lumps.Entity" | ||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" | ||
x:Class="Lumper.UI.Views.MainWindow" | ||
Icon="/Assets/Lumper.png" | ||
Closing="Window_OnClosing" | ||
Title="{Binding BspModel.FilePath, StringFormat='{}Lumper {0}'}" | ||
TransparencyLevelHint="AcrylicBlur" | ||
ExtendClientAreaToDecorationsHint="True" | ||
WindowStartupLocation="CenterScreen" | ||
Background="Transparent"> | ||
|
||
<Design.DataContext> | ||
<vm:MainWindowViewModel /> | ||
</Design.DataContext> | ||
|
||
<Panel> | ||
<ExperimentalAcrylicBorder IsHitTestVisible="False" CornerRadius="8"> | ||
<ExperimentalAcrylicBorder.Material> | ||
<ExperimentalAcrylicMaterial | ||
BackgroundSource="Digger" | ||
TintColor="Black" | ||
TintOpacity="1" | ||
MaterialOpacity="0.7" /> | ||
</ExperimentalAcrylicBorder.Material> | ||
</ExperimentalAcrylicBorder> | ||
<TitleBar></TitleBar> | ||
<Grid ColumnDefinitions="*,1,4*" RowDefinitions="Auto, *" ClipToBounds="True" Margin="0,0"> | ||
<DockPanel Grid.Column="0" Grid.ColumnSpan="3" Width="100" HorizontalAlignment="Left" ClipToBounds="True"> | ||
<Menu DockPanel.Dock="Top"> | ||
<MenuItem Header="_File"> | ||
<MenuItem Header="_Open..." Command="{Binding OpenCommand}" /> | ||
<Separator /> | ||
<MenuItem Header="_Save" Command="{Binding SaveCommand}" /> | ||
<MenuItem Header="_Save As..." Command="{Binding SaveAsCommand}" /> | ||
<Separator /> | ||
<MenuItem Header="_Close" Command="{Binding CloseCommand}" /> | ||
<MenuItem Header="_Exit" Command="{Binding ExitCommand}" /> | ||
</MenuItem> | ||
</Menu> | ||
</DockPanel> | ||
<bspviews:BspBrowserView Grid.Column="0" Grid.Row="1" DataContext="{Binding }" Margin="0,0,2,0" /> | ||
<GridSplitter Grid.Column="1" Grid.Row="1" ResizeDirection="Columns" /> | ||
<TabControl Grid.Column="2" Grid.Row="1" | ||
Items="{Binding OpenTabs}" | ||
SelectedItem="{Binding SelectedTab}"> | ||
<TabControl.ItemTemplate> | ||
<DataTemplate> | ||
<Grid ColumnDefinitions="Auto, *,Auto"> | ||
<TextBlock Grid.Column="0" | ||
Text="*" | ||
Margin="0,0,5,0" | ||
IsVisible="{Binding IsModified}" /> | ||
<TextBlock Grid.Column="1" | ||
Text="{Binding NodeName}" | ||
Margin="0,0,5,0" /> | ||
<Button Grid.Column="2" | ||
Width="15" Height="15" | ||
Command="{Binding Close}" /> | ||
</Grid> | ||
</DataTemplate> | ||
</TabControl.ItemTemplate> | ||
<!--TODO: Figure out how to wrap ScrollViewer over all possible data templates--> | ||
<TabControl.DataTemplates> | ||
<DataTemplate DataType="entmodels:EntityViewModel"> | ||
<ScrollViewer> | ||
<entviews:EntityTabView DataContext="{Binding }" /> | ||
</ScrollViewer> | ||
</DataTemplate> | ||
</TabControl.DataTemplates> | ||
</TabControl> | ||
</Grid> | ||
</Panel> | ||
</Window> |