1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

Node editor - Tweak grid size and apply grid size to script

Type coloring - Fix object's white color
This commit is contained in:
Robert 2021-08-19 23:58:32 +02:00
parent 05d8222991
commit c6a73f01f0
3 changed files with 7 additions and 7 deletions

View File

@ -23,7 +23,7 @@ namespace Artemis.UI.Shared
public static (Color, Color) GetTypeColors(Type type) public static (Color, Color) GetTypeColors(Type type)
{ {
if (type == typeof(object)) if (type == typeof(object))
return (new SKColor(0xFFFFFF).ToColor(), new SKColor(0xFFFFFF).Darken(0.35f).ToColor()); return (SKColors.White.ToColor(), SKColors.White.Darken(0.35f).ToColor());
TypeColorRegistration? typeColorRegistration = NodeService?.GetTypeColor(type); TypeColorRegistration? typeColorRegistration = NodeService?.GetTypeColor(type);
if (typeColorRegistration != null) if (typeColorRegistration != null)

View File

@ -121,7 +121,7 @@ namespace Artemis.VisualScripting.Editor.Controls
} }
public static readonly DependencyProperty GridSizeProperty = DependencyProperty.Register( public static readonly DependencyProperty GridSizeProperty = DependencyProperty.Register(
"GridSize", typeof(int), typeof(VisualScriptPresenter), new PropertyMetadata(24)); "GridSize", typeof(int), typeof(VisualScriptPresenter), new PropertyMetadata(12));
public int GridSize public int GridSize
{ {

View File

@ -87,13 +87,13 @@
<Setter Property="Background"> <Setter Property="Background">
<Setter.Value> <Setter.Value>
<VisualBrush TileMode="Tile" Stretch="Uniform" Viewport="0 0 20 20" ViewportUnits="Absolute"> <VisualBrush TileMode="Tile" Stretch="Uniform" Viewport="0 0 24 24" ViewportUnits="Absolute">
<VisualBrush.Visual> <VisualBrush.Visual>
<Canvas> <Canvas>
<Rectangle Width="10" Height="10" Canvas.Top="0" Canvas.Left="0" Fill="Black" Opacity="0.15" /> <Rectangle Width="12" Height="12" Canvas.Top="0" Canvas.Left="0" Fill="Black" Opacity="0.15" />
<Rectangle Width="10" Height="10" Canvas.Top="0" Canvas.Left="10" /> <Rectangle Width="12" Height="12" Canvas.Top="0" Canvas.Left="12" />
<Rectangle Width="10" Height="10" Canvas.Top="10" Canvas.Left="0" /> <Rectangle Width="12" Height="12" Canvas.Top="12" Canvas.Left="0" />
<Rectangle Width="10" Height="10" Canvas.Top="10" Canvas.Left="10" Fill="Black" Opacity="0.15" /> <Rectangle Width="12" Height="12" Canvas.Top="12" Canvas.Left="12" Fill="Black" Opacity="0.15" />
</Canvas> </Canvas>
</VisualBrush.Visual> </VisualBrush.Visual>
</VisualBrush> </VisualBrush>