Opened 4 years ago
Last modified 4 years 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 )
What steps will reproduce the problem?
- Need Ubuntu 20.04 and HiDPI Monitor
- Konfigure Ubuntu to use Scale factor 2.0:
- Konfigure in JOSM Advanced Preferences all "Scale" Properties to "2.0" and restart
see file scale2.0.xml
- 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)
Change History (14)
by , 4 years ago
Attachment: | Preferences.png added |
---|
by , 4 years ago
Attachment: | UbuntuSettings.png added |
---|
by , 4 years ago
Attachment: | scale2.0.xml added |
---|
comment:1 by , 4 years ago
Description: | modified (diff) |
---|
comment:2 by , 4 years ago
Summary: | Editor in Preferenced did not scale on Ubuntu → Editor in Preferences did not scale on Ubuntu 20.04 with HiDPI |
---|
follow-up: 4 comment:3 by , 4 years ago
Owner: | changed from | to
---|---|
Status: | new → needinfo |
by , 4 years ago
Attachment: | Dialog2.png added |
---|
by , 4 years ago
Attachment: | Dialog1.png added |
---|
comment:4 by , 4 years ago
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 by , 4 years ago
Component: | Core → Ubuntu package |
---|---|
Owner: | changed from | to
Status: | needinfo → new |
comment:6 by , 4 years ago
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.
follow-up: 9 comment:7 by , 4 years ago
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 by , 4 years ago
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 by , 4 years ago
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.
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
.