aboutsummaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorSander Ferdinand <sa.ferdinand@gmail.com>2017-12-08 01:51:22 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-03-29 23:04:02 +0100
commit328eb32a24eef9a59da7bd2e2f1bf22959783f45 (patch)
tree6dbafe8c82d9c1f2578fba4f565aa75d53dcb84a /components
parentf48cd1b82b758c7b4e396e523172f66b9b371c5b (diff)
downloadmonzero-gui-328eb32a24eef9a59da7bd2e2f1bf22959783f45.tar.gz
monzero-gui-328eb32a24eef9a59da7bd2e2f1bf22959783f45.tar.xz
monzero-gui-328eb32a24eef9a59da7bd2e2f1bf22959783f45.zip
Various QML development
Diffstat (limited to 'components')
-rw-r--r--components/InlineButton.qml9
-rw-r--r--components/LineEdit.qml43
-rw-r--r--components/StandardDropdown.qml4
-rw-r--r--components/Style.qml4
4 files changed, 29 insertions, 31 deletions
diff --git a/components/InlineButton.qml b/components/InlineButton.qml
index 11439369..77f88f3d 100644
--- a/components/InlineButton.qml
+++ b/components/InlineButton.qml
@@ -28,10 +28,11 @@
import QtQuick 2.0
import QtQuick.Layouts 1.1
+import "." 1.0
Item {
id: inlineButton
- height: 32 * scaleRatio
+ height: rect.height * scaleRatio
property string shadowPressedColor: "#B32D00"
property string shadowReleasedColor: "#FF4304"
property string pressedColor: "#FF4304"
@@ -50,10 +51,10 @@ Item {
Rectangle{
id: rect
- color: rect.enabled ? "#808080" : "#3b3b3b"
+ color: Style.buttonBackgroundColorDisabled
border.color: "black"
- height: 32
- width: inlineText.width + 22
+ height: 28 * scaleRatio
+ width: inlineText.width + 22 * scaleRatio
radius: 4
anchors.top: parent.top
diff --git a/components/LineEdit.qml b/components/LineEdit.qml
index b1ef6ee6..f1299519 100644
--- a/components/LineEdit.qml
+++ b/components/LineEdit.qml
@@ -40,7 +40,7 @@ Item {
property alias inlineButton: inlineButtonId
property alias inlineButtonText: inlineButtonId.text
property alias inlineIcon: inlineIcon.visible
- property alias copyButton: copyButton.visible
+ property bool copyButton: false
property int fontSize: 18 * scaleRatio
property bool showBorder: true
property bool error: false
@@ -78,14 +78,6 @@ Item {
}
}
- function getColor(error) {
- // @TODO: replace/remove this (implement as ternary?)
- if (error)
- return "transparent"
- else
- return "transparent"
- }
-
Text {
id: inputLabel
anchors.top: parent.top
@@ -106,13 +98,13 @@ Item {
}
Rectangle{
- id: copyButton
+ id: copyButtonRect
color: "#808080"
radius: 3
height: 20
width: 44
anchors.right: parent.right
- visible: false
+ visible: copyButton && input.text !== "" ? true : false
Text {
id: copyButtonText
@@ -137,19 +129,19 @@ Item {
}
}
onEntered: {
- copyButton.color = "#707070";
+ copyButtonRect.color = "#707070";
copyButtonText.opacity = 0.8;
}
onExited: {
+ copyButtonRect.color = "#808080";
copyButtonText.opacity = 1.0;
- copyButton.color = "#808080";
}
}
}
Item{
id: inputItem
- height: 48 * scaleRatio
+ height: 40 * scaleRatio
anchors.top: inputLabel.bottom
anchors.topMargin: 6
width: parent.width
@@ -161,9 +153,9 @@ Item {
anchors.left: parent.left
anchors.leftMargin: inlineIcon.visible ? 50 : 10
opacity: 0.25
- color: "#FFFFFF"
+ color: Style.defaultFontColor
font.family: Style.fontRegular.name
- font.pixelSize: 20 * scaleRatio
+ font.pixelSize: 18 * scaleRatio
text: ""
z: 3
}
@@ -171,24 +163,29 @@ Item {
Rectangle {
anchors.fill: parent
anchors.topMargin: 1 * scaleRatio
- color: getColor(error)
- //radius: 4
+ color: "transparent"
}
Rectangle {
color: "transparent"
border.width: 1
- border.color: Qt.rgba(1, 1, 1, 0.25)
+ border.color: {
+ if(input.activeFocus){
+ return Qt.rgba(255, 255, 255, 0.35);
+ } else {
+ return Qt.rgba(255, 255, 255, 0.25);
+ }
+ }
radius: 4
anchors.fill: parent
}
Image {
id: inlineIcon
- width: 28 * scaleRatio
- height: 28 * scaleRatio
+ width: 26 * scaleRatio
+ height: 26 * scaleRatio
anchors.top: parent.top
- anchors.topMargin: 10 * scaleRatio
+ anchors.topMargin: 8 * scaleRatio
anchors.left: parent.left
anchors.leftMargin: 12 * scaleRatio
source: "../images/moneroIcon-28x28.png"
@@ -212,7 +209,7 @@ Item {
anchors.right: parent.right
anchors.rightMargin: 8
anchors.top: parent.top
- anchors.topMargin: 8
+ anchors.topMargin: 6
}
}
}
diff --git a/components/StandardDropdown.qml b/components/StandardDropdown.qml
index 2818541e..f22cbab0 100644
--- a/components/StandardDropdown.qml
+++ b/components/StandardDropdown.qml
@@ -42,7 +42,7 @@ Item {
signal changed();
- height: 48 * scaleRatio
+ height: 40 * scaleRatio
onExpandedChanged: if(expanded) appWindow.currentItem = dropdown
function hide() { dropdown.expanded = false }
@@ -68,7 +68,7 @@ Item {
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
- height: 48 * scaleRatio
+ height: 40 * scaleRatio
Rectangle {
color: "transparent"
diff --git a/components/Style.qml b/components/Style.qml
index 256f5397..5e1dd26f 100644
--- a/components/Style.qml
+++ b/components/Style.qml
@@ -15,8 +15,8 @@ QtObject {
property string buttonBackgroundColor: "#FA6800"
property string buttonBackgroundColorHover: "#E65E00"
- property string buttonBackgroundColorDisabled: "#3B3B3B"
- property string buttonBackgroundColorDisabledHover: "#4F4F4F"
+ property string buttonBackgroundColorDisabled: "#707070"
+ property string buttonBackgroundColorDisabledHover: "#808080"
property string buttonTextColor: "white"
property string buttonTextColorDisabled: "black"