summaryrefslogtreecommitdiffstats
path: root/examples/declarative/tutorials/gettingStarted/parts/part3
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/tutorials/gettingStarted/parts/part3')
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part3/Button.qml12
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part3/EditMenu.qml2
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part3/FileMenu.qml6
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part3/MenuBar.qml14
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part3/TextArea.qml2
-rw-r--r--examples/declarative/tutorials/gettingStarted/parts/part3/TextEditor.qml2
6 files changed, 19 insertions, 19 deletions
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part3/Button.qml b/examples/declarative/tutorials/gettingStarted/parts/part3/Button.qml
index 78b38aee..e39814ed 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part3/Button.qml
+++ b/examples/declarative/tutorials/gettingStarted/parts/part3/Button.qml
@@ -50,20 +50,20 @@ Rectangle {
//these properties act as constants, useable outside this QML file
property int buttonHeight: 75
property int buttonWidth: 150
-
+
//the color highlight when the mouse hovers on the rectangle
property color onHoverColor: "gold"
property color borderColor: "white"
//buttonColor is set to the button's main color
- property color buttonColor: "lightblue"
+ property color buttonColor: "lightblue"
//set appearance properties
radius:10
smooth: true
border{color: "white"; width: 3}
width: buttonWidth; height: buttonHeight
-
+
Text{
id: buttonLabel
anchors.centerIn: parent
@@ -77,11 +77,11 @@ Rectangle {
}
//define the clickable area to be the whole rectangle
- MouseArea{
+ MouseArea{
id: buttonMouseArea
anchors.fill: parent //stretch the area to the parent's dimension
onClicked: buttonClick()
-
+
//if true, then onEntered and onExited called if mouse hovers in the mouse area
//if false, a button must be clicked to detect the mouse hover
hoverEnabled: true
@@ -90,7 +90,7 @@ Rectangle {
onEntered: parent.border.color = onHoverColor
//remove the border if the mouse exits the button mouse area
onExited: parent.border.color = borderColor
-
+
}
//change the color of the button when pressed
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part3/EditMenu.qml b/examples/declarative/tutorials/gettingStarted/parts/part3/EditMenu.qml
index 5e825755..a753edd3 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part3/EditMenu.qml
+++ b/examples/declarative/tutorials/gettingStarted/parts/part3/EditMenu.qml
@@ -60,7 +60,7 @@ Rectangle {
buttonColor: "lightgrey"
label: "Cut"
}
-
+
Button{
buttonColor: "grey"
id: saveButton
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part3/FileMenu.qml b/examples/declarative/tutorials/gettingStarted/parts/part3/FileMenu.qml
index d53e1f3d..46537a1e 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part3/FileMenu.qml
+++ b/examples/declarative/tutorials/gettingStarted/parts/part3/FileMenu.qml
@@ -49,9 +49,9 @@ Rectangle {
//generous amount of screen space that will allow the buttons to fit
height: 480; width:1000
- color: "#6C646A"
+ color: "#6C646A"
- //a sub-rectangle allows the flexibility of setting the row area
+ //a sub-rectangle allows the flexibility of setting the row area
Rectangle{
id:actionContainer
@@ -70,7 +70,7 @@ Rectangle {
buttonColor: "lightgrey"
label: "Load"
}
-
+
Button{
buttonColor: "grey"
id: saveButton
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part3/MenuBar.qml b/examples/declarative/tutorials/gettingStarted/parts/part3/MenuBar.qml
index d2131eeb..e2617651 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part3/MenuBar.qml
+++ b/examples/declarative/tutorials/gettingStarted/parts/part3/MenuBar.qml
@@ -50,12 +50,12 @@ Rectangle {
//container for the header and the buttons
Rectangle{
-
+
id: labelList
height:parent.height/10
width: parent.width
color: "steelblue"
-
+
//default z is 0, items with higher z values are shown on top of items with lower z values
z: 1
@@ -82,16 +82,16 @@ Rectangle {
width: 50
id: editButton
buttonColor : menuListView.currentIndex == 1? editColor : Qt.darker(editColor, 1.5)
- scale: menuListView.currentIndex == 1? 1.25: 1
+ scale: menuListView.currentIndex == 1? 1.25: 1
label: "Edit"
radius: 1
//on a button click, change the list's currently selected item to EditMenu
onButtonClick: {
- menuListView.currentIndex = 1
+ menuListView.currentIndex = 1
}
-
+
}
@@ -111,7 +111,7 @@ Rectangle {
color: editColor
width: menuListView.width
height: menuBar.height
-
+
}
}
@@ -129,7 +129,7 @@ Rectangle {
//control the movement of the menu switching
snapMode: ListView.SnapOneItem
orientation: ListView.Horizontal
- boundsBehavior: Flickable.StopAtBounds
+ boundsBehavior: Flickable.StopAtBounds
flickDeceleration: 5000
highlightFollowsCurrentItem: true
highlightMoveDuration:240
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part3/TextArea.qml b/examples/declarative/tutorials/gettingStarted/parts/part3/TextArea.qml
index ece97fec..4d3ddb33 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part3/TextArea.qml
+++ b/examples/declarative/tutorials/gettingStarted/parts/part3/TextArea.qml
@@ -71,7 +71,7 @@ Rectangle {
width:parent.width; height:parent.height
color:"midnightblue"
focus: true
-
+
wrapMode: TextEdit.Wrap
onCursorRectangleChanged: flickArea.ensureVisible(cursorRectangle)
diff --git a/examples/declarative/tutorials/gettingStarted/parts/part3/TextEditor.qml b/examples/declarative/tutorials/gettingStarted/parts/part3/TextEditor.qml
index a535c0fc..679e4f4f 100644
--- a/examples/declarative/tutorials/gettingStarted/parts/part3/TextEditor.qml
+++ b/examples/declarative/tutorials/gettingStarted/parts/part3/TextEditor.qml
@@ -47,7 +47,7 @@ Rectangle {
border.color:"black"
//the screen is partitioned into the MenuBar and TextArea. 1/3 of the screen is assigned to the MenuBar
property int partition: height/3
-
+
MenuBar{
id:menuBar
height: partition