complete visual ui
This commit is contained in:
@@ -5,8 +5,7 @@
|
||||
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->
|
||||
|
||||
<Application.Styles>
|
||||
<FluentTheme DensityStyle="Normal" />
|
||||
<!-- <FluentTheme DensityStyle="Compact" /> -->
|
||||
<!-- <SimpleTheme /> -->
|
||||
<FluentTheme />
|
||||
<StyleInclude Source="avares://Pilz.UI.AvaloniaUI/Assets/Styles/EnhancedDefaults.axaml"/>
|
||||
</Application.Styles>
|
||||
</Application>
|
||||
@@ -9,6 +9,7 @@ public partial class App : Application
|
||||
public override void Initialize()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
AppGlobals.Initialize();
|
||||
}
|
||||
|
||||
public override void OnFrameworkInitializationCompleted()
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:lang="clr-namespace:ModpackUpdater.Apps.Client.Gui.LangRes"
|
||||
xmlns:pilz="https://git.pilzinsel64.de/pilz-framework/pilz"
|
||||
xmlns:symbols="clr-namespace:Pilz.UI.Symbols;assembly=Pilz.UI"
|
||||
mc:Ignorable="d"
|
||||
x:Class="ModpackUpdater.Apps.Client.Gui.MainForm"
|
||||
Width="520"
|
||||
@@ -11,15 +12,14 @@
|
||||
WindowStartupLocation="CenterScreen"
|
||||
CanMaximize="false"
|
||||
Title="Minecraft Modpack Updater"
|
||||
Icon="/Assets/app.ico"
|
||||
>
|
||||
Icon="/Assets/app.ico">
|
||||
|
||||
<Grid
|
||||
RowDefinitions="Auto,Auto,Auto,Auto,Auto"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Top"
|
||||
x:Name="MainGrid"
|
||||
>
|
||||
Margin="3"
|
||||
x:Name="MainGrid">
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
@@ -34,7 +34,7 @@
|
||||
<Label Grid.Row="3" Grid.Column="0" Margin="3" VerticalAlignment="Center" Content="{x:Static lang:GeneralLangRes.Status}"/>
|
||||
<Label Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" Margin="3" VerticalAlignment="Center">
|
||||
<StackPanel Orientation="Horizontal" Spacing="6">
|
||||
<Image Width="16" Height="16" x:Name="ImageStatus" />
|
||||
<Image Width="{x:Static symbols:SymbolGlobals.DefaultImageSmallSize}" x:Name="ImageStatus"/>
|
||||
<TextBlock x:Name="TextStatus"/>
|
||||
</StackPanel>
|
||||
</Label>
|
||||
@@ -47,8 +47,7 @@
|
||||
Margin="3"
|
||||
VerticalAlignment="Center"
|
||||
Watermark="C:\..."
|
||||
TextChanged="TextBoxMinecraftProfileFolder_TextChanged"
|
||||
/>
|
||||
TextChanged="TextBoxMinecraftProfileFolder_TextChanged"/>
|
||||
|
||||
<!-- TextBoxes: ModpackConfig -->
|
||||
<TextBox
|
||||
@@ -59,8 +58,7 @@
|
||||
Margin="3"
|
||||
VerticalAlignment="Center"
|
||||
Watermark="https://..."
|
||||
TextChanged="TextBoxModpackConfig_TextChanged"
|
||||
/>
|
||||
TextChanged="TextBoxModpackConfig_TextChanged"/>
|
||||
|
||||
<!-- TextBoxes: InstallKey -->
|
||||
<TextBox
|
||||
@@ -72,8 +70,7 @@
|
||||
VerticalAlignment="Center"
|
||||
Watermark="XXXXX-YYYYY-ZZZZZ-AAAAA-BBBBB"
|
||||
TextChanged="TextBoxInstallKey_TextChanged"
|
||||
IsVisible="false"
|
||||
/>
|
||||
IsVisible="false"/>
|
||||
|
||||
<!-- Button: SearchProfileFolder -->
|
||||
<pilz:ImageButton
|
||||
@@ -84,8 +81,7 @@
|
||||
VerticalAlignment="Stretch"
|
||||
HorizontalAlignment="Stretch"
|
||||
Text="{x:Static lang:GeneralLangRes.Select}"
|
||||
Click="ButtonSearchProfileFolder_Click"
|
||||
/>
|
||||
Click="ButtonSearchProfileFolder_Click"/>
|
||||
|
||||
<!-- Button: CheckForUpdates -->
|
||||
<pilz:ImageButton
|
||||
@@ -96,8 +92,7 @@
|
||||
VerticalAlignment="Stretch"
|
||||
HorizontalAlignment="Stretch"
|
||||
Text="{x:Static lang:GeneralLangRes.CheckForUpdates}"
|
||||
Click="ButtonCheckForUpdates_Click"
|
||||
/>
|
||||
Click="ButtonCheckForUpdates_Click"/>
|
||||
|
||||
<!-- Button: Install -->
|
||||
<pilz:ImageSplitButton
|
||||
@@ -109,8 +104,7 @@
|
||||
HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Center"
|
||||
Text="{x:Static lang:GeneralLangRes.Install}"
|
||||
Click="ButtonInstall_Click"
|
||||
>
|
||||
Click="ButtonInstall_Click">
|
||||
<SplitButton.Flyout>
|
||||
<MenuFlyout>
|
||||
<MenuItem x:Name="MenuItemRepair" Header="{x:Static lang:GeneralLangRes.Repair}" Click="MenuItemRepair_Click"/>
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<PackageReference Include="Pilz.Cryptography" Version="2.1.2" />
|
||||
<PackageReference Include="Pilz.IO" Version="2.1.0" />
|
||||
<PackageReference Include="Pilz.UI" Version="3.1.4" />
|
||||
<PackageReference Include="Pilz.UI.AvaloniaUI" Version="1.2.13" />
|
||||
<PackageReference Include="Pilz.UI.AvaloniaUI" Version="1.2.15" />
|
||||
<PackageReference Include="Avalonia" Version="11.3.8" />
|
||||
<PackageReference Include="Avalonia.Desktop" Version="11.3.8" />
|
||||
<PackageReference Include="Avalonia.Svg" Version="11.3.0" />
|
||||
|
||||
@@ -10,6 +10,6 @@
|
||||
<!-- <SimpleTheme /> -->
|
||||
<StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Fluent.xaml"/>
|
||||
<!-- <StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Simple.xaml"/> -->
|
||||
<StyleInclude Source="avares://MinecraftModpackUpdateManager/Assets/Styles/StylesEnhancedDefaults.axaml"/>
|
||||
<StyleInclude Source="avares://Pilz.UI.AvaloniaUI/Assets/Styles/EnhancedDefaults.axaml"/>
|
||||
</Application.Styles>
|
||||
</Application>
|
||||
@@ -3,7 +3,6 @@ using Avalonia.Controls.ApplicationLifetimes;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using ModpackUpdater.Apps.Manager.Ui;
|
||||
using Pilz.Features;
|
||||
using Pilz.UI.Symbols;
|
||||
|
||||
namespace ModpackUpdater.Apps.Manager;
|
||||
|
||||
@@ -11,7 +10,6 @@ public partial class App : Application
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
SymbolGlobals.DefaultImageSmallSize = 17;
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
AppGlobals.Initialize();
|
||||
PluginFeatureController.Instance.RegisterAllOwn();
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
<Styles xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Design.PreviewWith>
|
||||
<Border Padding="20">
|
||||
<!-- Add Controls for Previewer Here -->
|
||||
</Border>
|
||||
</Design.PreviewWith>
|
||||
|
||||
<Style Selector="Label">
|
||||
<Setter Property="Padding" Value="0"/>
|
||||
</Style>
|
||||
|
||||
<Style Selector="ComboBox">
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
</Style>
|
||||
</Styles>
|
||||
@@ -27,7 +27,7 @@
|
||||
<PackageReference Include="Pilz.Cryptography" Version="2.1.2" />
|
||||
<PackageReference Include="Pilz.Features" Version="2.12.0" />
|
||||
<PackageReference Include="Pilz.UI" Version="3.1.4" />
|
||||
<PackageReference Include="Pilz.UI.AvaloniaUI" Version="1.2.13" />
|
||||
<PackageReference Include="Pilz.UI.AvaloniaUI" Version="1.2.15" />
|
||||
<PackageReference Include="Pilz.UI.AvaloniaUI.Features" Version="1.0.0" />
|
||||
<PackageReference Include="Avalonia" Version="11.3.8" />
|
||||
<PackageReference Include="Avalonia.Desktop" Version="11.3.8" />
|
||||
|
||||
@@ -11,33 +11,21 @@
|
||||
x:Class="ModpackUpdater.Apps.Manager.Ui.MainWindow"
|
||||
x:DataType="vm:MainWindowViewModel"
|
||||
Title="Minecraft Modpack Manager"
|
||||
Padding="3"
|
||||
WindowState="Maximized"
|
||||
Loaded="Window_OnLoaded">
|
||||
|
||||
<Window.Styles>
|
||||
<Style Selector="DropDownButton /template/ Path#PART_DropDownGlyph">
|
||||
<Setter Property="IsVisible" Value="False"/>
|
||||
</Style>
|
||||
</Window.Styles>
|
||||
|
||||
<Grid
|
||||
RowDefinitions="Auto,*">
|
||||
|
||||
<!-- Tree view -->
|
||||
<Grid
|
||||
x:Name="GridMain"
|
||||
Grid.Row="1"
|
||||
RowDefinitions="Auto,*"
|
||||
ColumnDefinitions="Auto,*,500"
|
||||
RowSpacing="6"
|
||||
ColumnSpacing="6"
|
||||
Margin="3">
|
||||
|
||||
<!-- StackPanel: Workspace -->
|
||||
<StackPanel
|
||||
Grid.Column="0"
|
||||
Margin="3"
|
||||
Spacing="6">
|
||||
|
||||
<!-- StackPanel: Menu for updates -->
|
||||
<StackPanel
|
||||
Grid.Row="0"
|
||||
Orientation="Horizontal">
|
||||
|
||||
<!-- Button: Workspace -->
|
||||
@@ -83,8 +71,10 @@
|
||||
Background="Transparent"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- TreeView: Updates -->
|
||||
<!-- TreeView: Workspace -->
|
||||
<ScrollViewer
|
||||
Grid.Column="0"
|
||||
Grid.Row="1"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
|
||||
<StackPanel>
|
||||
@@ -107,16 +97,11 @@
|
||||
</TreeView>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</StackPanel>
|
||||
|
||||
<!-- List editor -->
|
||||
<StackPanel
|
||||
Grid.Column="1"
|
||||
Margin="3"
|
||||
Spacing="6">
|
||||
|
||||
<!-- Header -->
|
||||
<!-- Panel: List header -->
|
||||
<ContentControl
|
||||
Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
Content="{Binding SelectedTreeNode}">
|
||||
|
||||
<ContentControl.DataTemplates>
|
||||
@@ -163,6 +148,8 @@
|
||||
|
||||
<!-- DataGrid -->
|
||||
<DataGrid
|
||||
Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
x:Name="DataGridActions"
|
||||
VerticalAlignment="Stretch"
|
||||
ItemsSource="{Binding CurrentGridRows}"
|
||||
@@ -191,29 +178,22 @@
|
||||
Binding="{Binding InheritedDestPath}"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Action editor -->
|
||||
<ScrollViewer
|
||||
x:Name="ScrollViewerInstallAction"
|
||||
Grid.Column="2"
|
||||
Margin="3"
|
||||
Grid.Row="1"
|
||||
DataContext="{Binding SelectedGridRow}"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
|
||||
<ScrollViewer.Styles>
|
||||
<Style Selector="Label">
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
</ScrollViewer.Styles>
|
||||
|
||||
<StackPanel
|
||||
Spacing="6">
|
||||
|
||||
<!-- Update -->
|
||||
<Grid
|
||||
ColumnDefinitions="150,*"
|
||||
RowDefinitions="Auto,Auto,Auto,Auto"
|
||||
RowDefinitions="Auto,Auto,Auto,Auto,Auto"
|
||||
RowSpacing="6"
|
||||
ColumnSpacing="6"
|
||||
IsVisible="{Binding IsUpdate}">
|
||||
@@ -235,8 +215,8 @@
|
||||
x:Name="TextBoxUpdateActionInheritFrom"
|
||||
Text="{Binding InheritFrom}"/>
|
||||
|
||||
<!-- Source type -->
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="Source type" Target="ComboBoxUpdateActionSourceType"/>
|
||||
<!-- Update type -->
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="Update type" Target="ComboBoxUpdateActionSourceType"/>
|
||||
<ComboBox
|
||||
Grid.Row="2" Grid.Column="1"
|
||||
x:Name="ComboBoxUpdateActionSourceType"
|
||||
@@ -245,8 +225,15 @@
|
||||
SelectedValueBinding="{Binding Key}"
|
||||
SelectedValue="{Binding UpdateType}"/>
|
||||
|
||||
<!-- Source path -->
|
||||
<Label Grid.Row="3" Grid.Column="0" Content="Source path" Target="TextBoxInstallActionSourcePath"/>
|
||||
<TextBox
|
||||
Grid.Row="3" Grid.Column="1"
|
||||
x:Name="TextBoxInstallActionSourcePath"
|
||||
Text="{Binding SrcPath}"/>
|
||||
|
||||
<!-- Is Directory -->
|
||||
<CheckBox Grid.Row="3" Grid.Column="1"
|
||||
<CheckBox Grid.Row="4" Grid.Column="1"
|
||||
x:Name="CheckBoxUpdateActionIsDir"
|
||||
Content="Is Directory"
|
||||
IsChecked="{Binding IsDirectory}"/>
|
||||
@@ -333,7 +320,7 @@
|
||||
<!-- Source -->
|
||||
<Grid
|
||||
ColumnDefinitions="150,*"
|
||||
RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto"
|
||||
RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto"
|
||||
RowSpacing="6"
|
||||
ColumnSpacing="6">
|
||||
|
||||
@@ -398,13 +385,6 @@
|
||||
Grid.Row="7" Grid.Column="1"
|
||||
x:Name="TextBoxInstallActionZipArchivePath"
|
||||
Text="{Binding SourceUrl}"/>
|
||||
|
||||
<!-- Source path -->
|
||||
<Label Grid.Row="8" Grid.Column="0" Content="Source path" Target="TextBoxInstallActionSourcePath"/>
|
||||
<TextBox
|
||||
Grid.Row="8" Grid.Column="1"
|
||||
x:Name="TextBoxInstallActionSourcePath"
|
||||
Text="{Binding SrcPath}"/>
|
||||
</Grid>
|
||||
|
||||
<!-- Metadata -->
|
||||
@@ -437,5 +417,4 @@
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -1,4 +1,5 @@
|
||||
using Pilz.UI.AvaloniaUI.Symbols;
|
||||
using Pilz.UI.Symbols;
|
||||
|
||||
namespace ModpackUpdater.Apps;
|
||||
|
||||
@@ -8,13 +9,6 @@ public static class AppGlobals
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
// ThemeHelper.ApplyApplicationTheme(new ThemeDefinition(ApplicationTheme.Auto, HighContrastMode.Auto), n => n.Theme switch
|
||||
// {
|
||||
// ApplicationTheme.Light => new Windows11CompactTheme(),
|
||||
// ApplicationTheme.Gray or ApplicationTheme.Dark => new Windows11CompactDarkTheme(),
|
||||
// _ => throw new NotImplementedException(),
|
||||
// });
|
||||
// RadFlyoutBase.ConfirmSvg = Symbols.GetSvgImage(AppSymbols.checkmark, Pilz.UI.Symbols.SymbolSize.Small);
|
||||
// RadFlyoutBase.CancelSvg = Symbols.GetSvgImage(AppSymbols.cancel, Pilz.UI.Symbols.SymbolSize.Small);
|
||||
SymbolGlobals.DefaultImageSmallSize = 17;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Pilz" Version="2.6.1" />
|
||||
<PackageReference Include="Pilz.UI" Version="3.1.4" />
|
||||
<PackageReference Include="Pilz.UI.AvaloniaUI" Version="1.2.13" />
|
||||
<PackageReference Include="Pilz.UI.AvaloniaUI" Version="1.2.15" />
|
||||
<PackageReference Include="Avalonia" Version="11.3.8" />
|
||||
<PackageReference Include="Avalonia.Desktop" Version="11.3.8" />
|
||||
<PackageReference Include="Avalonia.Svg" Version="11.3.0" />
|
||||
|
||||
Reference in New Issue
Block a user