From c6012d23e39b183f537fb19255fb992e010ee16b Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 11 Mar 2015 22:19:39 +0100 Subject: [PATCH] Small changes --- mix/qml/WebPreview.qml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/mix/qml/WebPreview.qml b/mix/qml/WebPreview.qml index 85595d193..c40bff351 100644 --- a/mix/qml/WebPreview.qml +++ b/mix/qml/WebPreview.qml @@ -1,7 +1,7 @@ import QtQuick 2.0 import QtQuick.Window 2.0 import QtQuick.Layouts 1.0 -import QtQuick.Controls 1.1 +import QtQuick.Controls 1.0 import QtQuick.Controls.Styles 1.1 import QtWebEngine 1.0 import QtWebEngine.experimental 1.0 @@ -274,6 +274,13 @@ Item { } } + Rectangle + { + Layout.preferredHeight: 1 + Layout.preferredWidth: parent.width + color: "#808080" + } + SplitView { Layout.preferredWidth: parent.width @@ -309,7 +316,7 @@ Item { if (expressionInput.text === "" || expressionInput.text === qsTr("Expression")) return; webView.runJavaScript("executeJavaScript(\"" + expressionInput.text.replace(/"/g, '\\"') + "\")", function(result) { - resultTextArea.text = result + "\n\n" + resultTextArea.text; + resultTextArea.text = "> " + result + "\n\n" + resultTextArea.text; expressionInput.text = ""; }); } @@ -328,6 +335,7 @@ Item { Action { id: clearAction + enabled: resultTextArea.text !== "" tooltip: qsTr("Clear") onTriggered: { resultTextArea.text = ""; @@ -356,6 +364,8 @@ Item { { if (!focus && text == "") text = qsTr("Expression"); + if (focus && text === qsTr("Expression")) + text = ""; } style: TextFieldStyle {