Use QtQuick 1.1 for PlasmaComponents.Label.

Take advantage of the new var: lineCount, as opposed to paintedHeight.
This commit is contained in:
Shaun Reich 2012-01-03 18:45:31 -05:00
parent 4bf3597b2d
commit 6b28f03996

View File

@ -22,7 +22,7 @@ Inherits:
Text Text
Imports: Imports:
QtQuick 1.0 QtQuick 1.1
org.kde.plasma.core org.kde.plasma.core
Description: Description:
@ -41,15 +41,14 @@ Signals:
See the primitive QML Text element See the primitive QML Text element
**/ **/
import QtQuick 1.0 import QtQuick 1.1
import org.kde.plasma.core 0.1 as PlasmaCore import org.kde.plasma.core 0.1 as PlasmaCore
Text { Text {
id: root id: root
height: Math.max(paintedHeight, theme.defaultFont.mSize.height*1.6) height: Math.max(paintedHeight, theme.defaultFont.mSize.height*1.6)
//FIXME: wait to rely on 1.1 for lineCount > 1 verticalAlignment: lineCount > 1 ? Text.AlignTop : Text.AlignVCenter
verticalAlignment: paintedHeight > theme.defaultFont.mSize.height*1.5 ? Text.AlignTop : Text.AlignVCenter
font.capitalization: theme.defaultFont.capitalization font.capitalization: theme.defaultFont.capitalization
font.family: theme.defaultFont.family font.family: theme.defaultFont.family