Modify

Opened 2 years ago

Last modified 21 months ago

#19818 new defect

Editor in Preferences did not scale on Ubuntu 20.04 with HiDPI

Reported by: mdk Owned by: team
Priority: normal Milestone:
Component: Ubuntu package Version:
Keywords: template_report hidpi Cc:

Description (last modified by mdk)

What steps will reproduce the problem?

  1. Need Ubuntu 20.04 and HiDPI Monitor
  2. Konfigure Ubuntu to use Scale factor 2.0:


  1. Konfigure in JOSM Advanced Preferences all "Scale" Properties to "2.0" and restart

see file scale2.0.xml

  1. Go to JOSM Advanced Preferences and edit a value.

What is the expected result?

The Editor (and the hover text) has the same size as the normal text in the grid.

What happens instead?

Both texts are not scaled (like many other texts in JOSM)

Please provide any additional information below. Attach a screenshot if possible.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2020-09-18 21:11:43 +0200 (Fri, 18 Sep 2020)
Revision:17038
Build-Date:2020-09-19 01:30:48
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (17038 en) Linux Ubuntu 20.04.1 LTS
Memory Usage: 329 MB / 1980 MB (98 MB allocated, but free)
Java version: 14.0.1+7-Ubuntu-1ubuntu1, Private Build, OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: :0.0 3840x2160 (scaling 1.0x1.0)
Maximum Screen Size: 3840x2160
Best cursor sizes: 16x16 -> 16x16, 32x32 -> 32x32
Desktop environment: ubuntu:GNOME
Java ATK Wrapper package: libatk-wrapper-java:all-0.37.1-1
libcommons-compress-java: libcommons-compress-java:all-1.19-1
libcommons-logging-java: libcommons-logging-java:all-1.2-2
fonts-noto: fonts-noto:-
VM arguments: [--add-modules=java.scripting,java.sql, -Djosm.restart=true, -Djosm.dir.name=JOSM-latest, -Djava.net.useSystemProxies=true]

Plugins:
+ ColumbusCSV (35405)
+ FastDraw (35499)
+ HouseNumberTaggingTool (35508)
+ OpeningHoursEditor (35414)
+ RoadSigns (35510)
+ SimplifyArea (35405)
+ buildings_tools (35500)
+ contourmerge (v0.1.6)
+ imagery-xml-bounds (35546)
+ imagery_offset_db (35405)
+ pbf (35446)
+ poly (35248)
+ public_transport (35405)
+ reltoolbox (35529)
+ reverter (35499)
+ terracer (35499)
+ turnrestrictions (35515)
+ utilsplugin2 (35487)
+ wikipedia (1.1.4)

Tagging presets:
+ https://josm.openstreetmap.de/josmfile?page=Presets/OneClick&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/LaneAttributes&preset&zip=1

Map paint styles:
+ https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&style&zip=1

Attachments (5)

Preferences.png (34.6 KB) - added by mdk 2 years ago.
UbuntuSettings.png (31.4 KB) - added by mdk 2 years ago.
scale2.0.xml (2.6 KB) - added by mdk 2 years ago.
Dialog2.png (47.4 KB) - added by mdk 21 months ago.
Dialog1.png (19.5 KB) - added by mdk 21 months ago.

Download all attachments as: .zip

Change History (14)

Changed 2 years ago by mdk

Attachment: Preferences.png added

Changed 2 years ago by mdk

Attachment: UbuntuSettings.png added

Changed 2 years ago by mdk

Attachment: scale2.0.xml added

comment:1 Changed 2 years ago by mdk

Description: modified (diff)

comment:2 Changed 2 years ago by mdk

Summary: Editor in Preferenced did not scale on UbuntuEditor in Preferences did not scale on Ubuntu 20.04 with HiDPI

comment:3 Changed 21 months ago by simon04

Owner: changed from team to mdk
Status: newneedinfo

Help/HiDPISupport describes HiDPI settings known to be working pretty well. You're using the option listed last, flagged deprecated and experimental. Please try GDK_SCALE.

Changed 21 months ago by mdk

Attachment: Dialog2.png added

Changed 21 months ago by mdk

Attachment: Dialog1.png added

comment:4 in reply to:  3 Changed 21 months ago by mdk

Replying to simon04:

Help/HiDPISupport describes HiDPI settings known to be working pretty well. You're using the option listed last, flagged deprecated and experimental. Please try GDK_SCALE.

You are right, this makes a much better result.

When I try it some month ago, the combination of the Ubuntu Setting "200%" (see on top) and GDK-SCALE=2 results in some parts was scaled with 400%, which looked very ugly.

Actually with GDK-SCALE=2 I found only some dialogs which are not very useful:

and

Is it possible to handle the Ubuntu setting for the scaling? It would be nice to use JOSM out of the box and not needing to patch it every new version. The start script could find out, that JOSM runs on Ubuntu (>= 20.04) and could read the scaling settings. The the script could start JOSM with the proper GDK-SCALE value.

comment:5 Changed 21 months ago by simon04

Component: CoreUbuntu package
Owner: changed from mdk to team
Status: needinfonew

comment:6 Changed 21 months ago by skyper

As /usr/bin/josm seldomly changes, you can work with a hacked variant under /usr/local/bin/, for now. Adjusting the executed command in the while loop at the bottom from:

        $JAVACMD $JAVA_OPTS -jar /usr/share/josm-latest/josm-latest.jar "$@"

to:

        GDK_SCALE=2 $JAVACMD $JAVA_OPTS -jar /usr/share/josm-latest/josm-latest.jar "$@"

should do it.

comment:7 Changed 21 months ago by mdk

Thank you. This workaround works fine, but I will not realize changes in the start script.
A better solution could be creating a new executable script /usr/local/bin/josm-latest with

#!/bin/bash
GDK_SCALE=2 /usr/bin/josm-latest

comment:8 Changed 21 months ago by simon04

I can confirm that HiDPI is not automatically detected using Fedora 33 and Gnome 2.32.0 set to 200% scaling

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2020-11-20 15:07:00 +0100 (Fri, 20 Nov 2020)
Revision:17326
Build-Date:2020-11-21 02:30:52
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (17326 en) Linux Fedora 33 (Workstation Edition)
Memory Usage: 152 MB / 3972 MB (58 MB allocated, but free)
Java version: 15.0.1+9, Red Hat, Inc., OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: :0.0 2560x1440 (scaling 1.0x1.0)
Maximum Screen Size: 2560x1440
Best cursor sizes: 16x16 -> 16x16, 32x32 -> 32x32
Desktop environment: GNOME
Environment variable LANG: en_IE.UTF-8

IntelliJ reports the following HiDPI info:

Per-monitor DPI-aware : enabled
Monitor resolution : 1280x720
Monitor scale : 2.0
User (IDE) scale : 1.0
Xft.DPI : 192
GSettings scale factor : undefined
GDK_SCALE : undefined
GDK_DPI_SCALE : undefined

comment:9 in reply to:  7 Changed 21 months ago by mdk

The workaround from comment7 did not work very well.

When I start it from the gnome Application menu (the 9 dots in the lower left), I see the init screen (with all the times used) followed by the StartPage. But after a second, JOSM crashes without a trace. This is strange, because when I start the same script from a shell, it works.

Duplicating the script, as mentioned in comment6 didn't crash.

Last edited 21 months ago by mdk (previous) (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to mdk
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.