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.94k stars 568 forks source link

Pick mode, selects not clicked items #4208

Closed qarmin closed 8 months ago

qarmin commented 9 months ago

Slint nightly lsp

https://github.com/slint-ui/slint/assets/41945903/7a3146c6-90d8-4bef-a544-0999c9d3d460

UI to test - https://github.com/qarmin/czkawka/tree/master/krokiet/ui

ogoffart commented 9 months ago

Thanks you for trying the nightly version.

The picker features indeed need a bit more work. We are still wondering what particular selection method to use.

ogoffart commented 9 months ago

I haven't look at the details of your particular case. But the idea is that it selects a component (eg, the inner rectangle of a line edit,) then all instance of this component are to be highlighted. But it seems that the problem here is that it picks some inner component instead of picking the element you meant to select. We need to revise what component to select when you click somewhere.

hunger commented 8 months ago

What exactly are you doing?

I guess you click on the line edit. That should get all line edits selected as they "are the same thing" in that if you would add an element into it, then all of these components would change. Yes, that is indeed surprising :-)

You then double-click on the line edit to enter into that element? It going back and forth between the "entire lineedit" and the "text area" part is a bit surprising. Is that the bug you are reporting?

hunger commented 8 months ago

The nightly will have a new and improved picker (IMHO), but the "select multiple items" is still a thing.

hunger commented 8 months ago

The newest version will not go to inner components of existing widgets anymore, so this issue should be fixed now:-)