mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Core - Reworked profile render override for the editor and new previewer
This commit is contained in:
1 parent
c6a318b6e3
commit
d2b8123a30
42 files changed
+812
-399
No files matched your search
@@ -16,7 +16,6 @@ using Artemis.UI.Shared.Services;
|
||||
using Artemis.UI.Shared.Services.ProfileEditor;
|
||||
using Newtonsoft.Json;
|
||||
using ReactiveUI;
|
||||
using Serilog;
|
||||
|
||||
namespace Artemis.UI.Screens.ProfileEditor.MenuBar;
|
||||
|
||||
@@ -182,7 +181,7 @@ public class MenuBarViewModel : ActivatableViewModelBase
|
||||
if (!await _windowService.ShowConfirmContentDialog("Delete profile", "Are you sure you want to permanently delete this profile?"))
|
||||
return;
|
||||
|
||||
if (ProfileConfiguration.IsBeingEdited)
|
||||
if (_profileService.FocusProfile == ProfileConfiguration)
|
||||
await _router.Navigate("home");
|
||||
_profileService.RemoveProfileConfiguration(ProfileConfiguration);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Reactive.Disposables;
|
||||
using System.Reactive.Linq;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls.PanAndZoom;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Media;
|
||||
using Avalonia.ReactiveUI;
|
||||
using Avalonia.Threading;
|
||||
@@ -19,7 +19,7 @@ public partial class VisualEditorView : ReactiveUserControl<VisualEditorViewMode
|
||||
public VisualEditorView()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
|
||||
ZoomBorder.PropertyChanged += ZoomBorderOnPropertyChanged;
|
||||
ZoomBorder.PointerMoved += ZoomBorderOnPointerMoved;
|
||||
ZoomBorder.PointerWheelChanged += ZoomBorderOnPointerWheelChanged;
|
||||
@@ -31,11 +31,7 @@ public partial class VisualEditorView : ReactiveUserControl<VisualEditorViewMode
|
||||
Disposable.Create(() => ViewModel.AutoFitRequested -= ViewModelOnAutoFitRequested).DisposeWith(d);
|
||||
});
|
||||
|
||||
this.WhenAnyValue(v => v.Bounds).Subscribe(_ =>
|
||||
{
|
||||
if (!_movedByUser)
|
||||
AutoFit(true);
|
||||
});
|
||||
this.WhenAnyValue(v => v.Bounds).Where(_ => !_movedByUser).Subscribe(_ => AutoFit(true));
|
||||
}
|
||||
|
||||
private void ZoomBorderOnPointerWheelChanged(object? sender, PointerWheelEventArgs e)
|
||||
|
||||
Reference in new issue
Block a user