-
Notifications
You must be signed in to change notification settings - Fork 914
FlatLAF improvements and new configuration properties #4335
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
neilcsmith-net
left a comment
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.
Few comments. Generally great improvement!
platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/FlatDarkLaf.properties
Show resolved
Hide resolved
platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/FlatDarkLaf.properties
Outdated
Show resolved
Hide resolved
platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/FlatDarkLaf.properties
Outdated
Show resolved
Hide resolved
platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/FlatLaf.properties
Show resolved
Hide resolved
...m/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/ui/FlatEditorTabCellRenderer.java
Outdated
Show resolved
Hide resolved
...form/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/ui/FlatViewTabDisplayerUI.java
Show resolved
Hide resolved
DevCharly
left a comment
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.
Great improvements 👍
Maybe editor tab padding needs some tweaking: space on right side of tab (between "x" and right tab edge) is much larger than on left side (between left tab edge and icon/text).
View tabs look ok.
|
I dunno whether this was intended to be or a Windows specific thing but when I Minimize NetBeans to a specific size the space above the menu is somehow the same as below the menu. It seems that the menu is somehow vertical alignment in the center. Also the quick search has some space above and below. When I maximize it to full window the space above is gone and it looks like the menu and quick search is stuck on the top of the screen. I post this here, because I think that this was part of FlatLaF afaik and could be improved even a bit more. What do you think? |
|
@DevCharly Sure, I'll adjust editor tab left/right padding. @Chris2011 I think this is FlatLAF trying to copy the native behavior on Windows 11. The title bar "hugs" the edge of the screen when you maximize the window. |
|
@Chris2011 and @eirikbakke yes, this is FlatLaf trying to behave similar to Windows system title bar. If you disable FlatLaf title bar (Options > Appearance > FlatLaf > Window decorations"), then you can see similar behavior: the title bar height is smaller if window is maximized, which gives the main content a little bit more space. I think this is Win32 API specific behavior. This behavior can be disabled by adding From my side, I'm fine with disabling this in NB. |
|
Thx for the info :). |
29aa8a1 to
b4d2188
Compare
|
I added a commit with revisions as suggested. The visual changes are (1) left/right margin in editor tabs and (2) not drawing the extra thick grey bar on top of inactive tabs. (I know Neil didn't like the latter in an earlier revision, but perhaps it works now? Alternatively, at least the grey bar should be the same grey as the border.) This time I'll do the screenshots at 200% HiDPI scaling (the previous ones were at 150%): |
mbien
left a comment
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.
good changes/fixes
...form/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/ui/FlatViewTabDisplayerUI.java
Outdated
Show resolved
Hide resolved
Didn't like it then. Definitely don't like it now. You can't tell which sub-tab in the output window is selected! Making it the border colour would make sense to me. You'll at least need to change the colour for inactive normal tabs if you keep this. See https://github.com/apache/netbeans/pull/4298/files#diff-666e203e64060709072a6a16658c102327d90ec9d256a91cc8b38b773b7c78acR31 |
b4d2188 to
fa3d8d2
Compare
|
Thanks! Personally I would still prefer we kept the top line. You then have a visual representation of the selected tab hierarchy - when focused and when unfocused. Don't think this works as well, but up to you. Rest looks great. |
|
I think you can better see whether a tab is focused or not when the thick line only appears for the focused tabs. Plus, when the line is grey, it looks like it's a continuation of the border, and then it looks odd that it's not the same width as the borders it connects to. If anyone else wants to vote for one or the other, let me know... see comparison below. |
|
My comment was specifically about seeing the selected tab in an unfocused region - same point as #4286 (comment) Let's get this merged anyway. As said before, images don't always tell enough of the story. eg. the unfocused tab colours in the options window is a bit odd at the moment. Let's let people work with it for a bit. I'm sure we'll end up with a few UI tweaks up until release. |
|
@neilcsmith-net OK, will merge this PR in a bit, and we can do more tweaks in the future. |
See the Pull Request for screenshots and links to related discussion/PRs. Visual improvements, annotated in screenshot in Pull Request: 1) Align and connect borders between tabs and the container panel below, including on fractional HiDPI scalings (e.g. 150%). Some visual artifacts still exist, e.g. on 125% scaling, but they are less common, and not very visible. 2) Remove an unnecessary border around the editor area. 3) Make sure the "X" in editor tabs are closer to the label than to the separator line. 4) Add some top/bottom margin in the toolbar 5) On FlatLAF Dark, make the tab background color connect with the background of the Project/Files/Services and Navigator panes. 6) Slightly decrease the height of regular tab components. Other visual improvements: * On FlatLAF Dark and Light, make the tab hover effect more subtle. Avoid showing a hover effect on the already-selected tab. Use the blueish active tab area background as a base for this color, rather than plain gray. * Fix positioning of "spinner" icon in sidebar tabs (see illustration in PR 2967, which did the same on the Windows LAF). * Properly clip editor tab borders when tab is partially invisible due to tab scrolling. New configuration settings for FlatLAF.properties * EditorTab.selectedBackgroundBottomGradient (Not used in the current theme, but was tested.) * Add ViewTab/EditorTab.unscaledBorders (Not used in the current FlatLAF theme, but is used in the Windows LAF.) * EditorTab/ViewTab.selectedHoverBackground/selectedHoverForeground (Tweaks in these commits make use of selectedHoverBackground.) * ViewTab/EditorTab.showSelectedTabBorder (Used to explicitly enable borders around the selected tab.)
c6ddc5e to
3437078
Compare
|
And here's the next PR in the series, which fixes the alignment of the "X" button: #4349 |







This PR is a follow-up to #4286 , adding visual improvements and new configuration options for FlatLAF. Before/after screenshots (open in separate tabs at 1:1 device pixel scaling to see details):
FlatLAF Dark
FlatLAF Light
Annotated changes
This PR (along with Neil's PR earlier today) replaces #3115 , except for the improvements relating to vertical alignment of tab labels, which I will put into a separate PR later. Much of the code here is adapted from improvements that were first merged into the Windows LAF.
Visual improvements, annotated in the screenshot above:
Other visual improvements:
New configuration settings for FlatLAF.properties