1
0
Fork 0
mirror of https://github.com/oMaN-Rod/nxDumpFuse.git synced 2024-12-22 08:32:01 +00:00

Move styles, probably overkill but... ¯\_(ツ)_/¯

This commit is contained in:
Omar 2021-10-29 20:05:43 -04:00
parent a13cf7c091
commit 6d26177c6d
5 changed files with 95 additions and 40 deletions

View file

@ -1,2 +1,3 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/UserDictionary/Words/=Avalonia/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Avalonia/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Templated/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

View file

@ -9,6 +9,7 @@
<Application.Styles>
<FluentTheme Mode="Dark" />
<StyleInclude Source="/Styles/SideBar.axaml" />
<StyleInclude Source="/Styles/Styles.axaml" />
<StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Fluent.xaml" />
</Application.Styles>
</Application>

View file

@ -0,0 +1,68 @@
<Styles xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!--TextBlock-->
<Style Selector="TextBlock.inlineProgress">
<Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="Margin" Value="2" />
</Style>
<Style Selector="TextBlock.authorInfo">
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Margin" Value="4" />
<Setter Property="HorizontalAlignment" Value="Right" />
</Style>
<Style Selector="TextBlock.footerProgress">
<Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="VerticalAlignment" Value="Bottom" />
<Setter Property="Margin" Value="0 0 20 0" />
<Setter Property="FontSize" Value="12" />
</Style>
<!--TextBox-->
<Style Selector="TextBox">
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Margin" Value="5" />
</Style>
<!--DataGrid-->
<Style Selector="DataGrid">
<Setter Property="VerticalScrollBarVisibility" Value="Auto" />
<Setter Property="HorizontalScrollBarVisibility" Value="Auto" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Height" Value="300" />
</Style>
<Style Selector="DataGridCell.logCell">
<Setter Property="FontSize" Value="12" />
</Style>
<!--ProgressBar-->
<Style Selector="ProgressBar">
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="Margin" Value="2" />
<Setter Property="Height" Value="10" />
</Style>
<!--Button-->
<Style Selector="Button">
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="Margin" Value="2" />
</Style>
<Style Selector="Button.clear">
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="Margin" Value="4 0 0 0" />
<Setter Property="VerticalAlignment" Value="Top" />
</Style>
<Style Selector="Button.gitHubButton">
<Setter Property="Padding" Value="-10" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="Margin" Value="2" />
</Style>
</Styles>

View file

@ -10,9 +10,8 @@
RowDefinitions="Auto,Auto"
ColumnDefinitions="Auto,*">
<TextBlock Grid.Row="0" Text="{Binding UsageText}" />
<TextBlock Grid.Row="1" Grid.Column="0" Margin="5" VerticalAlignment="Center" Text="{Binding AuthorInfo}"
HorizontalAlignment="Right" />
<Button Grid.Row="1" Grid.Column="1" Padding="-10" Command="{Binding OpenGithubCommand}">
<TextBlock Grid.Row="1" Grid.Column="0" Text="{Binding AuthorInfo}" Classes="authorInfo" />
<Button Grid.Row="1" Grid.Column="1" Command="{Binding OpenGithubCommand}" Classes="gitHubButton">
<Panel>
<Image Width="75" Height="75" Source="resm:nxDumpFuse.Assets.github_icon.png" />
</Panel>

View file

@ -11,66 +11,52 @@
RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto"
ColumnDefinitions="Auto,*,50">
<Button Grid.Row="0" Grid.Column="0" Command="{Binding SelectInputFileCommand}" Content="Input"
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" />
<TextBox Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" Margin="5" VerticalAlignment="Center"
Text="{Binding InputFilePath}"
Name="InputFileTextBox" />
<Button Grid.Row="0" Grid.Column="0" Command="{Binding SelectInputFileCommand}" Content="Input" />
<TextBox Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" Text="{Binding InputFilePath}" />
<Button Grid.Row="1" Grid.Column="0" Command="{Binding SelectOutputFolderCommand}" Content="Output"
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" />
<TextBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Margin="5" VerticalAlignment="Center"
Text="{Binding OutputDir}" />
<Button Grid.Row="1" Grid.Column="0" Command="{Binding SelectOutputFolderCommand}" Content="Output" />
<TextBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Text="{Binding OutputDir}" />
<TextBlock Grid.Row="2" Grid.Column="0" Text="{Binding ProgressPartText}" HorizontalAlignment="Right"
Margin="2" />
<ProgressBar Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Margin="2" Height="10" Value="{Binding ProgressPart}" HorizontalAlignment="Stretch"/>
<TextBlock Grid.Row="2" Grid.Column="0" Text="{Binding ProgressPartText}" />
<ProgressBar Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Value="{Binding ProgressPart}" />
<TextBlock Grid.Row="3" Grid.Column="0" Text="Total" HorizontalAlignment="Right" Margin="2" />
<ProgressBar Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" Margin="2" Height="10" Value="{Binding Progress}" HorizontalAlignment="Stretch"/>
<StackPanel Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Command="{Binding FuseCommand}" Content="Fuse" HorizontalAlignment="Stretch"
HorizontalContentAlignment="Center" Margin="2" />
<Button Command="{Binding StopCommand}" Content="Stop" HorizontalAlignment="Stretch"
HorizontalContentAlignment="Center" Margin="2" />
<TextBlock Grid.Row="3" Grid.Column="0" Text="Total" Classes="inlineProgress" />
<ProgressBar Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" Value="{Binding Progress}" />
<StackPanel Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" Orientation="Horizontal"
HorizontalAlignment="Right">
<Button Command="{Binding FuseCommand}" Content="Fuse" />
<Button Command="{Binding StopCommand}" Content="Stop" />
</StackPanel>
<Expander Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="3"
Header="Log"
Margin="2">
<Grid ColumnDefinitions="*,Auto" >
<Grid ColumnDefinitions="*,Auto">
<DataGrid Grid.Column="0"
x:Name="FuseSimpleLog"
Items="{Binding LogItems}"
CanUserSortColumns="False"
CanUserResizeColumns="True"
CanUserReorderColumns="True"
VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Auto"
VerticalAlignment="Top"
Height="300"
LoadingRow="FuseSimpleLog_OnLoadingRow">
<DataGrid.Columns>
<DataGridTextColumn Header="Type" Binding="{Binding Type}" Width="Auto"
Foreground="{Binding Color}" FontSize="12" />
<DataGridTextColumn Header="Time" Binding="{Binding Time}" Width="Auto" FontSize="12" />
<DataGridTextColumn Header="Message" Binding="{Binding Message}" Width="Auto" FontSize="12" />
<DataGridTextColumn Header="Type" Binding="{Binding Type}" Foreground="{Binding Color}"
CellStyleClasses="logCell" />
<DataGridTextColumn Header="Time" Binding="{Binding Time}" CellStyleClasses="logCell" />
<DataGridTextColumn Header="Message" Binding="{Binding Message}" CellStyleClasses="logCell" />
</DataGrid.Columns>
</DataGrid>
<Button Grid.Column="1" Command="{Binding ClearLogCommand}" Content="Clear"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Center" VerticalAlignment="Top" Margin="4 0 0 0" />
<Button Grid.Column="1" Command="{Binding ClearLogCommand}" Content="Clear" Classes="clear" />
</Grid>
</Expander>
</Grid>
<TextBlock DockPanel.Dock="Bottom" Text="{Binding ProgressText}" HorizontalAlignment="Right" VerticalAlignment="Bottom" FontSize="12" Margin="0 0 20 0"/>
<TextBlock DockPanel.Dock="Bottom" Text="{Binding ProgressText}" Classes="footerProgress" />
</DockPanel>
</UserControl>