mirror of
https://github.com/WinDurango/WinDurango.UI.git
synced 2026-01-31 00:55:24 +01:00
More QOL changes
This commit is contained in:
@@ -16,14 +16,15 @@
|
||||
<controls:ContributorInfo Margin="0 10 10 10" x:Name="dexrn_Info" HorizontalAlignment="Left"/>
|
||||
<controls:ContributorInfo Margin="0 10 10 10" x:Name="danilwhale_Info" HorizontalAlignment="Left"/>
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock Text="Repo Contributors" FontSize="24"/>
|
||||
<TextBlock>
|
||||
<Run Text="Coming soon (maybe)"/>
|
||||
<LineBreak/>
|
||||
<Run Text="contrib.rocks apparently returns some svg instead of a png..."/>
|
||||
<LineBreak/>
|
||||
<Run Text="which makes it hard for me to use here."/>
|
||||
</TextBlock>
|
||||
<!---
|
||||
<TextBlock Text="Repo Contributors" FontSize="24"/>
|
||||
<TextBlock>
|
||||
<Run Text="Coming soon (maybe)"/>
|
||||
<LineBreak/>
|
||||
<Run Text="contrib.rocks apparently returns some svg instead of a png..."/>
|
||||
<LineBreak/>
|
||||
<Run Text="which makes it hard for me to use here."/>
|
||||
</TextBlock>
|
||||
-->
|
||||
</StackPanel>
|
||||
</Page>
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
using CommunityToolkit.WinUI;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.UI.Xaml.Media.Imaging;
|
||||
using SVGImage.SVG;
|
||||
using System;
|
||||
using WinDurango.UI.Controls;
|
||||
|
||||
|
||||
namespace WinDurango.UI.Pages
|
||||
|
||||
@@ -51,7 +51,14 @@ namespace WinDurango.UI.Pages
|
||||
|
||||
private async void ShowAppListView(object sender, RoutedEventArgs e)
|
||||
{
|
||||
AppListDialog dl = new(Packages.GetInstalledPackages().ToList(), true);
|
||||
List<Windows.ApplicationModel.Package> uwpApps = Packages.GetInstalledPackages().ToList();
|
||||
if (uwpApps.Count <= 0)
|
||||
{
|
||||
NoticeDialog dialog = new NoticeDialog("No UWP Apps have been found.");
|
||||
await dialog.ShowAsync();
|
||||
return;
|
||||
}
|
||||
AppListDialog dl = new(uwpApps, true);
|
||||
dl.Title = "Installed UWP apps";
|
||||
dl.XamlRoot = this.Content.XamlRoot;
|
||||
await dl.ShowAsync();
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<Grid>
|
||||
<StackPanel>
|
||||
<ScrollView>
|
||||
<StackPanel Padding="16">
|
||||
<TextBlock Margin="0 5 0 5" Text="Theme"/>
|
||||
<ComboBox
|
||||
x:Name="themeButton"
|
||||
@@ -38,5 +38,5 @@
|
||||
<ToggleSwitch OnContent="Enable debug logging" OffContent="Enable debug logging" Toggled="OnDebugLogToggled" Name="DebugLogToggle" Loaded="OnDebugLogToggleLoaded"/>
|
||||
<Button Name="appdataButton" Margin="0 5 0 5" Click="OpenAppData">Open WinDurango AppData folder</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</ScrollView>
|
||||
</Page>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
BorderThickness="0">
|
||||
|
||||
<ScrollViewer>
|
||||
<StackPanel>
|
||||
<StackPanel Padding="16">
|
||||
<TextBlock Margin="0 5 0 5" Text="Layer Settings" FontSize="16" FontWeight="Bold"/>
|
||||
<Button Margin="0 5 0 5" Click="ManageUsers">Manage users</Button>
|
||||
<TextBlock Margin="0 5 0 5" Text="Debug" FontSize="16" FontWeight="Bold"/>
|
||||
|
||||
@@ -49,6 +49,7 @@ public class UiConfig : IConfig
|
||||
{
|
||||
Logger.WriteWarning($"Settings file doesn't exist");
|
||||
Generate();
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
@@ -108,6 +109,9 @@ public class UiConfig : IConfig
|
||||
JsonSerializerOptions options = new();
|
||||
options.WriteIndented = true;
|
||||
File.WriteAllText(_settingsFile, JsonSerializer.Serialize(Settings, options));
|
||||
/* FIXME: For some reason unknown to me, App.MainWindow is null here, but only if the Settings were generated before e.g. on first launch
|
||||
* No biggy in that case as nothing has been customized yet, but depending on the reason this might cause problems.
|
||||
*/
|
||||
App.MainWindow.LoadSettings();
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
Reference in New Issue
Block a user