aboutsummaryrefslogtreecommitdiff
path: root/components/InputDialog.qml
diff options
context:
space:
mode:
authorSander Ferdinand <sa.ferdinand@gmail.com>2018-03-23 21:51:28 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-03-29 23:04:04 +0100
commit28608e4ce0dab70ac19b77315b6b2ced220ef6ad (patch)
treec80c12c30dbd5bc51df4671873e95fb7d594ccfb /components/InputDialog.qml
parent2d7ef434becf86ceb15dbeadc141ac49a96a3308 (diff)
downloadmonzero-gui-28608e4ce0dab70ac19b77315b6b2ced220ef6ad.tar.gz
monzero-gui-28608e4ce0dab70ac19b77315b6b2ced220ef6ad.tar.xz
monzero-gui-28608e4ce0dab70ac19b77315b6b2ced220ef6ad.zip
Restyling the dialog boxes a bit more
Diffstat (limited to 'components/InputDialog.qml')
-rw-r--r--components/InputDialog.qml137
1 files changed, 64 insertions, 73 deletions
diff --git a/components/InputDialog.qml b/components/InputDialog.qml
index 2990c5c9..34e9a6e2 100644
--- a/components/InputDialog.qml
+++ b/components/InputDialog.qml
@@ -26,8 +26,8 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import QtQuick 2.0
-import QtQuick.Controls 1.4
+import QtQuick 2.7
+import QtQuick.Controls 2.0
import QtQuick.Dialogs 1.2
import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.4
@@ -38,14 +38,6 @@ import "../components" as MoneroComponents
Item {
id: root
visible: false
- Rectangle {
- id: bg
- z: parent.z + 1
- anchors.fill: parent
- color: "white"
- opacity: 0.9
- }
-
property alias labelText: label.text
property alias inputText: input.text
@@ -78,42 +70,45 @@ Item {
ColumnLayout {
id: column
- //anchors {fill: parent; margins: 16 }
+
+ Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
+ Layout.maximumWidth: 400 * scaleRatio
Label {
id: label
- Layout.alignment: Qt.AlignHCenter
- // Layout.columnSpan: 2
+ anchors.left: parent.left
Layout.fillWidth: true
- horizontalAlignment: Text.AlignHCenter
- font.pixelSize: 18 * scaleRatio
- font.family: "Arial"
- color: "#555555"
+
+ font.pixelSize: 16 * scaleRatio
+ font.family: Style.fontLight
+
+ color: Style.defaultFontColor
}
TextField {
id : input
focus: true
+ Layout.topMargin: 6
Layout.fillWidth: true
- Layout.alignment: Qt.AlignHCenter
- horizontalAlignment: TextInput.AlignHCenter
+ anchors.left: parent.left
+ horizontalAlignment: TextInput.AlignLeft
verticalAlignment: TextInput.AlignVCenter
- font.family: "Arial"
- font.pixelSize: 32 * scaleRatio
- // echoMode: TextInput.Password
+ font.family: Style.fontLight
+ font.pixelSize: 24 * scaleRatio
KeyNavigation.tab: okButton
+ bottomPadding: 10
+ leftPadding: 10
+ topPadding: 10
+ color: Style.defaultFontColor
- style: TextFieldStyle {
- renderType: Text.NativeRendering
- textColor: "#35B05A"
- // passwordCharacter: "•"
- // no background
- background: Rectangle {
- radius: 0
- border.width: 0
- }
+ background: Rectangle {
+ radius: 2
+ border.color: Qt.rgba(255, 255, 255, 0.35)
+ border.width: 1
+ color: "black"
}
+
Keys.onReturnPressed: {
root.close()
root.accepted()
@@ -123,51 +118,47 @@ Item {
root.rejected()
}
}
- // underline
- Rectangle {
- height: 1
- color: "#DBDBDB"
- Layout.fillWidth: true
- Layout.alignment: Qt.AlignHCenter
- anchors.bottomMargin: 3
- }
- // padding
- Rectangle {
- Layout.fillWidth: true
- Layout.alignment: Qt.AlignHCenter
- height: 10
- opacity: 0
- color: "black"
- }
- }
- // Ok/Cancel buttons
- RowLayout {
- id: buttons
- spacing: 60
- Layout.alignment: Qt.AlignHCenter
-
- MoneroComponents.StandardButton {
- id: cancelButton
- width: 120
- fontSize: 14
- text: qsTr("Cancel") + translationManager.emptyString
- KeyNavigation.tab: input
- onClicked: {
- root.close()
- root.rejected()
+
+ // Ok/Cancel buttons
+ RowLayout {
+ id: buttons
+ spacing: 16 * scaleRatio
+ Layout.topMargin: 16
+ Layout.alignment: Qt.AlignRight
+
+ MoneroComponents.StandardButton {
+ id: cancelButton
+ small: true
+ width: 120
+ fontSize: 14
+ text: qsTr("Cancel") + translationManager.emptyString
+ KeyNavigation.tab: input
+ onClicked: {
+ root.close()
+ root.rejected()
+ }
}
- }
- MoneroComponents.StandardButton {
- id: okButton
- width: 120
- fontSize: 14
- text: qsTr("Ok")
- KeyNavigation.tab: cancelButton
- onClicked: {
- root.close()
- root.accepted()
+ MoneroComponents.StandardButton {
+ id: okButton
+ small: true
+ width: 120
+ fontSize: 14
+ text: qsTr("Ok")
+ KeyNavigation.tab: cancelButton
+ onClicked: {
+ root.close()
+ root.accepted()
+ }
}
}
}
}
+
+ Rectangle {
+ id: bg
+ z: parent.z + 1
+ anchors.fill: parent
+ color: "black"
+ opacity: 0.8
+ }
}