mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-03-03 00:00:55 +08:00
fix: enhance ClearButton visibility and functionality in TextArea styles.
This commit is contained in:
@@ -163,16 +163,15 @@
|
|||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^.clearButton, ^.ClearButton">
|
<Style Selector="^.clearButton, ^.ClearButton">
|
||||||
<Style Selector="^[IsReadOnly=False]:focus:not(:empty) /template/ Button#PART_ClearButton">
|
<Style Selector="^[AcceptsReturn=False][IsReadOnly=False]:not(:empty)">
|
||||||
<Setter Property="IsVisible" Value="True" />
|
<Style Selector="^:pointerover,^:focus">
|
||||||
</Style>
|
<Style Selector="^ /template/ Button#PART_ClearButton">
|
||||||
<Style Selector="^[IsReadOnly=False]:pointerover:not(:empty) /template/ Button#PART_ClearButton">
|
<Setter Property="IsVisible" Value="True" />
|
||||||
<Setter Property="IsVisible" Value="True" />
|
</Style>
|
||||||
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.TextArea.clearButton /template/ Button#PART_ClearButton, ^.TextArea.ClearButton /template/ Button#PART_ClearButton">
|
|
||||||
<Setter Property="VerticalAlignment" Value="Top" />
|
|
||||||
</Style>
|
|
||||||
<Style Selector="^.revealPasswordButton, ^.RevealPasswordButton">
|
<Style Selector="^.revealPasswordButton, ^.RevealPasswordButton">
|
||||||
<Setter Property="PasswordChar" Value="•" />
|
<Setter Property="PasswordChar" Value="•" />
|
||||||
<Style Selector="^ /template/ ToggleButton#PART_RevealButton">
|
<Style Selector="^ /template/ ToggleButton#PART_RevealButton">
|
||||||
@@ -225,9 +224,27 @@
|
|||||||
<Style Selector="^.TextArea">
|
<Style Selector="^.TextArea">
|
||||||
<Setter Property="AcceptsReturn" Value="True" />
|
<Setter Property="AcceptsReturn" Value="True" />
|
||||||
<Setter Property="VerticalContentAlignment" Value="Top" />
|
<Setter Property="VerticalContentAlignment" Value="Top" />
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
<Setter Property="Padding" Value="{DynamicResource TextBoxTextAreaContentPadding}" />
|
<Setter Property="Padding" Value="{DynamicResource TextBoxTextAreaContentPadding}" />
|
||||||
<Setter Property="MinHeight" Value="{DynamicResource TextBoxTextAreaHeight}" />
|
<Setter Property="MinHeight" Value="{DynamicResource TextBoxTextAreaHeight}" />
|
||||||
<Setter Property="TextInputOptions.ReturnKeyType" Value="Return" />
|
<Setter Property="TextInputOptions.ReturnKeyType" Value="Return" />
|
||||||
|
<Style Selector="^.clearButton, ^.ClearButton">
|
||||||
|
<Style Selector="^ /template/ Button#PART_ClearButton">
|
||||||
|
<Setter Property="VerticalAlignment" Value="Top" />
|
||||||
|
<Setter Property="IsVisible" Value="True" />
|
||||||
|
<Setter Property="IsTabStop" Value="False" />
|
||||||
|
<Setter Property="IsEnabled" Value="False" />
|
||||||
|
<Setter Property="Opacity" Value="0" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^[IsReadOnly=False]:not(:empty)">
|
||||||
|
<Style Selector="^:pointerover,^:focus">
|
||||||
|
<Style Selector="^ /template/ Button#PART_ClearButton">
|
||||||
|
<Setter Property="IsEnabled" Value="True" />
|
||||||
|
<Setter Property="Opacity" Value="1" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
@@ -374,16 +391,15 @@
|
|||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^.clearButton, ^.ClearButton">
|
<Style Selector="^.clearButton, ^.ClearButton">
|
||||||
<Style Selector="^[IsReadOnly=False]:focus:not(:empty) /template/ Button#PART_ClearButton">
|
<Style Selector="^[AcceptsReturn=False][IsReadOnly=False]:not(:empty)">
|
||||||
<Setter Property="IsVisible" Value="True" />
|
<Style Selector="^:pointerover,^:focus">
|
||||||
</Style>
|
<Style Selector="^ /template/ Button#PART_ClearButton">
|
||||||
<Style Selector="^[IsReadOnly=False]:pointerover:not(:empty) /template/ Button#PART_ClearButton">
|
<Setter Property="IsVisible" Value="True" />
|
||||||
<Setter Property="IsVisible" Value="True" />
|
</Style>
|
||||||
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^.TextArea.clearButton /template/ Button#PART_ClearButton, ^.TextArea.ClearButton /template/ Button#PART_ClearButton">
|
|
||||||
<Setter Property="VerticalAlignment" Value="Top" />
|
|
||||||
</Style>
|
|
||||||
<Style Selector="^.revealPasswordButton, ^.RevealPasswordButton">
|
<Style Selector="^.revealPasswordButton, ^.RevealPasswordButton">
|
||||||
<Setter Property="PasswordChar" Value="•" />
|
<Setter Property="PasswordChar" Value="•" />
|
||||||
<Style Selector="^ /template/ ToggleButton#PART_RevealButton">
|
<Style Selector="^ /template/ ToggleButton#PART_RevealButton">
|
||||||
@@ -436,9 +452,27 @@
|
|||||||
<Style Selector="^.TextArea">
|
<Style Selector="^.TextArea">
|
||||||
<Setter Property="AcceptsReturn" Value="True" />
|
<Setter Property="AcceptsReturn" Value="True" />
|
||||||
<Setter Property="VerticalContentAlignment" Value="Top" />
|
<Setter Property="VerticalContentAlignment" Value="Top" />
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
<Setter Property="Padding" Value="{DynamicResource TextBoxTextAreaContentPadding}" />
|
<Setter Property="Padding" Value="{DynamicResource TextBoxTextAreaContentPadding}" />
|
||||||
<Setter Property="MinHeight" Value="{DynamicResource TextBoxTextAreaHeight}" />
|
<Setter Property="MinHeight" Value="{DynamicResource TextBoxTextAreaHeight}" />
|
||||||
<Setter Property="TextInputOptions.ReturnKeyType" Value="Return" />
|
<Setter Property="TextInputOptions.ReturnKeyType" Value="Return" />
|
||||||
|
<Style Selector="^.clearButton, ^.ClearButton">
|
||||||
|
<Style Selector="^ /template/ Button#PART_ClearButton">
|
||||||
|
<Setter Property="VerticalAlignment" Value="Top" />
|
||||||
|
<Setter Property="IsVisible" Value="True" />
|
||||||
|
<Setter Property="IsTabStop" Value="False" />
|
||||||
|
<Setter Property="IsEnabled" Value="False" />
|
||||||
|
<Setter Property="Opacity" Value="0" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^[IsReadOnly=False]:not(:empty)">
|
||||||
|
<Style Selector="^:pointerover,^:focus">
|
||||||
|
<Style Selector="^ /template/ Button#PART_ClearButton">
|
||||||
|
<Setter Property="IsEnabled" Value="True" />
|
||||||
|
<Setter Property="Opacity" Value="1" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
@@ -554,4 +588,4 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
Reference in New Issue
Block a user