-
Notifications
You must be signed in to change notification settings - Fork 252
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show / Hide / Enable / Disable widgets #125
Comments
|
Good point. It's very easy to add a proxy class that allows it to inhibit the drawing of its subject. That is the way to do it. And yes, it should be part of the library. The visibility state should probably be a callback function like the one in |
Maybe something like this usage: auto e = share(hidable(some_element));
e-> is_visible = []{ return show_my_element_function(); /*return show-or-hide-state*/ } |
Perhaps we also want a |
Thank you for the quick replies and suggestions! I'll try them soon. Do I keep this issue open for a future implementation in the library? |
I would keep it. So far all of the issues were only closed when the topic was fully exhausted (by a PR or detailed "wontfix" explanation). |
Yes, please keep it open. These are very easy to add. I'll see if I can add them as soon as I can. |
I got bored... I added and More on ... "enable"-ability later... It's a bit more involved. |
Will these block eg a button? That is, if I hide or collapse a button will it still be able to receive events? |
yes they will. if you want it not to, that should probably be the |
My two questions have opposite meaning so I find your answer to be ambiguous. Nonetheless, I think I can currently easily workaround my use case by swapping empty box or another element in the same place. |
Simply: you can have it either way. Swapping empty box is of course another way. |
Actually the |
Thanks I would like to use |
What is the difference between hidden and collapsed elements?
Am I right? |
@Xeverous This is how I understand it also. As illustration of the problem, there is a collapsed button. |
I would imagine that the element will not draw if it has zero space, so there must be a bug somewhere. Admittedly, the collapsible thingies haven't been tested yet. Can you make an MCVE that I can use to try this? I am guessing that the minimum limits of the element being collapsed (a button?) is being violated, so it's not as simple as I originally thought (perhaps the collapsible's subject should be swapped out with an empty element when collapsed). |
Based on the example The issue is present here although not as pronounced, and I don't find how to make it so as much as illustrated above. It has a small observable amount of overlap between button and thumb. |
I get it. Yes, my intuition was correct. The initial implementation was naive and incorrect. I should swap out the subject with an empty element when collapsed. A deck would probably be sufficient. It shouldn't be difficult, but I am swamped right now. Can you wait a little bit for a few days? |
Sure it can wait no problem. There's no fire to the lake :) |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
I haven't found any function that can make some element to be visible or not, neither to enable or disable, is there some way currently?
The text was updated successfully, but these errors were encountered: