Public Access
Write the disabled accent glow as 'none', which this Avalonia can parse
This commit is contained in:
@@ -233,14 +233,20 @@
|
||||
BoxShadow is cleared here too, and that is new alongside the gradient: the base rule now sets a glow
|
||||
that reads as "this is lit and wants pressing", which is the opposite of what a disabled control
|
||||
should say. Left unset it would still apply — the base rule's Setter is still in effect wherever a
|
||||
more specific one does not override it — so the glow has to be named here, as the empty string
|
||||
BoxShadows parses to "no shadows", to go away.
|
||||
more specific one does not override it — so the glow has to be named here, as "none", to go away.
|
||||
|
||||
◆ "none" RATHER THAN THE EMPTY STRING. The remark this replaced claimed an empty string parses to "no
|
||||
shadows", and it does not on the Avalonia this project builds against — BoxShadowsTypeConverter throws
|
||||
an InvalidCastException on it instead, which failed silently at style-sheet load time in nothing that
|
||||
exercises this rule's own screen and loudly in every headless layout test that lays out any window at
|
||||
all, because Application.Styles is global. "none" is the literal this converter does accept for an
|
||||
empty BoxShadows.
|
||||
-->
|
||||
<Style Selector="Button.accent:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" Value="{StaticResource BorderFaint}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="BoxShadow" Value="" />
|
||||
<Setter Property="BoxShadow" Value="none" />
|
||||
<Setter Property="Foreground" Value="{StaticResource TextFaint}" />
|
||||
</Style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user