diff --git a/interface/resources/qml/Browser.qml b/interface/resources/qml/Browser.qml new file mode 100644 index 0000000000..d7e08fbd97 --- /dev/null +++ b/interface/resources/qml/Browser.qml @@ -0,0 +1,45 @@ +import QtQuick 2.3 +import QtQuick.Controls 1.2 +import QtQuick.Window 2.2 +import QtQuick.Dialogs 1.2 +import QtQuick.Controls.Styles 1.3 +import QtWebKit 3.0 + +CustomDialog { + title: "Test Dlg" + id: testDialog + objectName: "Browser" + width: 1280 + height: 720 + + Item { + id: clientArea + // The client area + anchors.fill: parent + anchors.margins: parent.margins + anchors.topMargin: parent.topMargin + + + ScrollView { + anchors.fill: parent + WebView { + id: webview + url: "http://slashdot.org" + anchors.fill: parent + } + } + + } + + +} + + +/* + +// This is the behavior, and it applies a NumberAnimation to any attempt to set the x property + +MouseArea { + anchors.fill: parent +} +*/ diff --git a/interface/resources/qml/TestDialog.qml b/interface/resources/qml/TestDialog.qml index 9c8bcccd75..8ce68413b6 100644 --- a/interface/resources/qml/TestDialog.qml +++ b/interface/resources/qml/TestDialog.qml @@ -4,34 +4,20 @@ import QtQuick.Window 2.2 import QtQuick.Dialogs 1.2 import QtQuick.Controls.Styles 1.3 -Item { - objectName: "TestDialog" +CustomDialog { + title: "Test Dlg" id: testDialog - width: 384 - height: 384 + objectName: "TestDialog" + width: 512 + height: 512 scale: 0.0 - onEnabledChanged: { - scale = enabled ? 1.0 : 0.0 - } - onScaleChanged: { - visible = (scale != 0.0); - } - Component.onCompleted: { - scale = 1.0 - } - Behavior on scale { - NumberAnimation { - //This specifies how long the animation takes - duration: 400 - //This selects an easing curve to interpolate with, the default is Easing.Linear - easing.type: Easing.InOutBounce - } - } - - CustomDialog { - title: "Test Dlg" + Item { + id: clientArea + // The client area anchors.fill: parent + anchors.margins: parent.margins + anchors.topMargin: parent.topMargin Rectangle { property int d: 100 @@ -55,16 +41,18 @@ Item { anchors.top: parent.top anchors.topMargin: parent.titleSize + 12 } - + CustomButton { x: 128 y: 192 + text: "Test" anchors.bottom: parent.bottom anchors.bottomMargin: 12 anchors.right: parent.right anchors.rightMargin: 12 onClicked: { console.log("Click"); + if (square.visible) { square.visible = false } else { @@ -76,7 +64,7 @@ Item { CustomButton { id: customButton2 y: 192 - text: "Close" + text: "Move" anchors.left: parent.left anchors.leftMargin: 12 anchors.bottom: parent.bottom