aboutsummaryrefslogtreecommitdiff
path: root/components/LineEdit.qml
diff options
context:
space:
mode:
authordsc <xmrdsc@protonmail.com>2019-04-25 21:09:23 +0200
committerdsc <xmrdsc@protonmail.com>2019-04-25 21:09:23 +0200
commit62285b01dc77ef14e4b5b9cc291e34162321ad89 (patch)
tree5ced9d312817ca03be17c242d1e2bd478b4fd1e5 /components/LineEdit.qml
parente1c429110f5f2321ad0113a8097eab966d935dcd (diff)
downloadmonzero-gui-62285b01dc77ef14e4b5b9cc291e34162321ad89.tar.gz
monzero-gui-62285b01dc77ef14e4b5b9cc291e34162321ad89.tar.xz
monzero-gui-62285b01dc77ef14e4b5b9cc291e34162321ad89.zip
Remove scaleRatio
Diffstat (limited to 'components/LineEdit.qml')
-rw-r--r--components/LineEdit.qml38
1 files changed, 19 insertions, 19 deletions
diff --git a/components/LineEdit.qml b/components/LineEdit.qml
index f3016137..68e981fa 100644
--- a/components/LineEdit.qml
+++ b/components/LineEdit.qml
@@ -40,7 +40,7 @@ Item {
property bool placeholderCenter: false
property string placeholderFontFamily: MoneroComponents.Style.fontRegular.name
property bool placeholderFontBold: false
- property int placeholderFontSize: 18 * scaleRatio
+ property int placeholderFontSize: 18
property string placeholderColor: MoneroComponents.Style.defaultFontColor
property real placeholderOpacity: 0.35
@@ -65,7 +65,7 @@ Item {
}
}
- property int fontSize: 18 * scaleRatio
+ property int fontSize: 18
property bool fontBold: false
property alias fontColor: input.color
property bool error: false
@@ -74,19 +74,19 @@ Item {
property alias labelTextFormat: inputLabel.textFormat
property string backgroundColor: "transparent"
property string tipText: ""
- property int labelFontSize: 16 * scaleRatio
+ property int labelFontSize: 16
property bool labelFontBold: false
property alias labelWrapMode: inputLabel.wrapMode
property alias labelHorizontalAlignment: inputLabel.horizontalAlignment
property bool showingHeader: inputLabel.text !== "" || copyButton
- property int inputHeight: 42 * scaleRatio
+ property int inputHeight: 42
signal labelLinkActivated(); // input label, rich text <a> signal
signal editingFinished();
signal accepted();
signal textUpdated();
- height: showingHeader ? (inputLabel.height + inputItem.height + 2) * scaleRatio : 42 * scaleRatio
+ height: showingHeader ? (inputLabel.height + inputItem.height + 2) : 42
onTextUpdated: {
// check to remove placeholder text when there is content
@@ -141,9 +141,9 @@ Item {
Item{
id: inputItem
- height: inputHeight * scaleRatio
+ height: inputHeight
anchors.top: showingHeader ? inputLabel.bottom : parent.top
- anchors.topMargin: showingHeader ? 12 * scaleRatio : 2 * scaleRatio
+ anchors.topMargin: showingHeader ? 12 : 2
width: parent.width
clip: true
@@ -157,14 +157,14 @@ Item {
if(placeholderCenter){
return undefined;
}
- else if(inlineIcon.visible){ return 50 * scaleRatio; }
- else { return 10 * scaleRatio; }
+ else if(inlineIcon.visible){ return 50; }
+ else { return 10; }
}
opacity: item.placeholderOpacity
color: item.placeholderColor
font.family: item.placeholderFontFamily
- font.pixelSize: placeholderFontSize * scaleRatio
+ font.pixelSize: placeholderFontSize
font.bold: item.placeholderFontBold
text: ""
z: 3
@@ -172,7 +172,7 @@ Item {
Rectangle {
anchors.fill: parent
- anchors.topMargin: 1 * scaleRatio
+ anchors.topMargin: 1
color: "transparent"
}
@@ -187,12 +187,12 @@ Item {
Image {
id: inlineIcon
- width: 26 * scaleRatio
- height: 26 * scaleRatio
+ width: 26
+ height: 26
anchors.top: parent.top
- anchors.topMargin: 8 * scaleRatio
+ anchors.topMargin: 8
anchors.left: parent.left
- anchors.leftMargin: 12 * scaleRatio
+ anchors.leftMargin: 12
source: "qrc:///images/moneroIcon-28x28.png"
visible: false
}
@@ -200,21 +200,21 @@ Item {
MoneroComponents.Input {
id: input
anchors.fill: parent
- anchors.leftMargin: inlineIcon.visible ? 44 * scaleRatio : 0
+ anchors.leftMargin: inlineIcon.visible ? 44 : 0
font.pixelSize: item.fontSize
font.bold: item.fontBold
onEditingFinished: item.editingFinished()
onAccepted: item.accepted();
onTextChanged: item.textUpdated()
- topPadding: 10 * scaleRatio
- bottomPadding: 10 * scaleRatio
+ topPadding: 10
+ bottomPadding: 10
}
MoneroComponents.InlineButton {
id: inlineButtonId
visible: item.inlineButtonText ? true : false
anchors.right: parent.right
- anchors.rightMargin: 8 * scaleRatio
+ anchors.rightMargin: 8
}
}
}