aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/StyledTextField.qml
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-08 07:30:08 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-08 11:14:10 -0700
commit829369c18acea2b7ddf421559f924aaf2d3366ef (patch)
treee5f57e2100ef06c8bade35e42af6e85f84c2bb22 /mobile-widgets/qml/StyledTextField.qml
parentdf2e7c052bffcc69d8409c9753a338f500b00bdf (diff)
downloadsubsurface-829369c18acea2b7ddf421559f924aaf2d3366ef.tar.gz
QML UI: make readonly fields more obvious in dive edit
Remove the border and make them look more like labels. This adds a StyledTextField for that purpose. And while we are at it, we can make that StyledTextField a little prettier. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qml/StyledTextField.qml')
-rw-r--r--mobile-widgets/qml/StyledTextField.qml17
1 files changed, 17 insertions, 0 deletions
diff --git a/mobile-widgets/qml/StyledTextField.qml b/mobile-widgets/qml/StyledTextField.qml
new file mode 100644
index 000000000..fdb61b7b8
--- /dev/null
+++ b/mobile-widgets/qml/StyledTextField.qml
@@ -0,0 +1,17 @@
+import QtQuick 2.3
+import QtQuick.Controls 1.2
+import QtQuick.Controls.Styles 1.2
+
+TextField {
+ property bool fixed: false
+ readOnly: fixed
+ style: TextFieldStyle {
+ background: Rectangle {
+ color: fixed ? "transparent" : "white"
+ radius: 4
+ border.width: 0.5
+ border.color: fixed ? "transparent" : "#c0c0c0"
+ }
+ }
+
+}