mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 11:26:27 +00:00
Meta - Fixed a bunch of build warnings
This commit is contained in:
1 parent
6921561317
commit
1bd4efbbc5
27 files changed
+199
-149
No files matched your search
+1
-1
@@ -11,7 +11,7 @@ namespace Artemis.UI.Screens.ProfileEditor.ProfileTree.Dialogs.AdaptionHints;
|
||||
|
||||
public partial class SingleLedAdaptionHintViewModel : AdaptionHintViewModelBase
|
||||
{
|
||||
[Notify] private List<AdaptionLed> _adaptionLeds;
|
||||
[Notify] private List<AdaptionLed> _adaptionLeds = new();
|
||||
[Notify] private AdaptionLed? _selectedLed;
|
||||
|
||||
public SingleLedAdaptionHintViewModel(Layer layer, SingleLedAdaptionHint adaptionHint) : base(layer, adaptionHint)
|
||||
|
||||
@@ -5,7 +5,6 @@ using Avalonia.Input;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Layout;
|
||||
using Avalonia.LogicalTree;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Media;
|
||||
using Avalonia.Media.Imaging;
|
||||
using Avalonia.ReactiveUI;
|
||||
@@ -40,7 +39,8 @@ public partial class ProfileTreeView : ReactiveUserControl<ProfileTreeViewModel>
|
||||
|
||||
private void CreateDragAdorner(DragEventArgs e)
|
||||
{
|
||||
if (_dragAdorner != null)
|
||||
Window? window = this.FindAncestorOfType<Window>();
|
||||
if (window == null || _dragAdorner != null)
|
||||
return;
|
||||
|
||||
if (e.Source is not Control c)
|
||||
@@ -55,7 +55,7 @@ public partial class ProfileTreeView : ReactiveUserControl<ProfileTreeViewModel>
|
||||
ITransform? originalTransform = container.RenderTransform;
|
||||
try
|
||||
{
|
||||
_dragStartPosition = e.GetPosition(this.FindAncestorOfType<Window>());
|
||||
_dragStartPosition = e.GetPosition(window);
|
||||
_elementDragOffset = e.GetPosition(container);
|
||||
|
||||
RenderTargetBitmap renderTarget = new(new PixelSize((int) container.Bounds.Width, (int) container.Bounds.Height));
|
||||
@@ -106,10 +106,11 @@ public partial class ProfileTreeView : ReactiveUserControl<ProfileTreeViewModel>
|
||||
|
||||
private void UpdateDragAdorner(DragEventArgs e)
|
||||
{
|
||||
if (_dragAdorner == null)
|
||||
Window? window = this.FindAncestorOfType<Window>();
|
||||
if (window == null || _dragAdorner == null)
|
||||
return;
|
||||
|
||||
Point position = e.GetPosition(this.FindAncestorOfType<Window>());
|
||||
Point position = e.GetPosition(window);
|
||||
_dragAdorner.RenderTransform = new TranslateTransform(_dragStartPosition.X - _elementDragOffset.X, position.Y - _elementDragOffset.Y);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user