Created
August 21, 2014 02:50
-
-
Save rschroll/8f61dd2b35b6ede55c90 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import QtQuick 2.0 | |
import Ubuntu.Components 0.1 | |
MainView { | |
// objectName for functional testing purposes (autopilot-qt5) | |
objectName: "mainView" | |
// Note! applicationName needs to match the "name" field of the click manifest | |
applicationName: "com.ubuntu.developer.username.panel-test" | |
width: units.gu(100) | |
height: units.gu(75) | |
Page { | |
title: "Panel Test" | |
Column { | |
spacing: units.gu(1) | |
anchors { | |
margins: units.gu(2) | |
fill: parent | |
} | |
Button { | |
width: parent.width | |
text: "Open Panel" | |
onClicked: panel.open() | |
} | |
Button { | |
width: parent.width | |
text: "Close Panel" | |
onClicked: panel.close() | |
} | |
} | |
Panel { | |
id: panel | |
anchors.bottom: parent.bottom | |
width: parent.width | |
height: units.gu(8) | |
opened: true | |
Rectangle { | |
anchors.fill: parent | |
color: Theme.palette.normal.overlay | |
Button { | |
anchors.centerIn: parent | |
text: "Close" | |
onClicked: panel.close() | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment