Skip to content

Add 'pick_on_bounds' property to symbolwidgets for clicking intricate symbols #3319

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DenSinH
Copy link
Contributor

@DenSinH DenSinH commented Mar 7, 2025

We have some intricate symbols with transparency, but clicking them can be quite annoying, as the mouse might hover over a small transparent region of the image, which makes it not register the hover state / makes it unclickable. We added a property named after the corresponding JavaFX ImageView property "pick on bounds", which makes the entire image bounds clickable, regardless of transparency. For backwards compatibility, it is false by default.

@kasemir
Copy link
Collaborator

kasemir commented Mar 24, 2025

Our site doesn't rely on clickable symbols, in fact I'd discourage that (https://github.com/ControlSystemStudio/phoebus/wiki/Display-Builder-Compatibility#actions-action-buttons).

But if you're stuck with displays full of transparent clickable symbols, this is what you'll have to do, short of updating all symbols to have for example a faint gray background ... as we had to do with the CSS icon because at least on Mac OS X it had the same problem: Click on the "C" icon in the "Doc" and nothing happens because it's mostly transparent...

Still, do we really need a new property for this, or can we simply turn this into a one-line change, making all symbols always fully clickable?

imageView.setPickOnBounds(true);

@DenSinH
Copy link
Contributor Author

DenSinH commented Apr 3, 2025

Fine by me, I figured we would do it this way just to not break the "default" behavior for other users. I'm sure you might not be too eager to just add properties for all such things 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants