Skip to content
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

Make non-collapsible titledpanes not highlight on mouseover #1517

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

alanocallaghan
Copy link
Contributor

No description provided.

@finglis
Copy link
Contributor

finglis commented May 3, 2024

In the process of adding the class to other titled panes, please don't merge yet :)

@alanocallaghan alanocallaghan marked this pull request as draft May 3, 2024 15:31
Resolving other non-collapsible titled panes that appear clickable (but are not)
@finglis
Copy link
Contributor

finglis commented May 6, 2024

So edited a few more that appeared clickable when they shouldn't be (as they are not collapsible).
I wasn't able to test ExportChartPane.java, KaplanMeierDisplay.java as I couldn't find them in the running app but I believe the latter doesn't need adjusting.
Additionally, I wasn't able to launch TMASummaryViewer.java in the app (File -> TMA data -> launch TMA data viewer) so added it as a comment. Unsure if this is the case for anyone else?
Lastly I believe the simplifyTitledPane class of PaneTools.java seems to not be used at all. Unsure if I'm missing something, if not should it be used or removed?

@alanocallaghan
Copy link
Contributor Author

That version of simplifyTitledPane was only removed/deprecated a few months ago so I'd be inclined to let it linger until 1.0 at least a728924

@finglis finglis marked this pull request as ready for review May 7, 2024 08:35
@petebankhead
Copy link
Member

If I understand correctly, this PR is to make the top title change on hover but not the bottom one - because the top one can be expanded/collapsed, but the bottom one can't.

Screen.Recording.2024-05-21.at.17.57.47.mov

tbh I'd never noticed this or seen it as problematic.

If you think it needs a fix, then should it not go into qupath-fxtras? This is the new home to simplifyTitledPane... but then you'd need to load an external .css (like with the simplify method), e.g.

public void makeNonCollapsible(TitledPane pane) {
    pane.setCollapsible(false);
    // Whatever other styling is needed here
}

Hard-coding a reference to the CSS class feels a bit brittle to me, and is tied very much to QuPath in a way that is unusable elsewhere. And I imagine we'll end up with inconsistencies as we'll forget / extension writers won't know to add this style class... which to me seems potentially worse.

You could also change main.css to avoid any change on hover at all, but personally I think it looks quite nice and helps titles stand out.

Was there any particular user complaint or confusion caused by the default JavaFX approach of slightly changing the behavior on hover, regardless of the 'collapsible' status?

@alanocallaghan
Copy link
Contributor Author

tbh I'd never noticed this or seen it as problematic.

Fair yeah, it's been bugging me, but I am happy to allow it to continue to bug me if it's not consequential or shared by others

You could also change main.css to avoid any change on hover at all, but personally I think it looks quite nice and helps titles stand out.

It certainly helps for collapsible panes

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.

None yet

3 participants