slint-ui / slint

Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
https://slint.dev
Other
16.1k stars 533 forks source link

Diagnostics: Suggest `Colors.xyz` or `EnumName.xyz` if xyz is not found and it is the value of some enum. #4397

Open ogoffart opened 5 months ago

ogoffart commented 5 months ago

we should suggest to use Colors.xyz or EnumName.xyz if xyz is not found and it is the value of some enum.

Originally posted by @ogoffart in https://github.com/slint-ui/slint/issues/897#issuecomment-1516089199

ogoffart commented 1 week ago

Another case to consider: https://github.com/slint-ui/slint/discussions/5530

property <bool> center;
// could there be a diagnostic that suggest the use of the enum name?
Text { text: "zoom:"; vertical-alignment: center; }