mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 20:06:33 +00:00
UI - Restructured resources directory
UI - Fixed a few memory leaks
This commit is contained in:
1 parent
8b95243a7c
commit
2b66ba656b
41 files changed
+215
-123
No files matched your search
@@ -52,14 +52,11 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization
|
||||
PanZoomViewModel = new PanZoomViewModel {LimitToZero = false};
|
||||
});
|
||||
|
||||
ApplySurfaceConfiguration(surfaceService.ActiveSurface);
|
||||
ApplySurfaceConfiguration(_surfaceService.ActiveSurface);
|
||||
ApplyActiveProfile();
|
||||
CreateUpdateTrigger();
|
||||
ActivateToolByIndex(0);
|
||||
|
||||
_profileEditorService.ProfileSelected += OnProfileSelected;
|
||||
_profileEditorService.ProfileElementSelected += OnProfileElementSelected;
|
||||
_profileEditorService.SelectedProfileElementUpdated += OnSelectedProfileElementUpdated;
|
||||
eventAggregator.Subscribe(this);
|
||||
}
|
||||
|
||||
@@ -120,6 +117,10 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization
|
||||
PauseRenderingOnFocusLoss = _settingsService.GetSetting("ProfileEditor.PauseRenderingOnFocusLoss", true);
|
||||
|
||||
HighlightSelectedLayer.SettingChanged += HighlightSelectedLayerOnSettingChanged;
|
||||
_surfaceService.ActiveSurfaceConfigurationSelected += OnActiveSurfaceConfigurationSelected;
|
||||
_profileEditorService.ProfileSelected += OnProfileSelected;
|
||||
_profileEditorService.ProfileElementSelected += OnProfileElementSelected;
|
||||
_profileEditorService.SelectedProfileElementUpdated += OnSelectedProfileElementUpdated;
|
||||
|
||||
_updateTrigger.Start();
|
||||
base.OnInitialActivate();
|
||||
@@ -127,6 +128,12 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
HighlightSelectedLayer.SettingChanged -= HighlightSelectedLayerOnSettingChanged;
|
||||
_surfaceService.ActiveSurfaceConfigurationSelected -= OnActiveSurfaceConfigurationSelected;
|
||||
_profileEditorService.ProfileSelected -= OnProfileSelected;
|
||||
_profileEditorService.ProfileElementSelected -= OnProfileElementSelected;
|
||||
_profileEditorService.SelectedProfileElementUpdated -= OnSelectedProfileElementUpdated;
|
||||
|
||||
HighlightSelectedLayer.Save();
|
||||
PauseRenderingOnFocusLoss.Save();
|
||||
|
||||
@@ -150,8 +157,6 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.Visualization
|
||||
var targetFps = Math.Min(targetFpsSetting.Value, editorTargetFpsSetting.Value);
|
||||
_updateTrigger = new TimerUpdateTrigger {UpdateFrequency = 1.0 / targetFps};
|
||||
_updateTrigger.Update += UpdateLeds;
|
||||
|
||||
_surfaceService.ActiveSurfaceConfigurationSelected += OnActiveSurfaceConfigurationSelected;
|
||||
}
|
||||
|
||||
private void OnActiveSurfaceConfigurationSelected(object sender, SurfaceConfigurationEventArgs e)
|
||||
|
||||
+5
-5
@@ -9,25 +9,25 @@
|
||||
<!-- Render these first so that they are always behind the actual shape -->
|
||||
<Ellipse x:Name="RotateTopLeft"
|
||||
Fill="Transparent"
|
||||
Cursor="/Resources/aero_rotate.cur"
|
||||
Cursor="/Resources/Cursors/aero_rotate.cur"
|
||||
MouseDown="RotationOnMouseDown"
|
||||
MouseUp="RotationOnMouseUp"
|
||||
MouseMove="RotationOnMouseMove" />
|
||||
<Ellipse x:Name="RotateTopRight"
|
||||
Fill="Transparent"
|
||||
Cursor="/Resources/aero_rotate.cur"
|
||||
Cursor="/Resources/Cursors/aero_rotate.cur"
|
||||
MouseDown="RotationOnMouseDown"
|
||||
MouseUp="RotationOnMouseUp"
|
||||
MouseMove="RotationOnMouseMove" />
|
||||
<Ellipse x:Name="RotateBottomRight"
|
||||
Fill="Transparent"
|
||||
Cursor="/Resources/aero_rotate.cur"
|
||||
Cursor="/Resources/Cursors/aero_rotate.cur"
|
||||
MouseDown="RotationOnMouseDown"
|
||||
MouseUp="RotationOnMouseUp"
|
||||
MouseMove="RotationOnMouseMove" />
|
||||
<Ellipse x:Name="RotateBottomLeft"
|
||||
Fill="Transparent"
|
||||
Cursor="/Resources/aero_rotate.cur"
|
||||
Cursor="/Resources/Cursors/aero_rotate.cur"
|
||||
MouseDown="RotationOnMouseDown"
|
||||
MouseUp="RotationOnMouseUp"
|
||||
MouseMove="RotationOnMouseMove" />
|
||||
@@ -38,7 +38,7 @@
|
||||
Stroke="{DynamicResource PrimaryHueMidBrush}"
|
||||
StrokeThickness="{Binding OutlineThickness}"
|
||||
StrokeDashArray="2 2"
|
||||
Cursor="/Resources/aero_drag.cur"
|
||||
Cursor="/Resources/Cursors/aero_drag.cur"
|
||||
MouseDown="MoveOnMouseDown"
|
||||
MouseUp="MoveOnMouseUp"
|
||||
MouseMove="MoveOnMouseMove" />
|
||||
|
||||
Reference in new issue
Block a user