mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-01-02 02:33:32 +00:00
Conditions/databindings - Fixed data model display option
Databindings - Fixed data bindings UI dissapearing on rapid clicks
This commit is contained in:
parent
8294cc306a
commit
bdad5b9511
@ -29,7 +29,6 @@
|
|||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
|
|
||||||
<Button Background="{Binding ButtonBrush}"
|
<Button Background="{Binding ButtonBrush}"
|
||||||
BorderBrush="{Binding ButtonBrush}"
|
BorderBrush="{Binding ButtonBrush}"
|
||||||
Style="{StaticResource DataModelConditionButton}"
|
Style="{StaticResource DataModelConditionButton}"
|
||||||
@ -61,8 +60,4 @@
|
|||||||
</TextBlock>
|
</TextBlock>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
@ -74,21 +74,7 @@
|
|||||||
|
|
||||||
<!-- Value display -->
|
<!-- Value display -->
|
||||||
<StackPanel Grid.Column="1">
|
<StackPanel Grid.Column="1">
|
||||||
<TextBlock Text="{Binding DisplayValue, Mode=OneWay}"
|
<ContentControl s:View.Model="{Binding DisplayViewModel}" FontFamily="Consolas" Margin="15 0.5 0 0"/>
|
||||||
FontFamily="Consolas"
|
|
||||||
HorizontalAlignment="Right"
|
|
||||||
Visibility="{Binding ShowToString, Converter={x:Static s:BoolToVisibilityConverter.Instance}, Mode=OneWay}"
|
|
||||||
Margin="15 0.5 0 0" />
|
|
||||||
<TextBlock Text="null"
|
|
||||||
FontFamily="Consolas"
|
|
||||||
HorizontalAlignment="Right"
|
|
||||||
Foreground="{DynamicResource MaterialDesignCheckBoxDisabled}"
|
|
||||||
Margin="15 0.5 0 0"
|
|
||||||
Visibility="{Binding ShowNull, Converter={x:Static s:BoolToVisibilityConverter.Instance}, Mode=OneWay}" />
|
|
||||||
<ContentControl s:View.Model="{Binding DisplayViewModel}"
|
|
||||||
FontFamily="Consolas"
|
|
||||||
Margin="15 0.5 0 0"
|
|
||||||
Visibility="{Binding ShowViewModel, Converter={x:Static s:BoolToVisibilityConverter.Instance}, Mode=OneWay}" />
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|||||||
@ -221,7 +221,7 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties
|
|||||||
NotifyOfPropertyChange(nameof(TimeCaretPosition));
|
NotifyOfPropertyChange(nameof(TimeCaretPosition));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ProfileEditorServiceOnSelectedDataBindingChanged(object? sender, EventArgs e)
|
private void ProfileEditorServiceOnSelectedDataBindingChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
RightSideIndex = ProfileEditorService.SelectedDataBinding != null ? 1 : 0;
|
RightSideIndex = ProfileEditorService.SelectedDataBinding != null ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,14 +10,38 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
<converters:NullToVisibilityConverter x:Key="NullToVisibilityConverter" />
|
|
||||||
<converters:PropertyTreeMarginConverter Length="20" x:Key="PropertyTreeMarginConverter" />
|
<converters:PropertyTreeMarginConverter Length="20" x:Key="PropertyTreeMarginConverter" />
|
||||||
|
<Style x:Key="DataBindingsButton" TargetType="shared:LockableToggleButton" BasedOn="{StaticResource MaterialDesignFlatToggleButton}">
|
||||||
|
<Style.Triggers>
|
||||||
|
<EventTrigger RoutedEvent="Button.Click">
|
||||||
|
<EventTrigger.Actions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="IsEnabled">
|
||||||
|
<DiscreteBooleanKeyFrame KeyTime="00:00:00" Value="False" />
|
||||||
|
<DiscreteBooleanKeyFrame KeyTime="00:00:00.3" Value="True" />
|
||||||
|
</BooleanAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</EventTrigger.Actions>
|
||||||
|
</EventTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
|
|
||||||
<Border Name="Bd"
|
<Border Name="Bd"
|
||||||
BorderBrush="{DynamicResource MaterialDesignDivider}"
|
BorderBrush="{DynamicResource MaterialDesignDivider}"
|
||||||
BorderThickness="0,0,0,1"
|
BorderThickness="0,0,0,1"
|
||||||
Height="25">
|
Height="25">
|
||||||
|
<Border.Style>
|
||||||
|
<Style TargetType="Border">
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding LayerPropertyViewModel.IsHighlighted, Mode=OneWay}" Value="True">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource MaterialDesignPaper}" />
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Border.Style>
|
||||||
<Grid Margin="{Binding Converter={StaticResource PropertyTreeMarginConverter}}">
|
<Grid Margin="{Binding Converter={StaticResource PropertyTreeMarginConverter}}">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
@ -55,7 +79,7 @@
|
|||||||
</ContentControl>
|
</ContentControl>
|
||||||
|
|
||||||
<shared:LockableToggleButton Grid.Column="3"
|
<shared:LockableToggleButton Grid.Column="3"
|
||||||
Style="{StaticResource MaterialDesignFlatToggleButton}"
|
Style="{StaticResource DataBindingsButton}"
|
||||||
ToolTip="Change the property's data binding"
|
ToolTip="Change the property's data binding"
|
||||||
Width="20"
|
Width="20"
|
||||||
Height="20"
|
Height="20"
|
||||||
|
|||||||
@ -200,6 +200,7 @@ namespace Artemis.UI.Screens.ProfileEditor
|
|||||||
{
|
{
|
||||||
Profiles.Add(descriptor);
|
Profiles.Add(descriptor);
|
||||||
Profiles.Sort(p => p.Name);
|
Profiles.Sort(p => p.Name);
|
||||||
|
SelectedProfile = descriptor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user