mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Profile editor - Re-implemented LED dimming Profile editor - Hide layer bounds of unselected layers Profile editor - Dim layer shapes of unselected layers (option to hide them NYI) Profile editor - Disable edit tool when no layer is selected or the selected layer has no LEDs Gradient picker - Fixed the preview being at a slight angle Color brush - Fixed the gradient being at a 45 degree angle Settings - Added color scheme option to manually switch between light and dark
75 lines
3.8 KiB
XML
75 lines
3.8 KiB
XML
<UserControl x:Class="Artemis.UI.Screens.Module.ProfileEditor.Visualization.ProfileLayerView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:Artemis.UI.Screens.Module.ProfileEditor.Visualization"
|
|
xmlns:s="https://github.com/canton7/Stylet"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="450"
|
|
d:DesignWidth="800"
|
|
d:DataContext="{d:DesignInstance {x:Type local:ProfileLayerViewModel}}">
|
|
<UserControl.Resources>
|
|
<Style TargetType="{x:Type Path}" x:Key="SelectedShapeStyle">
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsSelected}" Value="False">
|
|
<DataTrigger.EnterActions>
|
|
<BeginStoryboard>
|
|
<Storyboard>
|
|
<ColorAnimation Storyboard.TargetProperty="(Path.Stroke).(SolidColorBrush.Color)" To="Gray" Duration="0:0:0.5"/>
|
|
<DoubleAnimation Storyboard.TargetProperty="(Path.StrokeThickness)" To="0.5" Duration="0:0:0.5" />
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</DataTrigger.EnterActions>
|
|
<DataTrigger.ExitActions>
|
|
<BeginStoryboard>
|
|
<Storyboard>
|
|
<ColorAnimation Storyboard.TargetProperty="(Path.Stroke).(SolidColorBrush.Color)" To="{StaticResource Accent700}" Duration="0:0:0.5"/>
|
|
<DoubleAnimation Storyboard.TargetProperty="(Path.StrokeThickness)" To="1" Duration="0:0:0.5" />
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</DataTrigger.ExitActions>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
<Style TargetType="{x:Type Path}" x:Key="SelectedLayerStyle">
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsSelected}" Value="False">
|
|
<DataTrigger.EnterActions>
|
|
<BeginStoryboard>
|
|
<Storyboard>
|
|
<DoubleAnimation Storyboard.TargetProperty="(Path.Opacity)" To="0" Duration="0:0:0.5" />
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</DataTrigger.EnterActions>
|
|
<DataTrigger.ExitActions>
|
|
<BeginStoryboard>
|
|
<Storyboard>
|
|
<DoubleAnimation Storyboard.TargetProperty="(Path.Opacity)" To="1" Duration="0:0:0.5" />
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</DataTrigger.ExitActions>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</UserControl.Resources>
|
|
<Canvas>
|
|
<!-- The part of the layer's shape that falls outside the layer -->
|
|
<Path Data="{Binding ShapeGeometry, Mode=OneWay}"
|
|
StrokeThickness="0.5"
|
|
Style="{StaticResource SelectedShapeStyle}">
|
|
<Path.Stroke>
|
|
<SolidColorBrush Color="{StaticResource Primary700}" />
|
|
</Path.Stroke>
|
|
</Path>
|
|
|
|
<Path Data="{Binding LayerGeometry, Mode=OneWay}"
|
|
ClipToBounds="False"
|
|
Stroke="#A7A7A7"
|
|
StrokeThickness="1"
|
|
StrokeLineJoin="Round"
|
|
x:Name="LayerPath"
|
|
Style="{StaticResource SelectedLayerStyle}">
|
|
</Path>
|
|
</Canvas>
|
|
</UserControl> |