From 9e0db8f4ffa7d979ffb07cd9d76aee885c261196 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Mon, 7 Aug 2017 15:47:56 +0200 Subject: components mobile scaling --- components/LineEdit.qml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'components/LineEdit.qml') diff --git a/components/LineEdit.qml b/components/LineEdit.qml index 3760fd2a..f7cb0612 100644 --- a/components/LineEdit.qml +++ b/components/LineEdit.qml @@ -36,13 +36,13 @@ Item { property alias readOnly : input.readOnly property alias cursorPosition: input.cursorPosition property alias echoMode: input.echoMode - property int fontSize: 18 + property int fontSize: 18 * scaleRatio property bool error: false signal editingFinished() signal accepted(); signal textUpdated(); - height: 37 + height: 37 * scaleRatio function getColor(error) { if (error) @@ -53,14 +53,14 @@ Item { Rectangle { anchors.fill: parent - anchors.bottomMargin: 1 + anchors.bottomMargin: 1 * scaleRatio color: "#DBDBDB" //radius: 4 } Rectangle { anchors.fill: parent - anchors.topMargin: 1 + anchors.topMargin: 1 * scaleRatio color: getColor(error) //radius: 4 } @@ -68,8 +68,8 @@ Item { Input { id: input anchors.fill: parent - anchors.leftMargin: 4 - anchors.rightMargin: 30 + anchors.leftMargin: 4 * scaleRatio + anchors.rightMargin: 30 * scaleRatio font.pixelSize: parent.fontSize onEditingFinished: item.editingFinished() onAccepted: item.accepted(); -- cgit v1.2.3