Browse Source

Devided everyting into subclasses

CPKreuz 1 year ago
parent
commit
442beacc30

+ 2 - 2
src/PixiEditor.AvaloniaUI/Models/Palettes/LocalPalettesFetcher.cs

@@ -39,9 +39,9 @@ internal class LocalPalettesFetcher : PaletteListDataSource
         watcher.Created += FileSystemChanged;
 
         watcher.EnableRaisingEvents = true;
-        cachedFavoritePalettes = PixiEditorSettings.FavouritePalettes.AsList();
+        cachedFavoritePalettes = PixiEditorSettings.Palettes.FavouritePalettes.AsList();
 
-        PixiEditorSettings.FavouritePalettes.AddListCallback(updated =>
+        PixiEditorSettings.Palettes.FavouritePalettes.AddListCallback(updated =>
         {
             cachedFavoritePalettes = updated;
             cachedPalettes.ForEach(x => x.IsFavourite = cachedFavoritePalettes.Contains(x.Name));

+ 2 - 2
src/PixiEditor.AvaloniaUI/Models/Services/NewsFeed/NewsProvider.cs

@@ -18,7 +18,7 @@ internal class NewsProvider
 
     public NewsProvider()
     {
-        _lastCheckedIds = PixiEditorSettings.LastCheckedNewsIds.AsList();
+        _lastCheckedIds = PixiEditorSettings.StartupWindow.LastCheckedNewsIds.AsList();
     }
 
     public async Task<List<News>?> FetchNewsAsync()
@@ -60,6 +60,6 @@ internal class NewsProvider
             }
         }
 
-        PixiEditorSettings.LastCheckedNewsIds.Value = _lastCheckedIds;
+        PixiEditorSettings.StartupWindow.LastCheckedNewsIds.Value = _lastCheckedIds;
     }
 }

+ 3 - 3
src/PixiEditor.AvaloniaUI/ViewModels/SubViewModels/DebugViewModel.cs

@@ -71,8 +71,8 @@ internal class DebugViewModel : SubViewModel<ViewModelMain>
         : base(owner)
     {
         SetDebug();
-        PixiEditorSettings.IsDebugModeEnabled.ValueChanged += UpdateDebugMode;
-        UpdateDebugMode(null, PixiEditorSettings.IsDebugModeEnabled.Value);
+        PixiEditorSettings.Debug.IsDebugModeEnabled.ValueChanged += UpdateDebugMode;
+        UpdateDebugMode(null, PixiEditorSettings.Debug.IsDebugModeEnabled.Value);
     }
 
     public static void OpenFolder(string path)
@@ -218,7 +218,7 @@ internal class DebugViewModel : SubViewModel<ViewModelMain>
     public void ClearRecentDocuments()
     {
         Owner.FileSubViewModel.RecentlyOpened.Clear();
-        PixiEditorSettings.RecentlyOpened.Value = [];
+        PixiEditorSettings.File.RecentlyOpened.Value = [];
     }
 
     [Command.Debug("PixiEditor.Debug.OpenCommandDebugWindow", "OPEN_CMD_DEBUG_WINDOW", "OPEN_CMD_DEBUG_WINDOW",

+ 6 - 6
src/PixiEditor.AvaloniaUI/ViewModels/SubViewModels/DiscordViewModel.cs

@@ -38,8 +38,8 @@ internal class DiscordViewModel : SubViewModel<ViewModelMain>, IDisposable
         Owner.DocumentManagerSubViewModel.ActiveDocumentChanged += DocumentChanged;
         this.clientId = clientId;
 
-        Enabled = PixiEditorSettings.EnableRichPresence.Value;
-        PixiEditorSettings.EnableRichPresence.ValueChanged += (_, value) => Enabled = value;
+        Enabled = PixiEditorSettings.Discord.EnableRichPresence.Value;
+        PixiEditorSettings.Discord.EnableRichPresence.ValueChanged += (_, value) => Enabled = value;
         AppDomain.CurrentDomain.ProcessExit += (_, _) => Enabled = false;
     }
 
@@ -70,22 +70,22 @@ internal class DiscordViewModel : SubViewModel<ViewModelMain>, IDisposable
         {
             richPresence.WithTimestamps(new Timestamps(document.OpenedUTC));
 
-            richPresence.Details = PixiEditorSettings.ShowDocumentName.Value
+            richPresence.Details = PixiEditorSettings.Discord.ShowDocumentName.Value
                 ? $"Editing {document.FileName.Limit(128)}" : "Editing an image";
 
             string state = string.Empty;
 
-            if (PixiEditorSettings.ShowDocumentSize.Value)
+            if (PixiEditorSettings.Discord.ShowDocumentSize.Value)
             {
                 state = $"{document.Width}x{document.Height}";
             }
 
-            if (PixiEditorSettings.ShowDocumentSize.Value && PixiEditorSettings.ShowLayerCount.Value)
+            if (PixiEditorSettings.Discord.ShowDocumentSize.Value && PixiEditorSettings.Discord.ShowLayerCount.Value)
             {
                 state += ", ";
             }
 
-            if (PixiEditorSettings.ShowLayerCount.Value)
+            if (PixiEditorSettings.Discord.ShowLayerCount.Value)
             {
                 int count = CountLayers(document.StructureRoot);
                 state += count == 1 ? "1 layer" : $"{count} layers";

+ 7 - 7
src/PixiEditor.AvaloniaUI/ViewModels/SubViewModels/FileViewModel.cs

@@ -57,7 +57,7 @@ internal class FileViewModel : SubViewModel<ViewModelMain>
             HasRecent = true;
         }
 
-        PixiEditorSettings.MaxOpenedRecently.ValueChanged += (_, value) => UpdateMaxRecentlyOpened(value);
+        PixiEditorSettings.File.MaxOpenedRecently.ValueChanged += (_, value) => UpdateMaxRecentlyOpened(value);
     }
 
     public void AddRecentlyOpened(string path)
@@ -71,14 +71,14 @@ internal class FileViewModel : SubViewModel<ViewModelMain>
             RecentlyOpened.Insert(0, path);
         }
 
-        int maxCount = PixiEditorSettings.MaxOpenedRecently.Value;
+        int maxCount = PixiEditorSettings.File.MaxOpenedRecently.Value;
 
         while (RecentlyOpened.Count > maxCount)
         {
             RecentlyOpened.RemoveAt(RecentlyOpened.Count - 1);
         }
 
-        PixiEditorSettings.RecentlyOpened.Value = RecentlyOpened.Select(x => x.FilePath);
+        PixiEditorSettings.File.RecentlyOpened.Value = RecentlyOpened.Select(x => x.FilePath);
     }
 
     [Command.Internal("PixiEditor.File.RemoveRecent")]
@@ -90,7 +90,7 @@ internal class FileViewModel : SubViewModel<ViewModelMain>
         }
 
         RecentlyOpened.Remove(path);
-        PixiEditorSettings.RecentlyOpened.Value = RecentlyOpened.Select(x => x.FilePath);
+        PixiEditorSettings.File.RecentlyOpened.Value = RecentlyOpened.Select(x => x.FilePath);
     }
 
     private void OpenHelloTherePopup()
@@ -108,7 +108,7 @@ internal class FileViewModel : SubViewModel<ViewModelMain>
         }
         else if ((Owner.DocumentManagerSubViewModel.Documents.Count == 0 && !args.Contains("--crash")) && !args.Contains("--openedInExisting"))
         {
-            if (PixiEditorSettings.ShowStartupWindow.Value)
+            if (PixiEditorSettings.StartupWindow.ShowStartupWindow.Value)
             {
                 OpenHelloTherePopup();
             }
@@ -123,7 +123,7 @@ internal class FileViewModel : SubViewModel<ViewModelMain>
         {
             NoticeDialog.Show("FILE_NOT_FOUND", "FAILED_TO_OPEN_FILE");
             RecentlyOpened.Remove(path);
-            PixiEditorSettings.RecentlyOpened.Value = RecentlyOpened.Select(x => x.FilePath);
+            PixiEditorSettings.File.RecentlyOpened.Value = RecentlyOpened.Select(x => x.FilePath);
             return;
         }
 
@@ -418,7 +418,7 @@ internal class FileViewModel : SubViewModel<ViewModelMain>
 
     private List<RecentlyOpenedDocument> GetRecentlyOpenedDocuments()
     {
-        var paths = PixiEditorSettings.RecentlyOpened.Value.Take(PixiEditorSettings.MaxOpenedRecently.Value);
+        var paths = PixiEditorSettings.File.RecentlyOpened.Value.Take(PixiEditorSettings.File.MaxOpenedRecently.Value);
         List<RecentlyOpenedDocument> documents = new List<RecentlyOpenedDocument>();
 
         foreach (string path in paths)

+ 2 - 2
src/PixiEditor.AvaloniaUI/ViewModels/SubViewModels/StylusViewModel.cs

@@ -23,7 +23,7 @@ internal class StylusViewModel : SubViewModel<ViewModelMain>
         {
             if (SetProperty(ref isPenModeEnabled, value))
             {
-                PixiEditorSettings.IsPenModeEnabled.Value = value;
+                PixiEditorSettings.Tools.IsPenModeEnabled.Value = value;
                 UpdateUseTouchGesture();
             }
         }
@@ -40,7 +40,7 @@ internal class StylusViewModel : SubViewModel<ViewModelMain>
     public StylusViewModel(ViewModelMain owner)
         : base(owner)
     {
-        isPenModeEnabled = PixiEditorSettings.IsPenModeEnabled.Value;
+        isPenModeEnabled = PixiEditorSettings.Tools.IsPenModeEnabled.Value;
         Owner.ToolsSubViewModel.AddPropertyChangedCallback(nameof(ToolsViewModel.ActiveTool), UpdateUseTouchGesture);
 
         UpdateUseTouchGesture();

+ 4 - 4
src/PixiEditor.AvaloniaUI/ViewModels/SubViewModels/ToolsViewModel.cs

@@ -22,7 +22,7 @@ namespace PixiEditor.AvaloniaUI.ViewModels.SubViewModels;
 [Command.Group("PixiEditor.Tools", "TOOLS")]
 internal class ToolsViewModel : SubViewModel<ViewModelMain>, IToolsHandler
 {
-    private RightClickMode rightClickMode = PixiEditorSettings.RightClickMode.As<RightClickMode>();
+    private RightClickMode rightClickMode = PixiEditorSettings.Tools.RightClickMode.As<RightClickMode>();
     public ZoomToolViewModel? ZoomTool => GetTool<ZoomToolViewModel>();
 
     public IToolHandler? LastActionTool { get; private set; }
@@ -34,14 +34,14 @@ internal class ToolsViewModel : SubViewModel<ViewModelMain>, IToolsHandler
         {
             if (SetProperty(ref rightClickMode, value))
             {
-                PixiEditorSettings.RightClickMode.Value = value;
+                PixiEditorSettings.Tools.RightClickMode.Value = value;
             }
         }
     }
 
     public bool EnableSharedToolbar
     {
-        get => PixiEditorSettings.EnableSharedToolbar.Value;
+        get => PixiEditorSettings.Tools.EnableSharedToolbar.Value;
         set
         {
             if (EnableSharedToolbar == value)
@@ -49,7 +49,7 @@ internal class ToolsViewModel : SubViewModel<ViewModelMain>, IToolsHandler
                 return;
             }
 
-            PixiEditorSettings.EnableSharedToolbar.Value = value;
+            PixiEditorSettings.Tools.EnableSharedToolbar.Value = value;
             OnPropertyChanged(nameof(EnableSharedToolbar));
         }
     }

+ 3 - 3
src/PixiEditor.AvaloniaUI/ViewModels/SubViewModels/UpdateViewModel.cs

@@ -55,7 +55,7 @@ internal class UpdateViewModel : SubViewModel<ViewModelMain>
         : base(owner)
     {
         Owner.OnStartupEvent += Owner_OnStartupEvent;
-        PixiEditorSettings.UpdateChannel.ValueChanged += (_, value) =>
+        PixiEditorSettings.Update.UpdateChannel.ValueChanged += (_, value) =>
         {
             string prevChannel = UpdateChecker.Channel.ApiUrl;
             UpdateChecker.Channel = GetUpdateChannel(value);
@@ -217,7 +217,7 @@ internal class UpdateViewModel : SubViewModel<ViewModelMain>
     [Conditional("UPDATE")]
     private async void ConditionalUPDATE()
     {
-        if (PixiEditorSettings.CheckUpdatesOnStartup.Value)
+        if (PixiEditorSettings.Update.CheckUpdatesOnStartup.Value)
         {
             try
             {
@@ -247,7 +247,7 @@ internal class UpdateViewModel : SubViewModel<ViewModelMain>
         UpdateChannels.Add(new UpdateChannel(platformName, "", ""));
 #endif
 
-        string updateChannel = PixiEditorSettings.UpdateChannel.Value;
+        string updateChannel = PixiEditorSettings.Update.UpdateChannel.Value;
 
         string version = VersionHelpers.GetCurrentAssemblyVersionString();
         UpdateChecker = new UpdateChecker(version, GetUpdateChannel(updateChannel));

+ 1 - 1
src/PixiEditor.AvaloniaUI/ViewModels/Tools/Tools/PenToolViewModel.cs

@@ -58,7 +58,7 @@ namespace PixiEditor.AvaloniaUI.ViewModels.Tools.Tools
                 setting.Value = 1;
             }
             
-            if (!PixiEditorSettings.EnableSharedToolbar.Value)
+            if (!PixiEditorSettings.Tools.EnableSharedToolbar.Value)
             {
                 return;
             }

+ 2 - 2
src/PixiEditor.AvaloniaUI/Views/Dialogs/Debugging/Localization/LocalizationDataContext.cs

@@ -40,7 +40,7 @@ internal class LocalizationDataContext : PixiObservableObject
         {
             if (SetProperty(ref apiKey, value))
             {
-                PixiEditorSettings.PoEditorApiKey.Value = value;
+                PixiEditorSettings.Debug.PoEditorApiKey.Value = value;
             }
         }
     }
@@ -76,7 +76,7 @@ internal class LocalizationDataContext : PixiObservableObject
     public LocalizationDataContext()
     {
         dispatcher = Dispatcher.UIThread;
-        apiKey = PixiEditorSettings.PoEditorApiKey.Value;
+        apiKey = PixiEditorSettings.Debug.PoEditorApiKey.Value;
         LoadApiKeyCommand = new RelayCommand(LoadApiKey, () => !string.IsNullOrWhiteSpace(apiKey));
         ApplyLanguageCommand =
             new RelayCommand(ApplyLanguage, () => loggedIn && SelectedLanguage != null);

+ 2 - 2
src/PixiEditor.AvaloniaUI/Views/Dialogs/NewFileDialog.cs

@@ -8,9 +8,9 @@ namespace PixiEditor.AvaloniaUI.Views.Dialogs;
 
 internal class NewFileDialog : CustomDialog
 {
-    private int width = PixiEditorSettings.DefaultNewFileWidth.Value;
+    private int width = PixiEditorSettings.File.DefaultNewFileWidth.Value;
     
-    private int height = PixiEditorSettings.DefaultNewFileHeight.Value;
+    private int height = PixiEditorSettings.File.DefaultNewFileHeight.Value;
 
     public int Width
     {

+ 3 - 3
src/PixiEditor.AvaloniaUI/Views/Windows/HelloTherePopup.axaml.cs

@@ -106,7 +106,7 @@ internal partial class HelloTherePopup : PixiEditorPopup
         RecentlyOpenedEmpty = RecentlyOpened.Count == 0;
         RecentlyOpened.CollectionChanged += RecentlyOpened_CollectionChanged;
 
-        _newsDisabled = PixiEditorSettings.DisableNewsPanel.Value;
+        _newsDisabled = PixiEditorSettings.StartupWindow.DisableNewsPanel.Value;
 
         NewsProvider = new NewsProvider();
 
@@ -116,7 +116,7 @@ internal partial class HelloTherePopup : PixiEditorPopup
 
         int newsWidth = 300;
 
-        NewsPanelCollapsed = PixiEditorSettings.NewsPanelCollapsed.Value;
+        NewsPanelCollapsed = PixiEditorSettings.StartupWindow.NewsPanelCollapsed.Value;
 
         if (_newsDisabled || NewsPanelCollapsed)
         {
@@ -159,7 +159,7 @@ internal partial class HelloTherePopup : PixiEditorPopup
             Enumerable.Last<ColumnDefinition>(helloTherePopup.grid.ColumnDefinitions).Width = new GridLength(300);
         }
 
-        PixiEditorSettings.NewsPanelCollapsed.Value = e.NewValue.Value;
+        PixiEditorSettings.StartupWindow.NewsPanelCollapsed.Value = e.NewValue.Value;
     }
 
     private void RecentlyOpened_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)

+ 11 - 11
src/PixiEditor.AvaloniaUI/Views/Windows/PalettesBrowser.axaml.cs

@@ -151,7 +151,7 @@ internal partial class PalettesBrowser : PixiEditorPopup, IPopupWindow
 
     public FilteringSettings Filtering => filteringSettings ??=
         new FilteringSettings(ColorsNumberMode, ColorsNumber, NameFilter, ShowOnlyFavourites,
-            PixiEditorSettings.FavouritePalettes.AsList());
+            PixiEditorSettings.Palettes.FavouritePalettes.AsList());
 
     private char[] separators = new char[] { ' ', ',' };
 
@@ -208,7 +208,7 @@ internal partial class PalettesBrowser : PixiEditorPopup, IPopupWindow
             LocalPalettesFetcher.CacheUpdated -= LocalCacheRefreshed;
         };
 
-        PixiEditorSettings.FavouritePalettes.ValueChanged += OnFavouritePalettesChanged;
+        PixiEditorSettings.Palettes.FavouritePalettes.ValueChanged += OnFavouritePalettesChanged;
     }
 
     public async Task<bool?> ShowDialog()
@@ -248,7 +248,7 @@ internal partial class PalettesBrowser : PixiEditorPopup, IPopupWindow
 
     private void OnFavouritePalettesChanged(Setting<IEnumerable<string>> setting, IEnumerable<string> value)
     {
-        Filtering.Favourites = PixiEditorSettings.FavouritePalettes.AsList();
+        Filtering.Favourites = PixiEditorSettings.Palettes.FavouritePalettes.AsList();
     }
 
     public static PalettesBrowser Open()
@@ -353,7 +353,7 @@ internal partial class PalettesBrowser : PixiEditorPopup, IPopupWindow
     private async void ToggleFavourite(Palette palette)
     {
         palette.IsFavourite = !palette.IsFavourite;
-        var favouritePalettes = PixiEditorSettings.FavouritePalettes.AsList();
+        var favouritePalettes = PixiEditorSettings.Palettes.FavouritePalettes.AsList();
 
         if (palette.IsFavourite && !favouritePalettes.Contains(palette.Name))
         {
@@ -364,13 +364,13 @@ internal partial class PalettesBrowser : PixiEditorPopup, IPopupWindow
             favouritePalettes.RemoveAll(x => x == palette.Name);
         }
 
-        PixiEditorSettings.FavouritePalettes.Value = favouritePalettes;
+        PixiEditorSettings.Palettes.FavouritePalettes.Value = favouritePalettes;
         await UpdatePaletteList();
     }
 
     private bool IsPaletteFavourite(string name)
     {
-        var favouritePalettes = PixiEditorSettings.FavouritePalettes.AsList();
+        var favouritePalettes = PixiEditorSettings.Palettes.FavouritePalettes.AsList();
         return favouritePalettes.Contains(name);
     }
 
@@ -391,11 +391,11 @@ internal partial class PalettesBrowser : PixiEditorPopup, IPopupWindow
 
     private static void RemoveFavouritePalette(Palette palette)
     {
-        var favouritePalettes = PixiEditorSettings.FavouritePalettes.AsList();
+        var favouritePalettes = PixiEditorSettings.Palettes.FavouritePalettes.AsList();
         if (favouritePalettes.Contains(palette.Name))
         {
             favouritePalettes.Remove(palette.Name);
-            PixiEditorSettings.FavouritePalettes.Value = favouritePalettes;
+            PixiEditorSettings.Palettes.FavouritePalettes.Value = favouritePalettes;
         }
     }
 
@@ -628,7 +628,7 @@ internal partial class PalettesBrowser : PixiEditorPopup, IPopupWindow
 
     private static void UpdateRenamedFavourite(string old, string newName)
     {
-        var favourites = PixiEditorSettings.FavouritePalettes.AsList();
+        var favourites = PixiEditorSettings.Palettes.FavouritePalettes.AsList();
 
         if (favourites.Contains(old))
         {
@@ -636,7 +636,7 @@ internal partial class PalettesBrowser : PixiEditorPopup, IPopupWindow
             favourites.Add(newName);
         }
 
-        PixiEditorSettings.FavouritePalettes.Value = favourites;
+        PixiEditorSettings.Palettes.FavouritePalettes.Value = favourites;
     }
 
     private void BrowseOnLospec_OnClick(object sender, RoutedEventArgs e)
@@ -678,6 +678,6 @@ internal partial class PalettesBrowser : PixiEditorPopup, IPopupWindow
     protected override void OnClosing(WindowClosingEventArgs e)
     {
         base.OnClosing(e);
-        PixiEditorSettings.FavouritePalettes.ValueChanged -= OnFavouritePalettesChanged;
+        PixiEditorSettings.Palettes.FavouritePalettes.ValueChanged -= OnFavouritePalettesChanged;
     }
 }

+ 49 - 39
src/PixiEditor.Extensions.CommonApi/UserPreferences/Settings/PixiEditorSettings.cs

@@ -2,56 +2,66 @@
 
 public static class PixiEditorSettings
 {
-    // TODO: Subdivide this into different classes
-    
-    public static LocalSetting<IEnumerable<string>> FavouritePalettes { get; } = new(nameof(FavouritePalettes));
-    
-    public static LocalSetting<IEnumerable<string>> RecentlyOpened { get; } = new(nameof(RecentlyOpened));
-    public static SyncedSetting<int> MaxOpenedRecently { get; } = new(nameof(MaxOpenedRecently), 8);
+    public class Palettes
+    {
+        public static LocalSetting<IEnumerable<string>> FavouritePalettes { get; } = new(nameof(FavouritePalettes));
+    }
 
-    public static SyncedSetting<bool> ShowStartupWindow { get; } = new(nameof(ShowStartupWindow), true);
+    public class Update
+    {
+        public static SyncedSetting<bool> CheckUpdatesOnStartup { get; } = new(nameof(CheckUpdatesOnStartup), true);
 
-    public static SyncedSetting<bool> DisableNewsPanel { get; } = new(nameof(DisableNewsPanel));
-    public static SyncedSetting<bool> NewsPanelCollapsed { get; } = new(nameof(NewsPanelCollapsed));
+        public static SyncedSetting<string> UpdateChannel { get; } = new(nameof(UpdateChannel));
+    }
 
-    public static SyncedSetting<int> DefaultNewFileWidth { get; } = new(nameof(DefaultNewFileWidth), 64);
+    public class Debug
+    {
+        public static SyncedSetting<bool> IsDebugModeEnabled { get; } = new(nameof(IsDebugModeEnabled));
 
-    public static SyncedSetting<int> DefaultNewFileHeight { get; } = new(nameof(DefaultNewFileHeight));
+        public static LocalSetting<string> PoEditorApiKey { get; } = new("POEditor_API_Key");
+    }
     
-    public static SyncedSetting<IEnumerable<int>> LastCheckedNewsIds { get; } = new(nameof(LastCheckedNewsIds));
+    public class Tools
+    {
+        public static SyncedSetting<bool> EnableSharedToolbar { get; } = new(nameof(EnableSharedToolbar));
+
+        // TODO: Use RightClickMode
+        public static SyncedSetting<object> RightClickMode { get; } = new(nameof(RightClickMode));
+        
+        public static SyncedSetting<bool> IsPenModeEnabled { get; } = new(nameof(IsPenModeEnabled));
+    }
+
+    public class File
+    {
+        public static SyncedSetting<int> DefaultNewFileWidth { get; } = new(nameof(DefaultNewFileWidth), 64);
+
+        public static SyncedSetting<int> DefaultNewFileHeight { get; } = new(nameof(DefaultNewFileHeight), 64);
+        
+        public static LocalSetting<IEnumerable<string>> RecentlyOpened { get; } = new(nameof(RecentlyOpened));
     
-    // Update
-
-    public static SyncedSetting<bool> CheckUpdatesOnStartup { get; } = new(nameof(CheckUpdatesOnStartup), true);
-
-    public static SyncedSetting<string> UpdateChannel { get; } = new(nameof(UpdateChannel));
-
-    // Local
-
-    public static LocalSetting<string> PoEditorApiKey { get; } = new("POEditor_API_Key");
-
-    // Discord
-
-    public static SyncedSetting<bool> EnableRichPresence { get; } = new(nameof(EnableRichPresence));
-
-    public static SyncedSetting<bool> ShowDocumentName { get; } = new(nameof(ShowDocumentName));
-
-    public static SyncedSetting<bool> ShowDocumentSize { get; } = new(nameof(ShowDocumentSize), true);
+        public static SyncedSetting<int> MaxOpenedRecently { get; } = new(nameof(MaxOpenedRecently), 8);
+    }
     
-    public static SyncedSetting<bool> ShowLayerCount { get; } = new(nameof(ShowLayerCount), true);
+    public class StartupWindow
+    {
+        public static SyncedSetting<bool> ShowStartupWindow { get; } = new(nameof(ShowStartupWindow), true);
+
+        public static SyncedSetting<bool> DisableNewsPanel { get; } = new(nameof(DisableNewsPanel));
     
-    // Tools
+        public static SyncedSetting<bool> NewsPanelCollapsed { get; } = new(nameof(NewsPanelCollapsed));
 
-    public static SyncedSetting<bool> EnableSharedToolbar { get; } = new(nameof(EnableSharedToolbar));
+        public static SyncedSetting<IEnumerable<int>> LastCheckedNewsIds { get; } = new(nameof(LastCheckedNewsIds));
+    }
     
-    // TODO: Use RightClickMode
-    public static SyncedSetting<object> RightClickMode { get; } = new(nameof(RightClickMode));
     
-    // Debug
+    public class Discord
+    {
+        public static SyncedSetting<bool> EnableRichPresence { get; } = new(nameof(EnableRichPresence));
 
-    public static SyncedSetting<bool> IsDebugModeEnabled { get; } = new(nameof(IsDebugModeEnabled));
-    
-    // Pen
+        public static SyncedSetting<bool> ShowDocumentName { get; } = new(nameof(ShowDocumentName));
+
+        public static SyncedSetting<bool> ShowDocumentSize { get; } = new(nameof(ShowDocumentSize), true);
 
-    public static SyncedSetting<bool> IsPenModeEnabled { get; } = new(nameof(IsPenModeEnabled));
+        public static SyncedSetting<bool> ShowLayerCount { get; } = new(nameof(ShowLayerCount), true);
+    }
 }