[jira] [Comment Edited] (NETBEANS-2360) HiDPI scaling not applied automatically on Linux

2020-11-18 Thread Eirik Bakke (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-2360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17235014#comment-17235014
 ] 

Eirik Bakke edited comment on NETBEANS-2360 at 11/18/20, 9:34 PM:
--

As of the latest Ubuntu release, Ubuntu 20.04, the "Displays" control panel has 
a "Scale" factor option. I believe this sets a gnome property known as 
"Xft/DPI". Java does not seem to react to this property at the 
GraphicsConfiguration level, however; that should probably be reported as an 
OpenJDK bug/feature request. Meanwhile, GDK_SCALE works fine for setting the 
scaling level at the GraphicsConfiguration transform level.

Note that the default LAF on Linux (GTK+) gets into trouble when Xft/DPI is 
set, because some UI elements end up being scaled and others don't.

What does work is to set GDK_SCALE and use FlatLAF. In that case, all the UI 
elements appear properly scaled, regardless of whether Xft/DPI is set in 
addition.

Perhaps FlatLAF should be made the default LAF on Linux, and the NetBeans 
startup script should set GDK_SCALE automatically based on the value of Xft/DPI.


was (Author: ebakke):
As of the latest Ubuntu release, Ubuntu 20.04, the "Displays" control panel has 
a "Scale" factor option. I believe this sets a gnome property known as 
"Xft/DPI". Java does not seem to react to this property at the 
GraphicsConfiguration level, however; that should probably be reported as an 
OpenJDK bug/feature request. Meanwhile, GDK_SCALE works fine for setting the 
scaling level at the GraphicsConfiguration transform level.

Nevertheless, the default LAF on Linux (GTK+) gets into trouble when Xft/DPI is 
set, because some UI elements end up being scaled and others don't.

What does work is to set GDK_SCALE and use FlatLAF. In that case, all the UI 
elements appear properly scaled, regardless of whether Xft/DPI is set in 
addition.

Perhaps FlatLAF should be made the default LAF on Linux, and the NetBeans 
startup script should set GDK_SCALE automatically based on the value of Xft/DPI.

> HiDPI scaling not applied automatically on Linux
> 
>
> Key: NETBEANS-2360
> URL: https://issues.apache.org/jira/browse/NETBEANS-2360
> Project: NetBeans
>  Issue Type: Improvement
>  Components: platform - Launchers&CLI
>Affects Versions: 11.0
> Environment: Kubuntu 18.03
> Oracle JDK 11.0.2
>Reporter: Eirik Bakke
>Priority: Major
>  Labels: HiDPI, Linux
> Attachments: kubunt.jpg
>
>
> Running NetBeans 11 on Kubuntu 18.03, GUI text size does not seem to take 
> into account the system's default HiDPI scaling. This was reported in a 
> Twitter thread on https://twitter.com/nicktail/status/1114789604337405952 . 
> Note that Window decorations seem to be the correct size.
> Setting the GDK_SCALE environment variable seems to fix the problem, if I 
> understand the originally reporter correctly. This could probably be done 
> easily from the NetBeans launcher script (netbeans/bin). But it wouldn't fix 
> the problem in multi-monitor setups. We should investigate what could be done 
> to make scaling work properly in multi-monitor setups involving one HiDPI 
> screen and one non-HiDPI screen.
> Before merging a patch to the launcher script, it should be tested on a 
> couple of different Linux environments, using both HiDPI and non-HiDPI 
> screens. Note that the UNIX launcher script is also used on MacOS.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
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



[jira] [Comment Edited] (NETBEANS-2360) HiDPI scaling not applied automatically on Linux

2020-11-18 Thread Eirik Bakke (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-2360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17235014#comment-17235014
 ] 

Eirik Bakke edited comment on NETBEANS-2360 at 11/18/20, 9:34 PM:
--

As of the latest Ubuntu release, Ubuntu 20.04, the "Displays" control panel has 
a "Scale" factor option. I believe this sets a gnome property known as 
"Xft/DPI". Java does not seem to react to this property at the 
GraphicsConfiguration level, however; that should probably be reported as an 
OpenJDK bug/feature request. Meanwhile, GDK_SCALE works fine for setting the 
scaling level at the GraphicsConfiguration transform level.

Nevertheless, the default LAF on Linux (GTK+) gets into trouble when Xft/DPI is 
set, because some UI elements end up being scaled and others don't.

What does work is to set GDK_SCALE and use FlatLAF. In that case, all the UI 
elements appear properly scaled, regardless of whether Xft/DPI is set in 
addition.

Perhaps FlatLAF should be made the default LAF on Linux, and the NetBeans 
startup script should set GDK_SCALE automatically based on the value of Xft/DPI.


was (Author: ebakke):
As of the latest Ubuntu release, Ubuntu 20.04, the "Displays" control panel has 
a "Scale" factor option. I believe this sets a gnome property known as 
"Xft/DPI". Java does not seem to react to this property at the 
GraphicsConfiguration level, however; that should probably be reported as an 
OpenJDK bug/feature request. Meanwhile, GDK_SCALE works fine.

Nevertheless, the default LAF on Linux (GTK+) gets into trouble when Xft/DPI is 
set, because some UI elements end up being scaled and others don't.

What does work is to set GDK_SCALE and use FlatLAF. In that case, all the UI 
elements appear properly scaled, regardless of whether Xft/DPI is set in 
addition.

Perhaps FlatLAF should be made the default LAF on Linux, and the NetBeans 
startup script should set GDK_SCALE automatically based on the value of Xft/DPI.

> HiDPI scaling not applied automatically on Linux
> 
>
> Key: NETBEANS-2360
> URL: https://issues.apache.org/jira/browse/NETBEANS-2360
> Project: NetBeans
>  Issue Type: Improvement
>  Components: platform - Launchers&CLI
>Affects Versions: 11.0
> Environment: Kubuntu 18.03
> Oracle JDK 11.0.2
>Reporter: Eirik Bakke
>Priority: Major
>  Labels: HiDPI, Linux
> Attachments: kubunt.jpg
>
>
> Running NetBeans 11 on Kubuntu 18.03, GUI text size does not seem to take 
> into account the system's default HiDPI scaling. This was reported in a 
> Twitter thread on https://twitter.com/nicktail/status/1114789604337405952 . 
> Note that Window decorations seem to be the correct size.
> Setting the GDK_SCALE environment variable seems to fix the problem, if I 
> understand the originally reporter correctly. This could probably be done 
> easily from the NetBeans launcher script (netbeans/bin). But it wouldn't fix 
> the problem in multi-monitor setups. We should investigate what could be done 
> to make scaling work properly in multi-monitor setups involving one HiDPI 
> screen and one non-HiDPI screen.
> Before merging a patch to the launcher script, it should be tested on a 
> couple of different Linux environments, using both HiDPI and non-HiDPI 
> screens. Note that the UNIX launcher script is also used on MacOS.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
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