mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Merge branch 'development'
This commit is contained in:
commit
d5518b8edf
@ -50,7 +50,8 @@ public sealed class Layer : RenderProfileElement
|
|||||||
/// <param name="profile">The profile the layer belongs to</param>
|
/// <param name="profile">The profile the layer belongs to</param>
|
||||||
/// <param name="parent">The parent of the layer</param>
|
/// <param name="parent">The parent of the layer</param>
|
||||||
/// <param name="layerEntity">The entity of the layer</param>
|
/// <param name="layerEntity">The entity of the layer</param>
|
||||||
public Layer(Profile profile, ProfileElement parent, LayerEntity layerEntity) : base(parent, parent.Profile)
|
/// <param name="loadNodeScript">A boolean indicating whether or not to attempt to load the node script straight away</param>
|
||||||
|
public Layer(Profile profile, ProfileElement parent, LayerEntity layerEntity, bool loadNodeScript = false) : base(parent, parent.Profile)
|
||||||
{
|
{
|
||||||
LayerEntity = layerEntity;
|
LayerEntity = layerEntity;
|
||||||
EntityId = layerEntity.Id;
|
EntityId = layerEntity.Id;
|
||||||
@ -62,6 +63,8 @@ public sealed class Layer : RenderProfileElement
|
|||||||
|
|
||||||
Load();
|
Load();
|
||||||
Initialize();
|
Initialize();
|
||||||
|
if (loadNodeScript)
|
||||||
|
LoadNodeScript();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
<AssemblyTitle>Artemis</AssemblyTitle>
|
<AssemblyTitle>Artemis</AssemblyTitle>
|
||||||
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
|
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
|
||||||
<AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>
|
<AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>
|
||||||
|
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AvaloniaResource Include="Assets\**" />
|
<AvaloniaResource Include="Assets\**" />
|
||||||
|
|||||||
@ -8,6 +8,7 @@
|
|||||||
<OutputPath>bin</OutputPath>
|
<OutputPath>bin</OutputPath>
|
||||||
<AssemblyTitle>Artemis</AssemblyTitle>
|
<AssemblyTitle>Artemis</AssemblyTitle>
|
||||||
<AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>
|
<AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>
|
||||||
|
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AvaloniaResource Include="Assets\**" />
|
<AvaloniaResource Include="Assets\**" />
|
||||||
|
|||||||
@ -87,12 +87,12 @@ public class GradientPicker : TemplatedControl
|
|||||||
if (ColorGradient.Count <= 2)
|
if (ColorGradient.Count <= 2)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int index = ColorGradient.IndexOf(s);
|
int index = EditingColorGradient.IndexOf(s);
|
||||||
ColorGradient.Remove(s);
|
EditingColorGradient.Remove(s);
|
||||||
if (index > ColorGradient.Count - 1)
|
if (index > EditingColorGradient.Count - 1)
|
||||||
index--;
|
index--;
|
||||||
|
|
||||||
SelectedColorStop = ColorGradient.ElementAtOrDefault(index);
|
SelectedColorStop = EditingColorGradient.ElementAtOrDefault(index);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -310,12 +310,7 @@ public class GradientPicker : TemplatedControl
|
|||||||
if (e.Key != Key.Delete || SelectedColorStop == null || EditingColorGradient.Count <= 2)
|
if (e.Key != Key.Delete || SelectedColorStop == null || EditingColorGradient.Count <= 2)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int index = EditingColorGradient.IndexOf(SelectedColorStop);
|
DeleteStop.Execute(SelectedColorStop);
|
||||||
EditingColorGradient.Remove(SelectedColorStop);
|
|
||||||
if (index > EditingColorGradient.Count - 1)
|
|
||||||
index--;
|
|
||||||
|
|
||||||
SelectedColorStop = EditingColorGradient.ElementAtOrDefault(index);
|
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,7 @@
|
|||||||
<AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>
|
<AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>
|
||||||
<AssemblyTitle>Artemis</AssemblyTitle>
|
<AssemblyTitle>Artemis</AssemblyTitle>
|
||||||
<ApplicationIcon>..\Artemis.UI\Assets\Images\Logo\application.ico</ApplicationIcon>
|
<ApplicationIcon>..\Artemis.UI\Assets\Images\Logo\application.ico</ApplicationIcon>
|
||||||
|
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AvaloniaResource Include="Assets\**" />
|
<AvaloniaResource Include="Assets\**" />
|
||||||
|
|||||||
@ -55,7 +55,7 @@ public static class ProfileElementExtensions
|
|||||||
return folderClipboardModel.Paste(parent.Profile, parent);
|
return folderClipboardModel.Paste(parent.Profile, parent);
|
||||||
case LayerEntity layerEntity:
|
case LayerEntity layerEntity:
|
||||||
layerEntity.Id = Guid.NewGuid();
|
layerEntity.Id = Guid.NewGuid();
|
||||||
return new Layer(parent.Profile, parent, layerEntity);
|
return new Layer(parent.Profile, parent, layerEntity, true);
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,7 +41,7 @@ public class LayerTreeItemViewModel : TreeItemViewModel
|
|||||||
copy.Id = Guid.NewGuid();
|
copy.Id = Guid.NewGuid();
|
||||||
copy.Name = Layer.Parent.GetNewFolderName(copy.Name + " - copy");
|
copy.Name = Layer.Parent.GetNewFolderName(copy.Name + " - copy");
|
||||||
|
|
||||||
Layer copied = new(Layer.Profile, Layer.Parent, copy);
|
Layer copied = new(Layer.Profile, Layer.Parent, copy, true);
|
||||||
ProfileEditorService.ExecuteCommand(new AddProfileElement(copied, Layer.Parent, Layer.Order - 1));
|
ProfileEditorService.ExecuteCommand(new AddProfileElement(copied, Layer.Parent, Layer.Order - 1));
|
||||||
Layer.Profile.PopulateLeds(_rgbService.EnabledDevices);
|
Layer.Profile.PopulateLeds(_rgbService.EnabledDevices);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -64,7 +64,7 @@ public class ScriptsDialogViewModel : DialogViewModelBase<object?>
|
|||||||
.Subscribe()
|
.Subscribe()
|
||||||
.DisposeWith(d);
|
.DisposeWith(d);
|
||||||
|
|
||||||
_scriptConfigurations = scriptConfigurationViewModels;
|
ScriptConfigurations = scriptConfigurationViewModels;
|
||||||
SelectedScript = ScriptConfigurations.FirstOrDefault();
|
SelectedScript = ScriptConfigurations.FirstOrDefault();
|
||||||
Disposable.Create(() => profileService.SaveProfile(Profile, false)).DisposeWith(d);
|
Disposable.Create(() => profileService.SaveProfile(Profile, false)).DisposeWith(d);
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user