From 8c4eba538af52cce5a57f23c6381bc555a6e659f Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Fri, 22 Aug 2014 11:41:46 +0200 Subject: [PATCH] if our symbols are a different size, they need to be inner centered the unlock key becomes a rect that contains the svg item. a property alias preserves the api --- look-and-feel/contents/lockscreen/LockKey.qml | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/look-and-feel/contents/lockscreen/LockKey.qml b/look-and-feel/contents/lockscreen/LockKey.qml index 1c60afc1..a48d82d5 100644 --- a/look-and-feel/contents/lockscreen/LockKey.qml +++ b/look-and-feel/contents/lockscreen/LockKey.qml @@ -1,12 +1,21 @@ import QtQuick 2.0 import org.kde.plasma.core 2.0 as PlasmaCore -PlasmaCore.SvgItem { - id: square - property int value: 0 +Rectangle { anchors.top: parent.top - width: parent.width/4 + color: "#00000000" + property int value: 0 + property alias elementId: glyph.elementId + width: parent.width / 4 height: parent.height - svg: symbolsSvg -} + PlasmaCore.SvgItem { + id: glyph + anchors.top: parent.top + anchors.horizontalCenter: parent.horizontalCenter + width: Math.min(parent.height, parent.width) + height: parent.height + + svg: symbolsSvg + } +} \ No newline at end of file