Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#3761 closed defect (fixed)

[PATCH] "Colour" label has edges slightly cut off in Match Setup

Reported by: WelshWhale Owned by: mko
Priority: Nice to Have Milestone: Alpha 21
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description (last modified by elexis)

I have recently noticed that in the Match Setup that the "Colour" label is slightly cut off at the beginning with part of the "C" not there, and at the end with most of the "r" not there:

https://i.stack.imgur.com/t1zwN.png


OS Information:

No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 15.10
Release:	15.10
Codename:	wily
Flavour: GNOME
GNOME Version: 3.18

Package Information:

0ad:
  Installed: 0.0.19-0ubuntu1~15.10~wfg1
  Candidate: 0.0.19-0ubuntu1~15.10~wfg1
  Version table:
 *** 0.0.19-0ubuntu1~15.10~wfg1 0
        500 http://ppa.launchpad.net/wfg/0ad/ubuntu/ wily/main amd64 Packages
        100 /var/lib/dpkg/status
     0.0.18-2 0
        500 http://archive.ubuntu.com/ubuntu/ wily/universe amd64 Packages

Attachments (6)

t3761_v1.patch (897 bytes ) - added by Sergey Kushnirenko 8 years ago.
t3761_v2.patch (6.8 KB ) - added by mko 8 years ago.
patch from git
t3761_v3.patch (4.1 KB ) - added by mko 8 years ago.
t3761_v4.2.patch (1.3 KB ) - added by mko 8 years ago.
t3761_v4.patch (1.3 KB ) - added by mko 8 years ago.
longstrings.7z (215.9 KB ) - added by elexis 8 years ago.
Result of the patch looks much better. Here the mock language "long". Unzip to binaries/data/mods/public/l10n, select and retry with 1024x768. Can you do something about the buttons in the civ column? They seem to cutoff the team row too. 1024x768 is the smallest resolution supported, so supporting that with these strings should cover all existing cases for now.

Download all attachments as: .zip

Change History (29)

comment:1 by elexis, 8 years ago

Component: Core engineUI & Simulation
Description: modified (diff)
Keywords: simple added

comment:2 by elexis, 8 years ago

The python script in source/tools/i18n/generateLongStringTranslations.py can be used to generate a translation where every string contains the longest available translation of that text.

This can be used to check if all translations fit into label.

by Sergey Kushnirenko, 8 years ago

Attachment: t3761_v1.patch added

comment:3 by Sergey Kushnirenko, 8 years ago

Keywords: review patch added
Milestone: BacklogAlpha 20

comment:4 by Sergey Kushnirenko, 8 years ago

Summary: "Colour" label has edges slightly cut off in Match Setup[PATCH] "Colour" label has edges slightly cut off in Match Setup

comment:5 by Itms, 8 years ago

Keywords: review removed
Milestone: Alpha 20Alpha 21

This change is not enough for some languages (French for instance) and the dropdown is cut too, it would be nice to fix that at once, if possible.

Thanks for working on it :)

comment:6 by elexis, 8 years ago

Backlogging due to lack of progress.

comment:7 by elexis, 8 years ago

Milestone: Alpha 21Backlog

comment:8 by mko, 8 years ago

Owner: set to mko
Status: newassigned

comment:9 by mko, 8 years ago

Resolution: fixed
Status: assignedclosed

comment:10 by mko, 8 years ago

Keywords: review added; simple removed
Milestone: BacklogAlpha 21

by mko, 8 years ago

Attachment: t3761_v2.patch added

patch from git

comment:11 by elexis, 8 years ago

Keywords: simple added; review removed
Milestone: Alpha 21Backlog
Resolution: fixed
Status: closedreopened
  • Don't close a ticket as fixed if its not fixed. It is not fixed since the code isn't committed (see also wiki: SubmittingPatches)
  • Trailing whitespace in the XML
  • The dropdown height is increased for no reason and beyond the size of the actual row
  • Same goes for increasing the size of the map height, the change doesn't introduce any benefit at all
  • Did you actually try that python tool mentioned above?

comment:12 by mko, 8 years ago

  • Thank for your comment. And sorry for my bad process but it is my first patch in 0Ad.
  • I read the wiki and I did not see where I have to commit myself my patch ("One of the core developers ... When it's considered okay, they should commit it to SVN."). Can you confirm this?
  • Furthermore, can I push patch with git; because I am not the permission with my count.
  • "Trailing whitespace" : Can you explain to me where I do that? I don t understand.
  • "The dropdow" : I resize it, but it is right that it is not necessary (In window mode, the title is on two lines and the text is over the bellow line). I send a new patch with this fixed.
  • "python tool" : no, I didn t.

by mko, 8 years ago

Attachment: t3761_v3.patch added

comment:13 by elexis, 8 years ago

  • Procedure: You upload a patch, we will commit it if it's good (so always add the review keyword if you think you addressed all comments)
  • Trailing whitespace: You actually didn't add it, but the lines that you changed have it and it should be removed (also two spaces between the XML attributes)
  • The idea of the python tool is to generate a mock language that shows the longest string for every language. This way you can test that the size works for all languages, not only that reported one. I can upload that language pack if you can't execute python.

Review:

  • Don't forget to update your repository, r18459 changed that code meanwhile.
  • Your patch changes a 100% to 100, moving the Color label to the wrong place.
  • The color dropdown size shouldn't be changed, as it should only show that arrow.
  • The height change is incomplete as the text and the button/icons are not aligned anymore. Why did you change the height at all? Is it to allow linebreaking for the player-label?

comment:14 by mko, 8 years ago

  • I update my repo. before make the patch.
  • I test my patch with longest strings translation in fullscreen and windowed mode.
  • I remove all other corrections than Color label (but without my previous correction, in full windowed mode the render is not nice because the dropdown is not sized correctly).

comment:15 by mko, 8 years ago

Keywords: review added; simple removed
Milestone: BacklogAlpha 21

by mko, 8 years ago

Attachment: t3761_v4.2.patch added

by mko, 8 years ago

Attachment: t3761_v4.patch added

by elexis, 8 years ago

Attachment: longstrings.7z added

Result of the patch looks much better. Here the mock language "long". Unzip to binaries/data/mods/public/l10n, select and retry with 1024x768. Can you do something about the buttons in the civ column? They seem to cutoff the team row too. 1024x768 is the smallest resolution supported, so supporting that with these strings should cover all existing cases for now.

comment:16 by mko, 8 years ago

I add a new patch with civ column.

Others points,in low resolution or windowed mode with longest strings translation:

  • the text is cut when the row has text on more than one line, and .
  • the letters 'j' are cut too in row title.

Do you think we have to change the size of row for these cases.

comment:17 by Itms, 8 years ago

Keywords: rfc added; review removed

Move tickets from the review queue to the rfc one.

comment:18 by Vladislav Belov, 8 years ago

Is it working in all languages and for all columns? Maybe we need to calculate a column width from maximum of a content width and some fixed/constant (for current resolution) value?

comment:19 by Stan, 8 years ago

There is a special language that gathers all the longest strings to test it.

in reply to:  19 comment:20 by Vladislav Belov, 8 years ago

Replying to stanislas69:

There is a special language that gathers all the longest strings to test it.

Yes, but the patch changes the constant value, which doesn't depend on this language.

comment:21 by elexis, 8 years ago

Autoresizing will be error prone since some of the fields (the two playername columns) can be come arbitrarily long and look ugly. Also changing column sizes when changing the map or something would also be wrong. The columns are also not user-resizable which sounds like it were needed if we start autoresizing them.

As mentioned above it should just be tested with the the smallest res 1024x768 and the long-strings language.

comment:22 by elexis, 8 years ago

Resolution: fixed
Status: reopenedclosed

In 18739:

Gamesetup player assignment column header position adjustment for the smallest supported resolution 1024x768.

Increase the size of the color label by stealing some space from neighboring fields,
so it works for all translations with the minimum resolution, fixes #3761, refs #1580.

Right-align civ-info and reset buttons with the dropdowns for consistent appearance, refs #3805.
Ensure column headers/buttons can't overlap by giving neighboring fields identical left/right values.

comment:23 by elexis, 8 years ago

Keywords: rfc removed
Note: See TracTickets for help on using tickets.