slint-ui / slint

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

Feedback on some component issues #3925

Closed lethargy123 closed 10 months ago

lethargy123 commented 1 year ago

Sure, here's the feedback in English:

Regarding the CheckBox component, the checkbox needs to be clicked at the bottom left corner with the mouse pointer in order to check it. In a standard UI framework, clicking anywhere inside the checkbox should suffice for checking it. Additionally, the ProgressIndicator component displays a black horizontal line in the middle, which is quite unattractive. It would be greatly appreciated if the black line could be removed, and it would be even better if there is an option to customize the color of the progress bar. Regarding the TextEdit component, when the text within it exceeds the size of the window (without external input), it does not automatically scroll to the bottom. It would be beneficial to introduce a new attribute that allows for controlling this behavior. Thank you!

image
lethargy123 commented 1 year ago

When using the example from the official website, the CheckBox functions normally; however, after customizing the x, y, width, and height properties, it can only be checked by clicking on the left side of the checkbox. This behavior deviates from the standard interaction where clicking anywhere inside the checkbox should suffice for checking it. This may indicate a potential bug or limitation when customizing the CheckBox's position and dimensions.

https://github.com/slint-ui/slint/assets/105811408/def217e4-9354-4fe7-9c9c-d6543024af18

image
FloVanGH commented 1 year ago

Hello and thank you for your request. At the moment the best way to create a custom behavior and look is to create a custom widget. You can also use the code the std-widgets as example https://github.com/slint-ui/slint/blob/master/internal/compiler/widgets/fluent-base/checkbox.slint. What we plan next is to first providing styling resources so that you are able to create custom widgets that looks native to the selected style, you can check this issue https://github.com/slint-ui/slint/issues/3687. The customization of widgets like styling and behavior is something we probably support in the future but there is nothing concrete right now.

FloVanGH commented 10 months ago

Regarding the CheckBox component, the checkbox needs to be clicked at the bottom left corner with the mouse pointer in order to check it. In a standard UI framework, clicking anywhere inside the checkbox should suffice for checking it.

I checked the behavior on all styles. Looks like it works now as expected. You can click inside of the CheckBox and also on the text to change the checked state.

Additionally, the ProgressIndicator component displays a black horizontal line in the middle, which is quite unattractive.

The style should be fine now for all style variants of the ProgressIndicator

And it would be even better if there is an option to customize the color of the progress bar

At the moment we do not plan to support style customization of the std-widgets like colors, fonts and spacings. Each style is based on given design guidelines likefluent for a Windows like look and feel. Given the possibilities to change the styling from outside could end up breaking with the given guidelines.

But we will work on an alternative solution to make it more easier to create customized widgets. These two tickets are used to track the progress for it: #4371 #4372.