Fix regression with Qt::AlignRight on monospaced text in QTextLayout
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Thu, 27 May 2010 11:14:20 +0000 (13:14 +0200)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Thu, 27 May 2010 11:14:20 +0000 (13:14 +0200)
commit3f74a095086f49be23f526a5adc7e65687a19c31
tree982e7ba26f31d07bc48b7a3be98ad07f6364a807
parent4085d3eef59763b91ae63818b5885e1027eef3c1
Fix regression with Qt::AlignRight on monospaced text in QTextLayout

For monospaced fonts, using the width (including the bearing) of the
text to align it to the right hand side, will break alignment of
columns of characters. To fix the problem, we go back to the old
procedure, by using the advance of the text as basis of alignment
instead.

Done-by: thorbjorn
Reviewed-by: Eskil
src/gui/text/qtextlayout.cpp