Skip to content

Commit

Permalink
Integrate Material Design UI updates
Browse files Browse the repository at this point in the history
This commit represents a major overhaul of the application's user interface, focusing on the integration of Material Design principles across various XAML files and some backend adjustments. Key changes include the removal of old ResourceDictionary themes in favor of direct Material Design components, such as `materialDesign:DialogHost` and `materialDesign:Card`, in AddProfileDialog.xaml. CustomDialog.xaml and ErrorBox.xaml have seen updates to use Material Design resources for `TextElement`, `Background`, and `FontFamily`, with a general shift in `FontSize` to `12` for a more consistent look. The application's version has been updated in the Elite Dangerous Addon Launcher V2.csproj file. MainWindow.xaml.cs has been enhanced with better error handling and a new bug fix note in the "What's New" section. SearchProgressWindow.xaml and WhatsNew.xaml also received updates to fully align with Material Design standards, removing outdated visual settings and ensuring a cohesive and modern user experience.
  • Loading branch information
jimmyeao committed Jul 14, 2024
1 parent fad555a commit 46ae45f
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 29 deletions.
10 changes: 1 addition & 9 deletions AddProfileDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,7 @@
TextOptions.TextRenderingMode="Auto"
Background="{DynamicResource MaterialDesignPaper}"
FontFamily="{DynamicResource MaterialDesignFont}">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<materialDesign:BundledTheme BaseTheme="Light" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.DeepOrange.xaml"/>
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Lime.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>


<materialDesign:DialogHost>
<materialDesign:Card>
Expand Down
12 changes: 7 additions & 5 deletions CustomDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
Width="400"
Height="200"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextElement.FontWeight="Regular"
TextElement.FontSize="13"
TextElement.Foreground="{DynamicResource MaterialDesign.Brush.Foreground}"
Background="{DynamicResource MaterialDesign.Brush.Background}"
TextElement.FontWeight="Regular"
TextElement.FontSize="12"
FontFamily="{materialDesign:MaterialDesignFont}"

TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="Auto"
Background="{DynamicResource MaterialDesignPaper}"
FontFamily="{DynamicResource MaterialDesignFont}">
>


<Border Padding="20">
Expand Down
4 changes: 2 additions & 2 deletions Elite Dangerous Addon Launcher V2.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<RootNamespace>Elite_Dangerous_Addon_Launcher_V2</RootNamespace>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<AssemblyVersion>1.1.5.397</AssemblyVersion>
<FileVersion>1.1.5.397</FileVersion>
<AssemblyVersion>1.1.5.405</AssemblyVersion>
<FileVersion>1.1.5.405</FileVersion>
<ApplicationIcon>elite-dangerous-icon.ico</ApplicationIcon>
<PackageIcon>app.png</PackageIcon>
<PackageProjectUrl>https://github.com/jimmyeao/Elite-Dangerous-Addon-Launcher-V2</PackageProjectUrl>
Expand Down
12 changes: 7 additions & 5 deletions ErrorBox.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
Width="400"
Height="200"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextElement.FontWeight="Regular"
TextElement.FontSize="13"
TextElement.Foreground="{DynamicResource MaterialDesign.Brush.Foreground}"
Background="{DynamicResource MaterialDesign.Brush.Background}"
TextElement.FontWeight="Regular"
TextElement.FontSize="12"
FontFamily="{materialDesign:MaterialDesignFont}"

TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="Auto"
Background="{DynamicResource MaterialDesignPaper}"
FontFamily="{DynamicResource MaterialDesignFont}">
>


<Border Padding="20">
Expand Down
14 changes: 12 additions & 2 deletions MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ public void ShowWhatsNew()

List list = new List();

ListItem listItem1 = new ListItem(new Paragraph(new Run("Fixed bug blurry text on some forms")));
ListItem listItem1 = new ListItem(new Paragraph(new Run("Fixed bug with adding profiles causing a crash on first run")));
list.ListItems.Add(listItem1);

// ListItem listItem2 = new ListItem(new Paragraph(new Run("Profile Options for import/export and copy/rename/delete")));
Expand Down Expand Up @@ -523,7 +523,17 @@ private void DeleteButton_Click(object sender, RoutedEventArgs e)
var appToDelete = (MyApp)button.DataContext;

// remove the item from the collection
AppState.Instance.CurrentProfile.Apps.Remove(appToDelete);
try
{
AppState.Instance.CurrentProfile.Apps.Remove(appToDelete);
Log.Information($"App {appToDelete.Name} deleted..", appToDelete.Name);
}

catch (Exception ex)
{
// handle exception
Log.Error(ex, "An error occurred trying to delete an app..");
}
_ = SaveProfilesAsync();
}
}
Expand Down
10 changes: 6 additions & 4 deletions SearchProgressWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
Height="150"
Width="400"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextElement.Foreground="{DynamicResource MaterialDesign.Brush.Foreground}"
Background="{DynamicResource MaterialDesign.Brush.Background}"
TextElement.FontWeight="Regular"
TextElement.FontSize="13"
TextElement.FontSize="12"
FontFamily="{materialDesign:MaterialDesignFont}"

TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="Auto"
Background="{DynamicResource MaterialDesignPaper}"
FontFamily="{DynamicResource MaterialDesignFont}">
>

<Grid>
<TextBlock Name="searchStatusTextBlock"
Expand Down
7 changes: 5 additions & 2 deletions WhatsNew.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@
TextElement.Foreground="{DynamicResource MaterialDesign.Brush.Foreground}"
Background="{DynamicResource MaterialDesign.Brush.Background}"
TextElement.FontWeight="Regular"
TextElement.FontSize="14"
TextElement.FontSize="12"
FontFamily="{materialDesign:MaterialDesignFont}"


TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="Auto"

FontFamily="{DynamicResource MaterialDesignFont}">
>

<Grid>
<Grid.RowDefinitions>
Expand Down

0 comments on commit 46ae45f

Please sign in to comment.