Fix QQuickText alignment when lineHeight is set
authorDaiwei Li <daiweili@suitabletech.com>
Mon, 15 Dec 2014 05:31:30 +0000 (21:31 -0800)
committerDaiwei Li <daiweili@suitabletech.com>
Tue, 16 Dec 2014 21:11:19 +0000 (22:11 +0100)
commit119508602ea5fcd6cce135e547e6aef9bb93beeb
tree8576cdcee295e9607c8443a8d4932eecc0852fd5
parent2a0d1cc3794394107652d979051cb050e4615a36
Fix QQuickText alignment when lineHeight is set

Text is always aligned to the top of the lineHeight rectangle,
and no offset is added when verticalAlignment is set to AlignVCenter
or AlignBottom. This change adds an offset based on the lineHeight
and font height in those cases.

Task-number: QTBUG-42050
Change-Id: Ibc63c80d4178b0f5c498cc126156df828855fd76
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
src/quick/items/qquicktext.cpp
src/quick/items/qquicktext_p_p.h