xale / iTetrinet

TetriNET Client Developed for Mac OS X 10.5 Leopard
21 stars 9 forks source link

Key-image width adjustment #71

Closed xale closed 14 years ago

xale commented 14 years ago

Since many keys on the keyboard are wider than the text they contain, (for instance, the return and delete keys, and especially the space bar) the key name strings previously contained spaces around the wider keys, to "pad out" the width when the key was drawn.

This mechanism is fragile, hacky, and completely incompatible with localization (since key-name-lengths will vary drastically from one language to another.) These padding spaces have been removed, but there is currently no replacement mechanism to fix the relative-key-widths issue.

xale commented 14 years ago

Implementation note: the best way to do this is probably to add a "minimum display width" ivar to the Key-Name Pair class, and populate this field for wide keys, then check that this minimum width is achieved when drawing the key image.

xale commented 14 years ago

Added in development branch, b9081eae810a62c29a35800a4d2cf72a5d8ea4d4; ticket will remain open until merged into master.

xale commented 14 years ago

Merged into master by 459839c8f00495db6c2af1d7ca25b9e3cad469ff.