1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-12 13:28:33 +00:00

Compare commits

...

2 Commits

10 changed files with 31 additions and 5 deletions

View File

@ -39,6 +39,11 @@ public interface INode : INotifyPropertyChanged, IBreakableModel, IPluginFeature
/// Gets a boolean indicating whether the node is a default node that connot be removed
/// </summary>
bool IsDefaultNode { get; }
/// <summary>
/// Gets a boolean indicating whether the node is currently loading, use this to disable pin type changes etc.
/// </summary>
bool IsLoading { get; set; }
/// <summary>
/// Gets or sets the X-position of the node

View File

@ -46,6 +46,7 @@ public class NodeData
if (entity != null)
{
node.IsLoading = true;
node.X = entity.X;
node.Y = entity.Y;
try

View File

@ -206,6 +206,8 @@ public abstract class NodeScript : CorePropertyChanged, INodeScript
}
LoadConnections();
foreach (INode node in Nodes)
node.IsLoading = false;
}
internal void LoadFromEntity(NodeScriptEntity entity)
@ -216,6 +218,7 @@ public abstract class NodeScript : CorePropertyChanged, INodeScript
private void LoadExistingNode(INode node, NodeEntity nodeEntity)
{
node.IsLoading = true;
node.Id = nodeEntity.Id;
node.X = nodeEntity.X;
node.Y = nodeEntity.Y;

View File

@ -92,6 +92,9 @@ public abstract class Node : BreakableModel, INode
/// <inheritdoc />
public virtual bool IsDefaultNode => false;
/// <inheritdoc />
public bool IsLoading { get; set; }
private readonly List<IPin> _pins = new();
/// <inheritdoc />

View File

@ -10,7 +10,7 @@
x:DataType="propertyInput:BrushPropertyInputViewModel">
<UserControl.Styles>
<Style Selector="ComboBox.brush /template/ ContentControl#ContentPresenter">
<Style Selector="ComboBox.brush /template/ ContentPresenter#ContentPresenter">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate DataType="{x:Type layerBrushes:LayerBrushDescriptor}">

View File

@ -65,7 +65,7 @@
</StackPanel>
<StackPanel Grid.Row="1" Grid.Column="1" VerticalAlignment="Center">
<StackPanel.Styles>
<Style Selector="ComboBox.layoutProvider /template/ ContentControl#ContentPresenter">
<Style Selector="ComboBox.layoutProvider /template/ ContentPresenter#ContentPresenter">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate x:DataType="layoutProviders:ILayoutProviderViewModel">

View File

@ -17,7 +17,7 @@
</StackPanel>
<StackPanel Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" Spacing="5">
<StackPanel.Styles>
<Style Selector="ComboBox.layoutProvider /template/ ContentControl#ContentPresenter">
<Style Selector="ComboBox.layoutProvider /template/ ContentPresenter#ContentPresenter">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate x:DataType="models:InstalledEntry">

View File

@ -7,7 +7,7 @@
x:Class="Artemis.UI.Screens.ProfileEditor.DisplayCondition.DisplayConditionScriptView"
x:DataType="displayCondition:DisplayConditionScriptViewModel">
<UserControl.Styles>
<Style Selector="ComboBox.condition-type /template/ ContentControl#ContentPresenter">
<Style Selector="ComboBox.condition-type /template/ ContentPresenter#ContentPresenter">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate DataType="{x:Type displayCondition:ConditionTypeViewModel}">
@ -35,7 +35,13 @@
<TextBlock Text="{CompiledBinding Description}" Foreground="{DynamicResource TextFillColorSecondaryBrush}" TextWrapping="Wrap" MaxWidth="350" />
</StackPanel>
</DataTemplate>
</ComboBox.ItemTemplate>
<ComboBox.SelectionBoxItemTemplate>
<DataTemplate DataType="{x:Type displayCondition:ConditionTypeViewModel}">
<TextBlock Text="{CompiledBinding Name}" TextWrapping="Wrap" MaxWidth="350" />
</DataTemplate>
</ComboBox.SelectionBoxItemTemplate>
</ComboBox>
<ContentControl Grid.Row="2" Content="{CompiledBinding ConditionViewModel}" />
</Grid>

View File

@ -267,7 +267,7 @@
</StackPanel>
<StackPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
<StackPanel.Styles>
<Style Selector="ComboBox.brush /template/ ContentControl#ContentPresenter">
<Style Selector="ComboBox.brush /template/ ContentPresenter#ContentPresenter">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate DataType="{x:Type layerBrushes:LayerBrushDescriptor}">

View File

@ -38,6 +38,14 @@
<Setter Property="VerticalScrollBarVisibility" Value="Disabled"></Setter>
</Style>
<!-- Workaround for https://github.com/amwx/FluentAvalonia/issues/648 -->
<Style Selector="controls|FontIcon">
<Setter Property="Width" Value="24" />
</Style>
<Style Selector="controls|SymbolIcon">
<Setter Property="Width" Value="24" />
</Style>
<Styles.Resources>
<ResourceDictionary>
<FontFamily x:Key="RobotoMono">avares://Artemis.UI/Assets/Fonts#Roboto Mono</FontFamily>