Opacity of floating watermark
Usage Information
3.7.4
Description
Reproduction Steps
https://avaloniacommunity.github.io/Material.Avalonia/
<TextBox
UseFloatingWatermark="True"
Classes="clearButton"
p1:TextFieldAssist.Label="Text field"
xmlns:p1="clr-namespace:Material.Styles.Assists;assembly=Material.Styles" />
Expected Behavior
When a floating watermark functions as the placeholder/regular watermark (i.e. when the focus is elsewhere), it should have reduced opacity, otherwise it looks like the text box contains an actual value.
All text in the picture above should have the same opacity as the second text box.
Actual Behavior
Floating watermark is always rendered with full opacity.
Regression?
No response
Known Workarounds
No response
Anything else?
No response
Could you help with a pull-request?
No
Is there an existing issue for this?
- [X] I have searched the existing issues
I suppose it's actually by design, but it probably isn't hard to change.
I would be happy with using an overriding style in my application, if there is one.
Should be something like that:
<Style Selector="TextBox:empty:not(:focus-within) /template/ TextBlock#PART_LabelText">
<Setter Property="Opacity" Value="0.5"></Setter>
</Style>
P.S. Sorry for late response. If you have any additional questions feel free to reopen the issue.