Skip to content

Commit

Permalink
Colorpicker fixes (#9277)
Browse files Browse the repository at this point in the history
Co-authored-by: Niels Laute <niels9001@hotmail.com>
  • Loading branch information
niels9001 and Niels Laute committed Jan 25, 2021
1 parent 5713230 commit 2e961d1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -274,14 +274,14 @@
<Button x:Name="CancelButton"
Click="CancelButton_Click"
AutomationProperties.Name="{x:Static p:Resources.Cancel}"
Content="Cancel"
Content="{x:Static p:Resources.Cancel}"
Width="80"/>
<Button Margin="12,0,12,0"
x:Name="OKButton"
Click="OKButton_Click"
Style="{StaticResource AccentButtonStyle}"
AutomationProperties.Name="{x:Static p:Resources.OK}"
Content="OK"
Content="{x:Static p:Resources.OK}"
Width="80"/>
</WrapPanel>
</StackPanel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ private void ShowDetails()
CurrentColorButton.BeginAnimation(Button.MarginProperty, moveColor);
detailsStackPanel.BeginAnimation(StackPanel.OpacityProperty, opacityAppear);
detailsGrid.BeginAnimation(Grid.HeightProperty, resize);
CurrentColorButton.IsEnabled = false;
}
}

Expand Down Expand Up @@ -226,6 +227,7 @@ private void HideDetails()
detailsStackPanel.BeginAnimation(Window.OpacityProperty, opacityAppear);
detailsGrid.BeginAnimation(Grid.HeightProperty, resize);
detailsGrid.Visibility = Visibility.Collapsed;
CurrentColorButton.IsEnabled = true;
}
}

Expand Down
6 changes: 0 additions & 6 deletions src/modules/colorPicker/ColorPickerUI/Resources/Styles.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,9 @@
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource ButtonBorderBrushPressed}" />
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource ButtonForegroundPressed}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="Background" Property="Background" Value="{DynamicResource ButtonBackgroundDisabled}" />
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource ButtonBorderBrushDisabled}" />
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource ButtonForegroundDisabled}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

</ResourceDictionary>

0 comments on commit 2e961d1

Please sign in to comment.