-
-
Notifications
You must be signed in to change notification settings - Fork 268
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
JSplitPane setOneTouchExpandable useful control? #198
Comments
The "oneTouchExpandable" controls are not visible by default in FlatLaf. The reason for the cut-off arrow painting is that the divider size seems to be I'll try to optimize arrow painting for the small size... |
Yes that's how I'd turned it on. I was hoping there was a useful option because I know it was problematic when we were using Nimbus. We recently switched to FlatLaf, I don't think anything would be overriding the divider size but I'll look into it. Thanks for the tip. |
There are several places in zaproxy where the divider size is set to 3px: There are some options to control the size and the position of the controls. With With |
@DevCharly thanks that was above and beyond! I woulda looked. I should have been more specific in my earlier reply, I was fairly certain it wasn't overridden in the class where I turned on the option, but I hadn't looked for other impacts. Thanks! |
If you want to do this for others that's cool, but please don't worry about it for our use, I think 5px looks fine. (At least that's my opinion, I haven't asked others yet 😉 ). |
Do you know of a way to set a tooltips (hover text) for those controls? [I know that's totally out of scope for your LaF project so I'll understand if you don't know or choose not to comment.] |
There is no API or resource file to set tooltip on the arrow, but I can add something. The question is: how many different texts do we need? When divider is in the middle:
When left is collapsed (divider on left edge):
When right is collapsed (divider on right edge):
So 4 texts are needed for horizontal split panes and another 4 for vertical split panes. |
That’d be totally wonderful. I kinda figured if there was an API it’d only support one message like most Java controls. So I was picturing a generic message “Expand or collapse abc pane or xyz pane.”. |
Now implemented in master branch:
The default tooltip texts (shown in above screenshots) are:
If you want change them for all split panes in the application use: UIManager.put( "SplitPaneDivider.collapseLeftToolTipText", "Collapse left view" ); If you want change them for single splitpane use: splitPane1.putClientProperty( "SplitPaneDivider.collapseLeftToolTipText", "Collapse tree view" ); |
Is there a way to control the size or visibility of the "oneTouchExpandable" controls on a JSplitPane?
Here's a screenshot, note the little arrow'ish controls in the red box:
Note, if I'm being totally fair I don't think this issue is limited to FlatLaf. (I believe at one point I tested this and found the controls minimally useful in Nimbus as well.)
The text was updated successfully, but these errors were encountered: