mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
Colorpicker fixes (#9277)
Co-authored-by: Niels Laute <niels9001@hotmail.com>
This commit is contained in:
@@ -274,14 +274,14 @@
|
|||||||
<Button x:Name="CancelButton"
|
<Button x:Name="CancelButton"
|
||||||
Click="CancelButton_Click"
|
Click="CancelButton_Click"
|
||||||
AutomationProperties.Name="{x:Static p:Resources.Cancel}"
|
AutomationProperties.Name="{x:Static p:Resources.Cancel}"
|
||||||
Content="Cancel"
|
Content="{x:Static p:Resources.Cancel}"
|
||||||
Width="80"/>
|
Width="80"/>
|
||||||
<Button Margin="12,0,12,0"
|
<Button Margin="12,0,12,0"
|
||||||
x:Name="OKButton"
|
x:Name="OKButton"
|
||||||
Click="OKButton_Click"
|
Click="OKButton_Click"
|
||||||
Style="{StaticResource AccentButtonStyle}"
|
Style="{StaticResource AccentButtonStyle}"
|
||||||
AutomationProperties.Name="{x:Static p:Resources.OK}"
|
AutomationProperties.Name="{x:Static p:Resources.OK}"
|
||||||
Content="OK"
|
Content="{x:Static p:Resources.OK}"
|
||||||
Width="80"/>
|
Width="80"/>
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
@@ -199,6 +199,7 @@ namespace ColorPicker.Controls
|
|||||||
CurrentColorButton.BeginAnimation(Button.MarginProperty, moveColor);
|
CurrentColorButton.BeginAnimation(Button.MarginProperty, moveColor);
|
||||||
detailsStackPanel.BeginAnimation(StackPanel.OpacityProperty, opacityAppear);
|
detailsStackPanel.BeginAnimation(StackPanel.OpacityProperty, opacityAppear);
|
||||||
detailsGrid.BeginAnimation(Grid.HeightProperty, resize);
|
detailsGrid.BeginAnimation(Grid.HeightProperty, resize);
|
||||||
|
CurrentColorButton.IsEnabled = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -226,6 +227,7 @@ namespace ColorPicker.Controls
|
|||||||
detailsStackPanel.BeginAnimation(Window.OpacityProperty, opacityAppear);
|
detailsStackPanel.BeginAnimation(Window.OpacityProperty, opacityAppear);
|
||||||
detailsGrid.BeginAnimation(Grid.HeightProperty, resize);
|
detailsGrid.BeginAnimation(Grid.HeightProperty, resize);
|
||||||
detailsGrid.Visibility = Visibility.Collapsed;
|
detailsGrid.Visibility = Visibility.Collapsed;
|
||||||
|
CurrentColorButton.IsEnabled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -120,15 +120,9 @@
|
|||||||
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource ButtonBorderBrushPressed}" />
|
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource ButtonBorderBrushPressed}" />
|
||||||
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource ButtonForegroundPressed}" />
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource ButtonForegroundPressed}" />
|
||||||
</Trigger>
|
</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.Triggers>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
Reference in New Issue
Block a user