diff options
author | Andreas Buhr <andreas@andreasbuhr.de> | 2021-03-02 15:03:04 +0100 |
---|---|---|
committer | Andreas Buhr <andreas@andreasbuhr.de> | 2021-03-03 11:14:59 +0100 |
commit | d031ee460d4945ebc2c13961591bf56f221950f4 (patch) | |
tree | 09dce8fd868bbfe2dcd5d9df46a746f993c84f08 | |
parent | ef7e12a5fdb13fb54de83fbcf8e51aeafb3ad9ac (diff) |
Pingpong example: make paddle shape independent of scale
This patch changes the paddle radius to be half of its width.
This way, the shape is independent of the size of the window.
Change-Id: I1a959293e7cab0fdf320e879f828592b2b3b5f1a
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r-- | examples/bluetooth/pingpong/assets/Board.qml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/bluetooth/pingpong/assets/Board.qml b/examples/bluetooth/pingpong/assets/Board.qml index 576772bf..61e6bc45 100644 --- a/examples/bluetooth/pingpong/assets/Board.qml +++ b/examples/bluetooth/pingpong/assets/Board.qml @@ -89,7 +89,7 @@ Rectangle { height: (parent.height/5) anchors.left: parent.left color: "#363636" - radius: 10 + radius: width/2 MouseArea { id: leftMouse @@ -110,7 +110,7 @@ Rectangle { height: (parent.height/5) anchors.right: parent.right color: "#363636" - radius: 10 + radius: width/2 MouseArea { id: rightMouse |