-
-
Notifications
You must be signed in to change notification settings - Fork 80
widgets: add onclick feature #736
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
Conversation
- renderer: move getOrCreateWidgetsFor method declaration to public section
- config: add onclick special config value to label
- add CLICKABLE macro for onclick configuration - replace direct onclick assignment with CLICKABLE macro
- ensure pointer is available before setting cursor shape - initialize cursor shape device if not already done
- implement onHover method to manage widget hover states - update cursor shape based on hover status - ensure all outputs are redrawn after state changes
- add setHover and isHovered methods to manage hover state - implement containsPoint method for hit testing - override getBoundingBox in CLabel for accurate positioning - add onHover method in CLabel to change cursor shape
- invoke onHover method with current mouse location
- add getBoundingBox method to calculate the widget's bounding box - implement onHover method to update cursor shape on hover
- modify cursor shape setting to only apply when onclickCommand is not empty
- Improve hover state tracking for widgets - reduce unnecessary redraw calls by tracking hover changes - remove redundant renderAllOutputs() call
Currently Do we want to implement the following things here already or in a future MR?
|
i think they should be implemented in this MR as they will unlock a lot more creative options |
I don't have any say here... :) But in my opinion:
Should probably be implemented in this MR, because it's part of the same premise as
I think should be a part of a separate MR, because it's seems like a separate feature. |
Added onclick for shape and image. The input-field has no onclick cmd for now, we might want to use it to move the cursor within the input field in the future. Then i noticed it triggers onclick for widgets on different monitors than my cursor is on. (I have two 1080p monitors and a single shape widget would trigger the onclick command twice) |
ups, sorry. didn't mean to delete the branch |
@PaideiaDilemma can you please add visual feedback when cursor is on a label or image; i have setup reboot icon |
@JunaidQrysh yeah i want that as well but not in this PR. We can add it later |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at your discretion
Picks up the contribution from @Memoraike (thanks :))
Implements #366.