Modify

Opened 6 months ago

Last modified 8 weeks ago

#14666 new defect

[patch] Autoresize Tags/Memberships table to fit content?

Reported by: bagage Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: template_report Cc:

Description (last modified by skyper)

What steps will reproduce the problem?

  1. Select a node/way that has a long value for any key (let's say for "source" attribute)

What is the expected result?

You can see list of keys/values.

What happens instead?

You can see all keys easily but longer values are not visible even if there is a lot of space available. Because the table splits width 50%/50% between the 2 columns.

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

It would be awesome if the table could be automatically resized so that the first column (keys)'s width matched the biggest one, leaving all remaining width for values which may (usually) be bigger than keys anyway.

screenshot of the issue

Build-Date:2017-04-10 14:26:00
Revision:11883
Is-Local-Build:true

Identification: JOSM/1.5 (11883 SVN en) Linux Debian GNU/Linux 9.0 (stretch)
Memory Usage: 983 MB / 1760 MB (372 MB allocated, but free)
Java version: 1.8.0_121-8u121-b13-4-b13, Oracle Corporation, OpenJDK 64-Bit Server VM
Screen: :0.0 1920x1080
Maximum Screen Size: 1920x1080
Java package: openjdk-8-jre:amd64-8u121-b13-4
Java ATK Wrapper package: libatk-wrapper-java:all-0.33.3-13
Program arguments: [--language=en, ${HOME}/majcadastre/CL322-SAINT-PANTALEON-LES-VIGNES/CL322-SAINT-PANTALEON-LES-VIGNES-houses-prediction_segmente.osm, ${HOME}/majcadastre/CL322-SAINT-PANTALEON-LES-VIGNES/CL322-SAINT-PANTALEON-LES-VIGNES-houses-simplifie.osm]
Dataset consistency test: No problems found

Plugins:
+ OpeningHoursEditor (33185)
+ PicLayer (33148)
+ buildings_tools (33004)
+ conflation (0.5.3)
+ jts (32699)
+ rex (26)
+ todo (30000)
+ utilsplugin2 (33212)

Last errors/warnings:
- W: No configuration settings found.  Using hardcoded default values for all pools.
- W: Old style SideButton usage for action org.openstreetmap.josm.plugins.todo.TodoDialog$SelectAction@49a746c2
- W: Old style SideButton usage for action org.openstreetmap.josm.plugins.todo.TodoDialog$AddAction@7c630f15
- W: Old style SideButton usage for action org.openstreetmap.josm.plugins.todo.TodoDialog$PassAction@261cc5f4
- W: Old style SideButton usage for action org.openstreetmap.josm.plugins.todo.TodoDialog$MarkAction@6fbf9f8e
- W: Old style SideButton usage for action org.openstreetmap.josm.plugins.todo.TodoDialog$MarkSelectedAction@21039601

Attachments (2)

poc2.png (47.9 KB) - added by bagage 6 months ago.
screenshot of the issue
0001-Key-column-minimal-possile-width.patch (16.3 KB) - added by bagage 8 weeks ago.
patch proposal

Download all attachments as: .zip

Change History (6)

Changed 6 months ago by bagage

Attachment: poc2.png added

screenshot of the issue

comment:1 Changed 6 months ago by bagage

Description: modified (diff)

comment:2 Changed 6 months ago by skyper

Description: modified (diff)

Changed 8 weeks ago by bagage

patch proposal

comment:3 Changed 8 weeks ago by bagage

Hello,

Here's an attempt to fix that issue by using TableColumnAdapter class found here (license: "use at your own risk"): https://tips4java.wordpress.com/2008/11/10/table-column-adjuster/

Everytime tags table data changes (eg when selection changes), columns width is recomputed so that "tag" column is the minimal size while beeing totally displayed.

comment:4 Changed 8 weeks ago by Klumbumbus

Summary: Autoresize Tags/Memberships table to fit content?[patch] Autoresize Tags/Memberships table to fit content?

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 bagage
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.