From 0195213139888a048099370430568fc0b2224243 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Thu, 16 Sep 2010 16:36:59 +0200 Subject: Tweak blob example a bit --- examples/blob/Button.qml | 4 +++- examples/blob/blob.qml | 41 +++++++++++++++++++++-------------------- examples/blob/blobsallad.js | 2 +- 3 files changed, 25 insertions(+), 22 deletions(-) diff --git a/examples/blob/Button.qml b/examples/blob/Button.qml index f961261..ccf6df2 100644 --- a/examples/blob/Button.qml +++ b/examples/blob/Button.qml @@ -50,7 +50,8 @@ Rectangle { signal clicked - width: buttonLabel.width + 40; height: buttonLabel.height + 8 + width: 140; + height: buttonLabel.height + 14 border { width: 1; color: Qt.darker(activePalette.button) } smooth: true radius: 4 @@ -79,5 +80,6 @@ Rectangle { anchors.centerIn: container color: activePalette.buttonText text: container.text + font.pixelSize:20 } } diff --git a/examples/blob/blob.qml b/examples/blob/blob.qml index 53752c1..b1e3ffd 100644 --- a/examples/blob/blob.qml +++ b/examples/blob/blob.qml @@ -6,7 +6,7 @@ Canvas { width:500 height:500 - property color color: "#ffee00" + property color color: "#ffeeaa" Timer { id: heartbeat; @@ -30,26 +30,27 @@ Canvas { onPositionChanged: { Blob.mouseMoved(mouseX, mouseY) } } - Row { - spacing:10 - anchors.top:parent.top + Button { + anchors.bottom:parent.bottom anchors.left:parent.left - anchors.margins:10 - Button { - id:join - text: "Split" - onClicked: Blob.blobColl.split(); - } - Button { - anchors.margins:16 - text: "Join" - onClicked: Blob.blobColl.join(); - } - Button { - anchors.margins:16 - text: "Gravity" - onClicked: Blob.toggleGravity(); - } + anchors.margins:16 + id:join + text: "Split" + onClicked: Blob.blobColl.split(); + } + Button { + anchors.bottom:parent.bottom + anchors.horizontalCenter:parent.horizontalCenter + anchors.margins:16 + text: "Join" + onClicked: Blob.blobColl.join(); + } + Button { + anchors.bottom:parent.bottom + anchors.right:parent.right + anchors.margins:16 + text: "Gravity" + onClicked: Blob.toggleGravity(); } Component.onCompleted: Blob.init() diff --git a/examples/blob/blobsallad.js b/examples/blob/blobsallad.js index 71bbc03..4cfcf43 100644 --- a/examples/blob/blobsallad.js +++ b/examples/blob/blobsallad.js @@ -839,7 +839,7 @@ function Blob(x, y, radius, numPointMasses) else ctx.rotate(ang); - this.drawEars(ctx, scaleFactor); + // this.drawEars(ctx, scaleFactor); this.drawFace(ctx, scaleFactor); ctx.restore(); -- cgit v1.2.3