-
Notifications
You must be signed in to change notification settings - Fork 863
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
Small improvements to the “Show parent folder name in tab title” option #7930
base: master
Are you sure you want to change the base?
Small improvements to the “Show parent folder name in tab title” option #7930
Conversation
I think visually distinguishing file name from path could be useful, but it will be probably tricky to find a color which works on active/inactive tabs for both light and dark themes. (e.g the FlatLaf light screenshot is a bit hard to read for me at least) The test output window reduces the contrast for less important stack frames for example (#6695 has screenshots). This is how it computes the color: netbeans/java/junit.ui/src/org/netbeans/modules/junit/ui/api/JUnitCallstackFrameNode.java Lines 63 to 73 in 7d89336
It does also use the colors from the actual component as input instead of using a hardcoded value. |
btw If you can't access the actual tab component, this might help to figure out what the key is - if it has one: UIManager.getLookAndFeelDefaults().entrySet().stream()
.filter( t -> t.getValue() instanceof Color)
.sorted((o1, o2) -> o1.getKey().toString().compareTo(o2.getKey().toString()))
.forEach(t -> System.out.println(t.getKey()+ ": " + t.getValue())); |
1591db6
to
7136c44
Compare
@mbien thanks for the example. Made the changes and updated the screenshots. |
what you see here is the html renderer noticing that the contrast is too low and trying to fix it to set the color to the complementary white or black. This is the opposite of what the intention is since it is now highlighting the folder instead of the file. As previously mentioned the tricky part is to make it work on different background / foregrounds - its used on different components and component states. I reduced the fade value to 0.7f and computed it for the tabs and tabs-switcher separately, since both have different colors. Tested on all supported themes and it looks ok I think. The "same background color for same projects" mode is still not working very well, esp on dark themes, but making both decorators work well together won't be easy. here the commit c4ea291, feel free to squash it with your PR |
7136c44
to
8fa82e7
Compare
@mbien, thank you so much for your help! |
@troizet not a problem with me. But you can add co-authors to commits by appending this to the commit message:
|
- parent folder name is displayed in opened documents list; - parent folder name is displayed in a different color from the file name. Co-authored-by: Michael Bien <[email protected]>
8fa82e7
to
913d29c
Compare
@mbien, thank you! |
Small improvements to the “Show parent folder name in tab title” option:
Before:
After:
After dark theme: