unoplatform / uno

Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
https://platform.uno
Apache License 2.0
8.78k stars 706 forks source link

[GTK] WinUI3 `TextBox` Disabled Foreground #13985

Open brinko99 opened 11 months ago

brinko99 commented 11 months ago

Current behavior

Under Skia.Gtk, the TextBox foreground color does not honor visual state styling. For example, the TextBox foreground color under a disabled state does not change as expected.

The TextBox is implemented with a ScrollViewer hosting the content. Visual states change the Foreground of this element but these changes have no runtime effect.

Even hardcoding the Foreground as below has no effect.

<ScrollViewer x:Name="ContentElement"
    Grid.Row="1"
    Grid.Column="0"
    Foreground="Blue"

Changes to TextBox.Foreground itself do work as expected.

Expected behavior

No response

How to reproduce it (as minimally and precisely as possible)

See the attached repo project. Two TextBoxes are defined, one with default styling, one with a hardcoded ContentElement foreground. In both cases, the non-disabled foreground color is displayed.

UnoAppTextBoxRepo.zip

Workaround

No response

Works on UWP/WinUI

Yes

Environment

Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia

NuGet package version(s)

Version 4.10.26

Affected platforms

Skia (GTK on Linux/macOS/Windows)

IDE

No response

IDE version

No response

Relevant plugins

No response

Anything else we need to know?

No response

limeniye commented 11 months ago

Is that some similar as https://github.com/unoplatform/uno/issues/13887?

brinko99 commented 11 months ago

Is that some similar as #13887?

I reported the other as well. No, they are not related.

This issue affects the design and styling of the TextBox when a visual state is applicable. The other relates specifically to the inheritance of the IsEnabled property.

Thanks