mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Brush presets - Reset properties to default before applying preset
Layer properties - Disable keyframes when resetting to default Device dialogs - Only dim unselected LEDs if a LED is selected Migrations - Renamed to stay in order Migrations - Added migration for color gradients
This commit is contained in:
1 parent
2bc882c814
commit
60df649eb0
22 files changed
+376
-319
No files matched your search
@@ -7,10 +7,12 @@ namespace Artemis.UI.Screens.ProfileEditor.Dialogs
|
||||
{
|
||||
public class LayerBrushPresetViewModel : DialogViewModelBase
|
||||
{
|
||||
private readonly BaseLayerBrush _layerBrush;
|
||||
private ILayerBrushPreset _selectedPreset;
|
||||
|
||||
public LayerBrushPresetViewModel(BaseLayerBrush layerBrush)
|
||||
{
|
||||
_layerBrush = layerBrush;
|
||||
Presets = new BindableCollection<ILayerBrushPreset>();
|
||||
Presets.AddRange(layerBrush.Presets);
|
||||
}
|
||||
@@ -29,6 +31,7 @@ namespace Artemis.UI.Screens.ProfileEditor.Dialogs
|
||||
|
||||
public void SelectPreset(ILayerBrushPreset preset)
|
||||
{
|
||||
_layerBrush.BaseProperties?.ResetAllLayerProperties();
|
||||
preset.Apply();
|
||||
Execute.OnUIThreadAsync(async () =>
|
||||
{
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.Tree
|
||||
|
||||
public void ResetToDefault()
|
||||
{
|
||||
LayerProperty.ApplyDefaultValue(_profileEditorService.CurrentTime);
|
||||
LayerProperty.ApplyDefaultValue();
|
||||
_profileEditorService.UpdateSelectedProfileElement();
|
||||
}
|
||||
|
||||
|
||||
@@ -321,7 +321,8 @@ namespace Artemis.UI.Screens.ProfileEditor.Visualization
|
||||
dataBindingRegistration.GetDataBinding()?.UpdateWithDelta(delta);
|
||||
|
||||
// TODO: Only update when there are data bindings
|
||||
_profileEditorService.UpdateProfilePreview();
|
||||
if (!_profileEditorService.Playing)
|
||||
_profileEditorService.UpdateProfilePreview();
|
||||
}
|
||||
|
||||
private void HighlightSelectedLayerOnSettingChanged(object sender, EventArgs e)
|
||||
|
||||
@@ -94,7 +94,7 @@ namespace Artemis.UI.Screens.Settings.Device
|
||||
|
||||
private void CoreServiceOnFrameRendering(object sender, FrameRenderingEventArgs e)
|
||||
{
|
||||
if (SelectedLeds == null)
|
||||
if (SelectedLeds == null || !SelectedLeds.Any())
|
||||
return;
|
||||
|
||||
using SKPaint highlightPaint = new() {Color = SKColors.White};
|
||||
|
||||
@@ -25,5 +25,23 @@ namespace Artemis.UI.Screens.StartupWizard.Steps
|
||||
StartupWizardViewModel startupWizardViewModel = (StartupWizardViewModel) Parent;
|
||||
startupWizardViewModel.Continue();
|
||||
}
|
||||
|
||||
#region Overrides of Screen
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void OnActivate()
|
||||
{
|
||||
_rgbService.IsRenderPaused = true;
|
||||
base.OnActivate();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void OnDeactivate()
|
||||
{
|
||||
_rgbService.IsRenderPaused = false;
|
||||
base.OnDeactivate();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user