diff --git a/.gitignore b/.gitignore index 7814091..c923c23 100644 --- a/.gitignore +++ b/.gitignore @@ -482,3 +482,5 @@ $RECYCLE.BIN/ *.swp nul /publish-test +/_build_verify +/_build_verify_tray diff --git a/LanMountainDesktop/App.axaml b/LanMountainDesktop/App.axaml index 3737feb..af30398 100644 --- a/LanMountainDesktop/App.axaml +++ b/LanMountainDesktop/App.axaml @@ -22,6 +22,8 @@ ToolTipText="LanMountainDesktop"> + + diff --git a/LanMountainDesktop/App.axaml.cs b/LanMountainDesktop/App.axaml.cs index 18afbe9..a20e776 100644 --- a/LanMountainDesktop/App.axaml.cs +++ b/LanMountainDesktop/App.axaml.cs @@ -6,6 +6,7 @@ using System; using System.Diagnostics; using System.Linq; using Avalonia.Markup.Xaml; +using Avalonia.Threading; using LanMountainDesktop.Services; using LanMountainDesktop.ViewModels; using LanMountainDesktop.Views; @@ -15,6 +16,8 @@ namespace LanMountainDesktop; public partial class App : Application { + private SettingsWindow? _traySettingsWindow; + public override void Initialize() { ConfigureWebViewUserDataFolder(); @@ -31,6 +34,7 @@ public partial class App : Application // Avoid duplicate validations from both Avalonia and the CommunityToolkit. // More info: https://docs.avaloniaui.net/docs/guides/development-guides/data-validation#manage-validationplugins DisableAvaloniaDataAnnotationValidation(); + desktop.ShutdownMode = Avalonia.Controls.ShutdownMode.OnExplicitShutdown; desktop.MainWindow = new MainWindow { DataContext = new MainWindowViewModel(), @@ -48,6 +52,44 @@ public partial class App : Application } } + private void OnTraySettingsClick(object? sender, EventArgs e) + { + if (ApplicationLifetime is not IClassicDesktopStyleApplicationLifetime) + { + return; + } + + Dispatcher.UIThread.Post(() => + { + try + { + if (_traySettingsWindow is { } existingWindow && existingWindow.IsVisible) + { + existingWindow.WindowState = Avalonia.Controls.WindowState.Normal; + existingWindow.Activate(); + return; + } + + var settingsWindow = new SettingsWindow(); + settingsWindow.Closed += (_, _) => + { + if (ReferenceEquals(_traySettingsWindow, settingsWindow)) + { + _traySettingsWindow = null; + } + }; + + _traySettingsWindow = settingsWindow; + settingsWindow.Show(); + settingsWindow.Activate(); + } + catch (Exception ex) + { + Debug.WriteLine($"[TraySettings] Failed to open settings window: {ex}"); + } + }, DispatcherPriority.Normal); + } + private void OnTrayRestartClick(object? sender, EventArgs e) { if (ApplicationLifetime is not IClassicDesktopStyleApplicationLifetime desktop) diff --git a/LanMountainDesktop/Services/AppSettingsService.cs b/LanMountainDesktop/Services/AppSettingsService.cs index ff19aec..b9c1a65 100644 --- a/LanMountainDesktop/Services/AppSettingsService.cs +++ b/LanMountainDesktop/Services/AppSettingsService.cs @@ -7,6 +7,8 @@ namespace LanMountainDesktop.Services; public sealed class AppSettingsService { + public static event Action? SettingsSaved; + private static readonly JsonSerializerOptions SerializerOptions = new() { WriteIndented = true @@ -21,6 +23,8 @@ public sealed class AppSettingsService private readonly string _settingsPath; + public string InstanceId { get; } = Guid.NewGuid().ToString("N"); + public AppSettingsService() { var appData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); @@ -88,6 +92,8 @@ public sealed class AppSettingsService { UpdateCache(snapshotToPersist, writeTimeUtc, DateTime.UtcNow); } + + SettingsSaved?.Invoke(InstanceId); } catch { diff --git a/LanMountainDesktop/Services/LauncherSettingsService.cs b/LanMountainDesktop/Services/LauncherSettingsService.cs index a76e194..006e23d 100644 --- a/LanMountainDesktop/Services/LauncherSettingsService.cs +++ b/LanMountainDesktop/Services/LauncherSettingsService.cs @@ -9,6 +9,8 @@ namespace LanMountainDesktop.Services; public sealed class LauncherSettingsService { + public static event Action? SettingsSaved; + private static readonly JsonSerializerOptions SerializerOptions = new() { WriteIndented = true @@ -24,6 +26,8 @@ public sealed class LauncherSettingsService private readonly string _settingsPath; private readonly string _legacyAppSettingsPath; + public string InstanceId { get; } = Guid.NewGuid().ToString("N"); + public LauncherSettingsService() { var appData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); @@ -99,6 +103,8 @@ public sealed class LauncherSettingsService { UpdateCache(snapshotToPersist, writeTimeUtc, DateTime.UtcNow); } + + SettingsSaved?.Invoke(InstanceId); } catch { diff --git a/LanMountainDesktop/Views/MainWindow.ComponentSystem.cs b/LanMountainDesktop/Views/MainWindow.ComponentSystem.cs index d54b4bc..a57bf0f 100644 --- a/LanMountainDesktop/Views/MainWindow.ComponentSystem.cs +++ b/LanMountainDesktop/Views/MainWindow.ComponentSystem.cs @@ -256,14 +256,15 @@ public partial class MainWindow return TaskbarContext.Desktop; } - return SettingsNavListBox?.SelectedIndex switch + var selectedItem = SettingsNavView?.SelectedItem as FluentAvalonia.UI.Controls.NavigationViewItem; + return selectedItem?.Tag?.ToString() switch { - 0 => TaskbarContext.SettingsWallpaper, - 1 => TaskbarContext.SettingsGrid, - 2 => TaskbarContext.SettingsColor, - 3 => TaskbarContext.SettingsStatusBar, - 4 => TaskbarContext.SettingsWeather, - 5 => TaskbarContext.SettingsRegion, + "Wallpaper" => TaskbarContext.SettingsWallpaper, + "Grid" => TaskbarContext.SettingsGrid, + "Color" => TaskbarContext.SettingsColor, + "StatusBar" => TaskbarContext.SettingsStatusBar, + "Weather" => TaskbarContext.SettingsWeather, + "Region" => TaskbarContext.SettingsRegion, _ => TaskbarContext.Desktop }; } diff --git a/LanMountainDesktop/Views/MainWindow.Localization.cs b/LanMountainDesktop/Views/MainWindow.Localization.cs index 903de0f..2c5a7c6 100644 --- a/LanMountainDesktop/Views/MainWindow.Localization.cs +++ b/LanMountainDesktop/Views/MainWindow.Localization.cs @@ -107,16 +107,16 @@ public partial class MainWindow ToolTip.SetTip(LauncherFolderBackButton, L("common.back", "Back")); ToolTip.SetTip(LauncherFolderCloseButton, L("common.close", "Close")); - SettingsNavHeaderTextBlock.Text = L("settings.nav_header", "Settings"); - SettingsNavWallpaperTextBlock.Text = L("settings.nav.wallpaper", "Wallpaper"); - SettingsNavGridTextBlock.Text = L("settings.nav.grid", "Grid"); - SettingsNavColorTextBlock.Text = L("settings.nav.color", "Color"); - SettingsNavStatusBarTextBlock.Text = L("settings.nav.status_bar", "Status Bar"); - SettingsNavWeatherTextBlock.Text = L("settings.nav.weather", "Weather"); - SettingsNavRegionTextBlock.Text = L("settings.nav.region", "Region"); - SettingsNavUpdateTextBlock.Text = L("settings.nav.update", "Update"); - SettingsNavLauncherTextBlock.Text = L("settings.nav.launcher", "App Launcher"); - SettingsNavPluginsTextBlock.Text = L("settings.nav.plugins", "Plugins"); + // SettingsNavHeaderTextBlock no longer exists + SettingsNavWallpaperItem.Content = L("settings.nav.wallpaper", "Wallpaper"); + SettingsNavGridItem.Content = L("settings.nav.grid", "Grid"); + SettingsNavColorItem.Content = L("settings.nav.color", "Color"); + SettingsNavStatusBarItem.Content = L("settings.nav.status_bar", "Status Bar"); + SettingsNavWeatherItem.Content = L("settings.nav.weather", "Weather"); + SettingsNavRegionItem.Content = L("settings.nav.region", "Region"); + SettingsNavUpdateItem.Content = L("settings.nav.update", "Update"); + SettingsNavLauncherItem.Content = L("settings.nav.launcher", "App Launcher"); + SettingsNavPluginsItem.Content = L("settings.nav.plugins", "Plugins"); WallpaperPanelTitleTextBlock.Text = L("settings.wallpaper.title", "Personalize your wallpaper"); WallpaperPlacementSettingsExpander.Header = L("settings.wallpaper.placement_label", "Placement"); @@ -127,10 +127,10 @@ public partial class MainWindow ClearWallpaperButton.Content = L("settings.wallpaper.clear_button", "Reset"); GridPanelTitleTextBlock.Text = L("settings.grid.title", "Grid Layout"); - GridSpacingPresetLabelTextBlock.Text = L("settings.grid.spacing_label", "Grid Spacing"); + GridSpacingSettingsExpander.Header = L("settings.grid.spacing_label", "Grid Spacing"); GridSpacingRelaxedComboBoxItem.Content = L("settings.grid.spacing_relaxed", "Relaxed"); GridSpacingCompactComboBoxItem.Content = L("settings.grid.spacing_compact", "Compact"); - GridEdgeInsetLabelTextBlock.Text = L("settings.grid.edge_inset_label", "Screen Inset"); + GridEdgeInsetSettingsExpander.Header = L("settings.grid.edge_inset_label", "Screen Inset"); ApplyGridButton.Content = L("settings.grid.apply_button", "Apply"); UpdateGridEdgeInsetComputedPxText(_currentDesktopCellSize); @@ -175,7 +175,7 @@ public partial class MainWindow StatusBarSpacingModeCompactItem.Content = L("settings.status_bar.spacing_mode_compact", "Compact"); StatusBarSpacingModeRelaxedItem.Content = L("settings.status_bar.spacing_mode_relaxed", "Relaxed"); StatusBarSpacingModeCustomItem.Content = L("settings.status_bar.spacing_mode_custom", "Custom"); - StatusBarSpacingCustomLabelTextBlock.Text = L("settings.status_bar.spacing_custom_label", "Custom spacing (%)"); + StatusBarSpacingCustomPanel.Content = L("settings.status_bar.spacing_custom_label", "Custom spacing (%)"); WeatherPanelTitleTextBlock.Text = L("settings.weather.title", "Weather"); WeatherLocationSettingsExpander.Header = L("settings.weather.location_source_header", "Location Source"); @@ -212,6 +212,14 @@ public partial class MainWindow "Refresh and verify current weather service status."); WeatherPreviewButton.Content = L("settings.weather.refresh_button", "Refresh"); + WeatherLocationSettingsExpander.Header = L("settings.weather.location_msg_header", "Location Source"); + WeatherLocationSettingsExpander.Description = L( + "settings.weather.location_msg_desc", + "Choose how weather widgets resolve location."); + WeatherLocationModeCityChipItem.Content = L("settings.weather.mode_city", "City Search"); + WeatherLocationModeCoordinatesChipItem.Content = L("settings.weather.mode_coordinates", "Coordinates"); + WeatherAutoRefreshToggleSwitch.Content = L("settings.weather.auto_location_toggle", "Auto refresh location on startup"); + WeatherAlertFilterSettingsExpander.Header = L("settings.weather.alert_filter_header", "Excluded Alerts"); WeatherAlertFilterSettingsExpander.Description = L( "settings.weather.alert_filter_desc", @@ -248,6 +256,7 @@ public partial class MainWindow RegionPanelTitleTextBlock.Text = L("settings.region.title", "Region"); LanguageSettingsExpander.Header = L("settings.region.language_header", "Language"); + LanguageSettingsExpander.Description = L("settings.region.language_desc", "Select application language. Changes apply immediately."); LanguageChineseItem.Content = L("settings.region.language_zh", "Chinese"); LanguageEnglishItem.Content = L("settings.region.language_en", "English"); TimeZoneSettingsExpander.Header = L("settings.region.timezone_header", "Time Zone"); @@ -279,7 +288,7 @@ public partial class MainWindow "settings.plugins.runtime_status", "Plugin management UI is not connected yet. Next step is wiring the loader, permissions, and worker isolation state into this panel."); - SettingsNavAboutTextBlock.Text = L("settings.nav.about", "About"); + SettingsNavAboutItem.Content = L("settings.nav.about", "About"); AboutPanelTitleTextBlock.Text = L("settings.about.title", "About"); VersionTextBlock.Text = Lf( "settings.about.version_format", diff --git a/LanMountainDesktop/Views/MainWindow.Settings.cs b/LanMountainDesktop/Views/MainWindow.Settings.cs index 7a0bbcd..75834d8 100644 --- a/LanMountainDesktop/Views/MainWindow.Settings.cs +++ b/LanMountainDesktop/Views/MainWindow.Settings.cs @@ -1,5 +1,6 @@ using System; using FluentIcons.Avalonia; +using FluentIcons.Avalonia.Fluent; using FluentIcons.Common; using LanMountainDesktop.Views.Components; @@ -19,6 +20,7 @@ using Avalonia.Platform; using Avalonia.Platform.Storage; using Avalonia.Styling; using Avalonia.Threading; +using LanMountainDesktop.ComponentSystem; using LanMountainDesktop.Models; using LanMountainDesktop.Services; using LanMountainDesktop.Theme; @@ -28,6 +30,47 @@ namespace LanMountainDesktop.Views; public partial class MainWindow { + private void OnExternalAppSettingsSaved(string sourceInstanceId) + { + if (string.Equals(sourceInstanceId, _appSettingsService.InstanceId, StringComparison.Ordinal)) + { + return; + } + + ScheduleReloadFromExternalSettings(); + } + + private void OnExternalLauncherSettingsSaved(string sourceInstanceId) + { + if (string.Equals(sourceInstanceId, _launcherSettingsService.InstanceId, StringComparison.Ordinal)) + { + return; + } + + ScheduleReloadFromExternalSettings(); + } + + private void ScheduleReloadFromExternalSettings() + { + if (_externalSettingsReloadPending) + { + return; + } + + _externalSettingsReloadPending = true; + Dispatcher.UIThread.Post(() => + { + _externalSettingsReloadPending = false; + + if (!IsVisible) + { + return; + } + + ReloadFromPersistedSettings(); + }, DispatcherPriority.Background); + } + private void OnOpenSettingsClick(object? sender, RoutedEventArgs e) { if (_isComponentLibraryOpen) @@ -49,16 +92,37 @@ public partial class MainWindow CloseSettingsPage(); } - private void OnSettingsNavSelectionChanged(object? sender, SelectionChangedEventArgs e) + private void OnSettingsNavSelectionChanged(object? sender, FluentAvalonia.UI.Controls.NavigationViewSelectionChangedEventArgs e) { UpdateSettingsTabContent(); PersistSettings(); } + private int GetSettingsTabIndex() + { + if (SettingsNavView?.SelectedItem is FluentAvalonia.UI.Controls.NavigationViewItem item) + { + return item.Tag?.ToString() switch + { + "Wallpaper" => 0, + "Grid" => 1, + "Color" => 2, + "StatusBar" => 3, + "Weather" => 4, + "Region" => 5, + "Update" => 6, + "About" => 7, + "Launcher" => 8, + "Plugins" => 9, + _ => 0 + }; + } + return 0; + } + private void UpdateSettingsTabContent() { - // SelectionChanged can fire during XAML initialization before all named controls are assigned. - if (SettingsNavListBox is null || + if (SettingsNavView is null || GridSettingsPanel is null || WallpaperSettingsPanel is null || ColorSettingsPanel is null || @@ -73,24 +137,26 @@ public partial class MainWindow return; } - var selectedIndex = SettingsNavListBox.SelectedIndex; - WallpaperSettingsPanel.IsVisible = selectedIndex == 0; - GridSettingsPanel.IsVisible = selectedIndex == 1; - ColorSettingsPanel.IsVisible = selectedIndex == 2; - StatusBarSettingsPanel.IsVisible = selectedIndex == 3; - WeatherSettingsPanel.IsVisible = selectedIndex == 4; - RegionSettingsPanel.IsVisible = selectedIndex == 5; - UpdateSettingsPanel.IsVisible = selectedIndex == 6; - AboutSettingsPanel.IsVisible = selectedIndex == 7; - LauncherSettingsPanel.IsVisible = selectedIndex == 8; - PluginSettingsPanel.IsVisible = selectedIndex == 9; + var selectedItem = SettingsNavView.SelectedItem as FluentAvalonia.UI.Controls.NavigationViewItem; + var tag = selectedItem?.Tag?.ToString(); - if (selectedIndex == 8) + WallpaperSettingsPanel.IsVisible = tag == "Wallpaper"; + GridSettingsPanel.IsVisible = tag == "Grid"; + ColorSettingsPanel.IsVisible = tag == "Color"; + StatusBarSettingsPanel.IsVisible = tag == "StatusBar"; + WeatherSettingsPanel.IsVisible = tag == "Weather"; + RegionSettingsPanel.IsVisible = tag == "Region"; + UpdateSettingsPanel.IsVisible = tag == "Update"; + AboutSettingsPanel.IsVisible = tag == "About"; + LauncherSettingsPanel.IsVisible = tag == "Launcher"; + PluginSettingsPanel.IsVisible = tag == "Plugins"; + + if (tag == "Launcher") { RenderLauncherHiddenItemsList(); } - if (selectedIndex == 1) + if (tag == "Grid") { UpdateGridPreviewLayout(); } @@ -867,6 +933,105 @@ public partial class MainWindow _appSettingsService.Save(BuildAppSettingsSnapshot()); _desktopLayoutSettingsService.Save(BuildDesktopLayoutSettingsSnapshot()); _launcherSettingsService.Save(BuildLauncherSettingsSnapshot()); + + } + + internal void ReloadFromPersistedSettings() + { + _suppressSettingsPersistence = true; + try + { + var snapshot = _appSettingsService.Load(); + var desktopLayoutSnapshot = _desktopLayoutSettingsService.Load(); + var launcherSnapshot = _launcherSettingsService.Load(); + + if (!string.IsNullOrWhiteSpace(snapshot.TimeZoneId)) + { + _timeZoneService.SetTimeZoneById(snapshot.TimeZoneId); + } + + _targetShortSideCells = Math.Clamp( + snapshot.GridShortSideCells > 0 ? snapshot.GridShortSideCells : CalculateDefaultShortSideCellCountFromDpi(), + MinShortSideCells, + MaxShortSideCells); + + _gridSpacingPreset = NormalizeGridSpacingPreset(snapshot.GridSpacingPreset); + _suppressGridSpacingEvents = true; + GridSpacingPresetComboBox.SelectedIndex = + string.Equals(_gridSpacingPreset, "Compact", StringComparison.OrdinalIgnoreCase) ? 1 : 0; + _suppressGridSpacingEvents = false; + + _desktopEdgeInsetPercent = Math.Clamp(snapshot.DesktopEdgeInsetPercent, MinEdgeInsetPercent, MaxEdgeInsetPercent); + _suppressGridInsetEvents = true; + GridEdgeInsetSlider.Value = _desktopEdgeInsetPercent; + GridEdgeInsetNumberBox.Value = _desktopEdgeInsetPercent; + _suppressGridInsetEvents = false; + + _statusBarSpacingMode = NormalizeStatusBarSpacingMode(snapshot.StatusBarSpacingMode); + _statusBarCustomSpacingPercent = Math.Clamp(snapshot.StatusBarCustomSpacingPercent, 0, 30); + _suppressStatusBarSpacingEvents = true; + StatusBarSpacingModeComboBox.SelectedIndex = _statusBarSpacingMode switch + { + "Compact" => 0, + "Custom" => 2, + _ => 1 + }; + StatusBarSpacingSlider.Value = _statusBarCustomSpacingPercent; + StatusBarSpacingNumberBox.Value = _statusBarCustomSpacingPercent; + StatusBarSpacingCustomPanel.IsVisible = string.Equals(_statusBarSpacingMode, "Custom", StringComparison.OrdinalIgnoreCase); + _suppressStatusBarSpacingEvents = false; + + GridSizeNumberBox.Value = _targetShortSideCells; + GridSizeSlider.Value = _targetShortSideCells; + + if (SettingsNavView.MenuItems.ElementAtOrDefault(Math.Clamp(snapshot.SettingsTabIndex, 0, 9)) is FluentAvalonia.UI.Controls.NavigationViewItem navItem) + { + SettingsNavView.SelectedItem = navItem; + } + + UpdateSettingsTabContent(); + WallpaperPlacementComboBox.SelectedIndex = GetPlacementIndexFromSetting(snapshot.WallpaperPlacement); + _defaultDesktopBackground = DesktopWallpaperLayer.Background; + ApplyTaskbarSettings(snapshot); + InitializeLocalization(snapshot.LanguageCode); + InitializeWeatherSettings(snapshot); + _ = _componentSettingsService.Load(); + InitializeAutoStartWithWindowsSetting(snapshot); + InitializeUpdateSettings(snapshot); + InitializeDesktopSurfaceState(desktopLayoutSnapshot); + InitializeLauncherVisibilitySettings(launcherSnapshot); + InitializeDesktopComponentPlacements(desktopLayoutSnapshot); + InitializeSettingsIcons(); + + TryRestoreWallpaper(snapshot.WallpaperPath); + ApplyWallpaperBrush(); + UpdateWallpaperDisplay(); + + if (TryParseColor(snapshot.ThemeColor, out var savedThemeColor)) + { + _selectedThemeColor = savedThemeColor; + } + + _isNightMode = snapshot.IsNightMode ?? (CalculateCurrentBackgroundLuminance() < LightBackgroundLuminanceThreshold); + ApplyNightModeState(_isNightMode, refreshPalettes: true); + _suppressStatusBarToggleEvents = true; + StatusBarClockToggleSwitch.IsChecked = _topStatusComponentIds.Contains(BuiltInComponentIds.Clock); + _suppressStatusBarToggleEvents = false; + ApplyLocalization(); + ThemeColorStatusTextBlock.Text = Lf("settings.color.theme_ready_format", "Theme color ready: {0}.", _selectedThemeColor); + RebuildDesktopGrid(); + LoadLauncherEntriesAsync(); + InitializeTimeZoneSettings(); + ClockWidget.SetTimeZoneService(_timeZoneService); + UpdateWallpaperPreviewLayout(); + UpdateGridPreviewLayout(); + UpdateAdaptiveTextSystem(); + ApplyTaskbarActionVisibility(GetCurrentTaskbarContext()); + } + finally + { + _suppressSettingsPersistence = false; + } } private AppSettingsSnapshot BuildAppSettingsSnapshot() @@ -880,7 +1045,7 @@ public partial class MainWindow ThemeColor = _selectedThemeColor.ToString(), WallpaperPath = _wallpaperPath, WallpaperPlacement = GetPlacementDisplayName(GetSelectedWallpaperPlacement()), - SettingsTabIndex = Math.Max(0, SettingsNavListBox?.SelectedIndex ?? 0), + SettingsTabIndex = Math.Max(0, GetSettingsTabIndex()), LanguageCode = _languageCode, TimeZoneId = _timeZoneService.CurrentTimeZone.Id, WeatherLocationMode = ToWeatherLocationModeTag(_weatherLocationMode), @@ -1772,7 +1937,7 @@ public partial class MainWindow : CalculateCurrentBackgroundLuminance() >= LightBackgroundLuminanceThreshold; var isLightNavBackground = _isSettingsOpen ? !_isNightMode - : CalculateBrushLuminance(SettingsNavPanelBorder?.Background) >= LightBackgroundLuminanceThreshold; + : CalculateBrushLuminance(SettingsNavView?.Background) >= LightBackgroundLuminanceThreshold; var context = new ThemeColorContext( _selectedThemeColor, isLightBackground, @@ -2306,4 +2471,211 @@ public partial class MainWindow IconVariant = IconVariant.Regular }; } + + // ======================================================================== + // --- UserControl Forwarding Properties (Definitive Catch-All List) --- + // These properties allow legacy code in MainWindow.axaml.cs and other partials + // to access controls that have been moved into independent UserControls. + // ======================================================================== + + // --- WallpaperSettingsPage --- + internal TextBlock WallpaperPanelTitleTextBlock => WallpaperSettingsPanel.FindControl("WallpaperPanelTitleTextBlock")!; + internal TextBlock WallpaperPathTextBlock => WallpaperSettingsPanel.FindControl("WallpaperPathTextBlock")!; + internal TextBlock WallpaperStatusTextBlock => WallpaperSettingsPanel.FindControl("WallpaperStatusTextBlock")!; + internal ComboBox WallpaperPlacementComboBox => WallpaperSettingsPanel.FindControl("WallpaperPlacementComboBox")!; + internal Border WallpaperPreviewHost => WallpaperSettingsPanel.FindControl("WallpaperPreviewHost")!; + internal Border WallpaperPreviewFrame => WallpaperSettingsPanel.FindControl("WallpaperPreviewFrame")!; + internal Border WallpaperPreviewViewport => WallpaperSettingsPanel.FindControl("WallpaperPreviewViewport")!; + internal LibVLCSharp.Avalonia.VideoView? WallpaperPreviewVideoView => WallpaperSettingsPanel.FindControl("WallpaperPreviewVideoView"); + internal Grid WallpaperPreviewGrid => WallpaperSettingsPanel.FindControl("WallpaperPreviewGrid")!; + internal Border WallpaperPreviewTopStatusBarHost => WallpaperSettingsPanel.FindControl("WallpaperPreviewTopStatusBarHost")!; + internal StackPanel WallpaperPreviewTopStatusComponentsPanel => WallpaperSettingsPanel.FindControl("WallpaperPreviewTopStatusComponentsPanel")!; + internal LanMountainDesktop.Views.Components.ClockWidget WallpaperPreviewClockWidget => WallpaperSettingsPanel.FindControl("WallpaperPreviewClockWidget")!; + internal Border WallpaperPreviewBottomTaskbarContainer => WallpaperSettingsPanel.FindControl("WallpaperPreviewBottomTaskbarContainer")!; + internal Border WallpaperPreviewTaskbarFixedActionsHost => WallpaperSettingsPanel.FindControl("WallpaperPreviewTaskbarFixedActionsHost")!; + internal StackPanel WallpaperPreviewBackButtonVisual => WallpaperSettingsPanel.FindControl("WallpaperPreviewBackButtonVisual")!; + internal TextBlock WallpaperPreviewBackButtonTextBlock => WallpaperSettingsPanel.FindControl("WallpaperPreviewBackButtonTextBlock")!; + internal StackPanel WallpaperPreviewTaskbarDynamicActionsHost => WallpaperSettingsPanel.FindControl("WallpaperPreviewTaskbarDynamicActionsHost")!; + internal Border WallpaperPreviewTaskbarSettingsActionHost => WallpaperSettingsPanel.FindControl("WallpaperPreviewTaskbarSettingsActionHost")!; + internal StackPanel WallpaperPreviewComponentLibraryVisual => WallpaperSettingsPanel.FindControl("WallpaperPreviewComponentLibraryVisual")!; + internal TextBlock WallpaperPreviewComponentLibraryTextBlock => WallpaperSettingsPanel.FindControl("WallpaperPreviewComponentLibraryTextBlock")!; + internal FluentIcons.Avalonia.SymbolIcon WallpaperPreviewSettingsButtonIcon => WallpaperSettingsPanel.FindControl("WallpaperPreviewSettingsButtonIcon")!; + internal Button PickWallpaperButton => WallpaperSettingsPanel.FindControl - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LanMountainDesktop/Views/SettingsPages/ColorSettingsPage.axaml.cs b/LanMountainDesktop/Views/SettingsPages/ColorSettingsPage.axaml.cs new file mode 100644 index 0000000..33279a8 --- /dev/null +++ b/LanMountainDesktop/Views/SettingsPages/ColorSettingsPage.axaml.cs @@ -0,0 +1,12 @@ +using Avalonia.Controls; +using Avalonia.Markup.Xaml; + +namespace LanMountainDesktop.Views.SettingsPages; + +public partial class ColorSettingsPage : UserControl +{ + public ColorSettingsPage() + { + InitializeComponent(); + } +} diff --git a/LanMountainDesktop/Views/SettingsPages/GridSettingsPage.axaml b/LanMountainDesktop/Views/SettingsPages/GridSettingsPage.axaml new file mode 100644 index 0000000..283b8dd --- /dev/null +++ b/LanMountainDesktop/Views/SettingsPages/GridSettingsPage.axaml @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +