1
0
Fork 0
mirror of https://github.com/oMaN-Rod/nxDumpFuse.git synced 2024-11-22 18:26:40 +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"> <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> <Application.Styles>
<FluentTheme Mode="Dark" /> <FluentTheme Mode="Dark" />
<StyleInclude Source="/Styles/SideBar.axaml" /> <StyleInclude Source="/Styles/SideBar.axaml" />
<StyleInclude Source="/Styles/Styles.axaml" />
<StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Fluent.xaml" /> <StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Fluent.xaml" />
</Application.Styles> </Application.Styles>
</Application> </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" RowDefinitions="Auto,Auto"
ColumnDefinitions="Auto,*"> ColumnDefinitions="Auto,*">
<TextBlock Grid.Row="0" Text="{Binding UsageText}" /> <TextBlock Grid.Row="0" Text="{Binding UsageText}" />
<TextBlock Grid.Row="1" Grid.Column="0" Margin="5" VerticalAlignment="Center" Text="{Binding AuthorInfo}" <TextBlock Grid.Row="1" Grid.Column="0" Text="{Binding AuthorInfo}" Classes="authorInfo" />
HorizontalAlignment="Right" /> <Button Grid.Row="1" Grid.Column="1" Command="{Binding OpenGithubCommand}" Classes="gitHubButton">
<Button Grid.Row="1" Grid.Column="1" Padding="-10" Command="{Binding OpenGithubCommand}">
<Panel> <Panel>
<Image Width="75" Height="75" Source="resm:nxDumpFuse.Assets.github_icon.png" /> <Image Width="75" Height="75" Source="resm:nxDumpFuse.Assets.github_icon.png" />
</Panel> </Panel>

View file

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