Files
pay/desktop/widgets/BitcoinValueField.qml
T

54 lines
1.6 KiB
QML
Raw Permalink Normal View History

2020-10-15 19:18:54 +02:00
/*
* This file is part of the Flowee project
2021-01-06 15:07:01 +01:00
* Copyright (C) 2020-2021 Tom Zander <tom@flowee.org>
2020-10-15 19:18:54 +02:00
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
2021-05-23 00:27:34 +02:00
import QtQuick 2.11
import QtQuick.Controls 2.11
2020-06-12 20:53:01 +02:00
import Flowee.org.pay 1.0
2020-10-16 18:17:56 +02:00
/*
* Similar to TextField, this is a wrapper around BitcoinAmountLabel
* in order to provide a background and ediing capabilities.
*/
MoneyValueField {
2020-06-12 23:37:32 +02:00
id: root
implicitHeight: balance.height + 16
implicitWidth: balance.width + 16
2020-06-12 20:53:01 +02:00
2020-10-24 12:50:18 +02:00
property alias fontPtSize: balance.fontPtSize
2021-05-08 00:03:07 +02:00
property double baselineOffset: balance.baselineOffset + balance.y
2021-01-18 14:27:24 +01:00
2020-06-12 20:53:01 +02:00
BitcoinAmountLabel {
id: balance
x: 8
y: 8
2020-06-12 23:37:32 +02:00
value: root.value
2020-06-12 20:53:01 +02:00
colorize: false
2020-06-12 23:37:32 +02:00
visible: !root.activeFocus
color: unit.palette.text
2021-05-08 00:03:07 +02:00
showFiat: false
2020-06-12 20:53:01 +02:00
}
2020-10-15 19:18:54 +02:00
Label {
2020-06-12 20:53:01 +02:00
id: unit
2021-11-02 19:29:14 +01:00
text: Pay.unitName
2020-06-12 20:53:01 +02:00
y: 8
anchors.right: parent.right
anchors.rightMargin: 8
2020-06-12 23:37:32 +02:00
visible: root.activeFocus
2020-06-12 20:53:01 +02:00
}
}