Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-5928

Proposed improvements to FlatLAF tab components+borders/margins



    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 12.4
    • None
    • FlatLaf
    • Windows, MacOS, and Linux with FlatLAF Light and FlatLAF Dark


      In a previous PR ( https://github.com/apache/netbeans/pull/2967 ), the tab components in the NetBeans window system were redesigned and modernized for the Windows LAF. This PR ports related tabcontrol improvements back into FlatLAF, and proposes a similar tab style for FlatLAF. See the attached screenshots.

      The proposed style, compared to the current FlatLAF style, makes the selected tab look like an actual "tab" with an actual rectangular border around it, while keeping the much simpler "separators only" look for unselected tabs. The proposed style also tightens up vertical space significantly, like in other LAFs. See the attached screenshots. The new tab controls work well on all HiDPI scaling levels, and on all platforms (Windows, Linux, MacOS).

      Advantages of the proposed tabcontrol style:

      • Other applications that have tabs as part of their window system still tend to render at least the active window system tab as an actual "tabs", e.g. Chrome, Excel, Photoshop, Unity.
      • Personally, I find it hard to orient my eyes around the old FlatLAF tab style; the drawn selected tab seems to fix this. (Hard to explain in a fully objective way!)
      • The tab content areas (contents of editor, projects pane, navigator pane etc.) has borders around them, so it is logical that the border continues around the tab that is associated with them.
      • Conserve vertical space. Modern monitors have tended to become wider but not taller. With e.g. 2x HiDPI scaling (as on all MacBooks), there may actually be fewer logical pixels available in the vertical direction than on older laptop screens.

      This PR also removes an extraneous border around the editor area, and introduces a little bit of extra space in the toolbar area.

      I've been using FlatLAF as the default LAF on Linux for my NetBeans Platform application. It handles HiDPI scaling very well, and it's getting really solid--thanks to @DevCharly for all his work on it!


        1. flatlaf-dark-1-before.png
          56 kB
          Eirik Bakke
        2. flatlaf-dark-2-after.png
          56 kB
          Eirik Bakke
        3. flatlaf-light-1-before.png
          62 kB
          Eirik Bakke
        4. flatlaf-light-2-after.png
          57 kB
          Eirik Bakke

        Issue Links



              Unassigned Unassigned
              ebakke Eirik Bakke
              0 Vote for this issue
              1 Start watching this issue



                Time Tracking

                  Original Estimate - Not Specified
                  Not Specified
                  Remaining Estimate - 0h
                  Time Spent - 9h 50m
                  9h 50m