[Kmymoney-devel] [Bug 295883] Layout in ledger view much too wide

Cristian Oneț onet.cristian at gmail.com
Sat May 12 12:54:28 UTC 2012


https://bugs.kde.org/show_bug.cgi?id=295883

Cristian Oneț <onet.cristian at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|http://commits.kde.org/kmym |http://commits.kde.org/kmym
                   |oney/b7993aeaf9184345310527 |oney/c93bfa3c47d1db4c43ba3d
                   |ae8e5acd3237dfe3e7          |a33d693e81613295fd

--- Comment #14 from Cristian Oneț <onet.cristian at gmail.com> ---
Git commit c93bfa3c47d1db4c43ba3da33d693e81613295fd by Cristian Oneț.
Committed on 12/05/2012 at 14:42.
Pushed by conet into branch '4.6'.

Use a safer way to set the minimum width of the account combo.

Using QFontMetrics::maxWidth() was a bad idea because some fonts could
contain really wide characters (with a very low probability of appearing
in the account names) - see the bug that is fixed.

Instead of the width of the widest character in the font use the width of
the 'W' character which will produce a much more predictable result.

Even the Qt implementation uses the width of a know character ('x') to
compute a kind of minimum size.
(cherry picked from commit b7993aeaf9184345310527ae8e5acd3237dfe3e7)

M  +2    -6    kmymoney/widgets/kmymoneyaccountcombo.cpp
M  +2    -3    kmymoney/widgets/kmymoneycompletion.cpp

http://commits.kde.org/kmymoney/c93bfa3c47d1db4c43ba3da33d693e81613295fd

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the KMyMoney-devel mailing list