From 6b28f039963f32cf5f4c62f2a854ceb4453ecaae Mon Sep 17 00:00:00 2001 From: Shaun Reich Date: Tue, 3 Jan 2012 18:45:31 -0500 Subject: [PATCH] Use QtQuick 1.1 for PlasmaComponents.Label. Take advantage of the new var: lineCount, as opposed to paintedHeight. --- declarativeimports/plasmacomponents/qml/Label.qml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/declarativeimports/plasmacomponents/qml/Label.qml b/declarativeimports/plasmacomponents/qml/Label.qml index d1349dcee..41922b82d 100644 --- a/declarativeimports/plasmacomponents/qml/Label.qml +++ b/declarativeimports/plasmacomponents/qml/Label.qml @@ -22,7 +22,7 @@ Inherits: Text Imports: - QtQuick 1.0 + QtQuick 1.1 org.kde.plasma.core Description: @@ -41,15 +41,14 @@ Signals: See the primitive QML Text element **/ -import QtQuick 1.0 +import QtQuick 1.1 import org.kde.plasma.core 0.1 as PlasmaCore Text { id: root height: Math.max(paintedHeight, theme.defaultFont.mSize.height*1.6) - //FIXME: wait to rely on 1.1 for lineCount > 1 - verticalAlignment: paintedHeight > theme.defaultFont.mSize.height*1.5 ? Text.AlignTop : Text.AlignVCenter + verticalAlignment: lineCount > 1 ? Text.AlignTop : Text.AlignVCenter font.capitalization: theme.defaultFont.capitalization font.family: theme.defaultFont.family