mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Debugger - Added stay on top option
This commit is contained in:
parent
050eb5bd2f
commit
375c04090b
@ -350,9 +350,7 @@ namespace Artemis.Core
|
||||
// No point rendering if the alpha was set to zero by one of the effects
|
||||
if (layerPaint.Color.Alpha == 0)
|
||||
return;
|
||||
|
||||
layerCanvas.ClipPath(layerPath);
|
||||
|
||||
|
||||
if (!LayerBrush.SupportsTransformation)
|
||||
SimpleRender(layerCanvas, _layerBitmap.Info, layerPaint, layerPath);
|
||||
else if (General.ResizeMode.CurrentValue == LayerResizeMode.Normal)
|
||||
|
||||
@ -35,15 +35,6 @@
|
||||
"ExpandedPropertyGroups": {
|
||||
"$type": "System.Collections.Generic.List`1[[System.String, System.Private.CoreLib]], System.Private.CoreLib",
|
||||
"$values": []
|
||||
},
|
||||
"RootDisplayCondition": {
|
||||
"$type": "Artemis.Storage.Entities.Profile.DisplayConditionGroupEntity, Artemis.Storage",
|
||||
"BooleanOperator": 0,
|
||||
"Children": {
|
||||
"$type":
|
||||
"System.Collections.Generic.List`1[[Artemis.Storage.Entities.Profile.Abstract.DisplayConditionPartEntity, Artemis.Storage]], System.Private.CoreLib",
|
||||
"$values": []
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -322,15 +313,6 @@
|
||||
"$values": [
|
||||
"LayerBrush"
|
||||
]
|
||||
},
|
||||
"RootDisplayCondition": {
|
||||
"$type": "Artemis.Storage.Entities.Profile.DisplayConditionGroupEntity, Artemis.Storage",
|
||||
"BooleanOperator": 0,
|
||||
"Children": {
|
||||
"$type":
|
||||
"System.Collections.Generic.List`1[[Artemis.Storage.Entities.Profile.Abstract.DisplayConditionPartEntity, Artemis.Storage]], System.Private.CoreLib",
|
||||
"$values": []
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -586,15 +568,6 @@
|
||||
"ExpandedPropertyGroups": {
|
||||
"$type": "System.Collections.Generic.List`1[[System.String, System.Private.CoreLib]], System.Private.CoreLib",
|
||||
"$values": []
|
||||
},
|
||||
"RootDisplayCondition": {
|
||||
"$type": "Artemis.Storage.Entities.Profile.DisplayConditionGroupEntity, Artemis.Storage",
|
||||
"BooleanOperator": 0,
|
||||
"Children": {
|
||||
"$type":
|
||||
"System.Collections.Generic.List`1[[Artemis.Storage.Entities.Profile.Abstract.DisplayConditionPartEntity, Artemis.Storage]], System.Private.CoreLib",
|
||||
"$values": []
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -837,15 +810,6 @@
|
||||
"$values": [
|
||||
"LayerBrush"
|
||||
]
|
||||
},
|
||||
"RootDisplayCondition": {
|
||||
"$type": "Artemis.Storage.Entities.Profile.DisplayConditionGroupEntity, Artemis.Storage",
|
||||
"BooleanOperator": 0,
|
||||
"Children": {
|
||||
"$type":
|
||||
"System.Collections.Generic.List`1[[Artemis.Storage.Entities.Profile.Abstract.DisplayConditionPartEntity, Artemis.Storage]], System.Private.CoreLib",
|
||||
"$values": []
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@ -18,7 +18,8 @@
|
||||
Width="800"
|
||||
Height="800"
|
||||
d:DesignHeight="800" d:DesignWidth="800" d:DataContext="{d:DesignInstance debug:DebugViewModel}"
|
||||
Icon="/Resources/Images/Logo/logo-512.png">
|
||||
Icon="/Resources/Images/Logo/logo-512.png"
|
||||
Topmost="{Binding StayOnTopSetting.Value}">
|
||||
<DockPanel>
|
||||
<mde:AppBar Type="Dense"
|
||||
Title="Debugger"
|
||||
@ -30,6 +31,14 @@
|
||||
|
||||
<materialDesign:PopupBox DockPanel.Dock="Right" PlacementMode="BottomAndAlignRightEdges" StaysOpen="False">
|
||||
<StackPanel>
|
||||
<Button Command="{s:Action ToggleStayOnTop}">
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
|
||||
<ToggleButton Style="{StaticResource MaterialDesignSwitchToggleButton}"
|
||||
Margin="0 0 10 0"
|
||||
IsChecked="{Binding StayOnTopSetting.Value}"/>
|
||||
<TextBlock>Stay on top</TextBlock>
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button Content="Force garbage collection" Command="{s:Action ForceGarbageCollection}" />
|
||||
</StackPanel>
|
||||
</materialDesign:PopupBox>
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using Artemis.Core;
|
||||
using Artemis.Core.Services;
|
||||
using Artemis.UI.Screens.Settings.Debug.Tabs;
|
||||
using Stylet;
|
||||
|
||||
@ -6,16 +8,35 @@ namespace Artemis.UI.Screens.Settings.Debug
|
||||
{
|
||||
public class DebugViewModel : Conductor<Screen>.Collection.OneActive
|
||||
{
|
||||
public DebugViewModel(RenderDebugViewModel renderDebugViewModel, DataModelDebugViewModel dataModelDebugViewModel, LogsDebugViewModel logsDebugViewModel)
|
||||
public DebugViewModel(
|
||||
ISettingsService settingsService,
|
||||
RenderDebugViewModel renderDebugViewModel,
|
||||
DataModelDebugViewModel dataModelDebugViewModel,
|
||||
LogsDebugViewModel logsDebugViewModel)
|
||||
{
|
||||
Items.Add(renderDebugViewModel);
|
||||
Items.Add(dataModelDebugViewModel);
|
||||
Items.Add(logsDebugViewModel);
|
||||
ActiveItem = renderDebugViewModel;
|
||||
|
||||
StayOnTopSetting = settingsService.GetSetting("Debugger.StayOnTop", false);
|
||||
}
|
||||
|
||||
public PluginSetting<bool> StayOnTopSetting { get; }
|
||||
|
||||
public string Title => "Debugger";
|
||||
|
||||
public void ToggleStayOnTop()
|
||||
{
|
||||
StayOnTopSetting.Value = !StayOnTopSetting.Value;
|
||||
}
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
StayOnTopSetting.Save();
|
||||
base.OnClose();
|
||||
}
|
||||
|
||||
public void ForceGarbageCollection()
|
||||
{
|
||||
GC.Collect();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user