[ 
https://issues.apache.org/jira/browse/NETBEANS-2646?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eirik Bakke updated NETBEANS-2646:
----------------------------------
    Description: 
On Windows 10 systems with HiDPI monitors, it is possible to specify fractional 
DPI scaling factors, such as 150%. Some of the borders around components 
visible in the main NetBeans window end up looking ugly on this setting, 
because of rounding errors that cause a border 1 logical pixels wide to be 
painted as either 1 or 2 device pixels wide, depending on exactly where on the 
screen the border is drawn. This can be seen on Windows 10 with a 150% DPI 
scaling factor, by dragging the split pane between the "Projects" tab and the 
source code editor back and forth, and observing spurious changes in the 
surrounding borders. See the attached screenshots (be sure to view at 100% 
scaling).

I'll add a pull request to fix this in the most visible places, which is 
borders used in the NetBeans tab control. There are similar problems in other 
Swing components, e.g. JTextField, but that would have to be reported as a bug 
against the JDK's Windows LAF.

This issue/PR relates only to the Windows LAF. On MacOS, the problem does not 
appear, since only an integral scaling factor (2x) is used for HiDPI ("retina") 
screens, which avoids the underlying rounding errors.

A similar problem may also appear on Linux; if this is the case, feel free to 
open a new ticket. I did not have a Linux machine to test on, so I prepared 
this patch for the Windows LAF only.

  was:
On Windows 10 systems with HiDPI monitors, it is possible to specify fractional 
DPI scaling factors, such as 150%. Some of the borders around components 
visible in the main NetBeans window end up looking ugly on this setting, 
because of rounding errors that cause a border 1 logical pixels wide to be 
painted as either 1 or 2 device pixels wide, depending on exactly where on the 
screen the border is drawn. This can be seen on Windows 10 with a 150% DPI 
scaling factor, by dragging the split pane between the "Projects" tab and the 
source code editor back and forth, and observing spurious changes in the 
surrounding borders. See the attached screenshots (be sure to view at 100% 
scaling).

I'll add a pull request to fix this in the most visible places, which is 
borders used in the NetBeans tab control. There are similar problems in other 
Swing components, e.g. JTextField, but that would have to be reported as a bug 
against the JDK's Windows LAF.


> Improve border appearances with fractional HiDPI scaling factors (Windows LAF)
> ------------------------------------------------------------------------------
>
>                 Key: NETBEANS-2646
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-2646
>             Project: NetBeans
>          Issue Type: Improvement
>          Components: platform - Window System
>    Affects Versions: 11.0
>         Environment: Windows 10 with HiDPI monitor in fractional scaling mode 
> (e.g. 150%), Java 9 and above
>            Reporter: Eirik Bakke
>            Assignee: Eirik Bakke
>            Priority: Major
>              Labels: HiDPI
>         Attachments: BordersAfterPatch.png, BordersBeforePatch.png
>
>
> On Windows 10 systems with HiDPI monitors, it is possible to specify 
> fractional DPI scaling factors, such as 150%. Some of the borders around 
> components visible in the main NetBeans window end up looking ugly on this 
> setting, because of rounding errors that cause a border 1 logical pixels wide 
> to be painted as either 1 or 2 device pixels wide, depending on exactly where 
> on the screen the border is drawn. This can be seen on Windows 10 with a 150% 
> DPI scaling factor, by dragging the split pane between the "Projects" tab and 
> the source code editor back and forth, and observing spurious changes in the 
> surrounding borders. See the attached screenshots (be sure to view at 100% 
> scaling).
> I'll add a pull request to fix this in the most visible places, which is 
> borders used in the NetBeans tab control. There are similar problems in other 
> Swing components, e.g. JTextField, but that would have to be reported as a 
> bug against the JDK's Windows LAF.
> This issue/PR relates only to the Windows LAF. On MacOS, the problem does not 
> appear, since only an integral scaling factor (2x) is used for HiDPI 
> ("retina") screens, which avoids the underlying rounding errors.
> A similar problem may also appear on Linux; if this is the case, feel free to 
> open a new ticket. I did not have a Linux machine to test on, so I prepared 
> this patch for the Windows LAF only.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to