diff options
author | Alex Blasche <alexander.blasche@qt.io> | 2017-06-22 16:38:06 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@qt.io> | 2017-06-28 07:05:44 +0000 |
commit | 9fcdb6bc25ee55bd0900b35734c58c9313f5b974 (patch) | |
tree | b27e7eb3a16f0d45f2751188ec718a0acb41745f /examples/bluetooth/pingpong/assets/Menu.qml | |
parent | 0b475c565843e6c0901558d6342a02722d57acbc (diff) |
Improve pingpong example
The following adjustments were done:
- Use new Qt connect syntax
- Add QLoggingCatergory enablers (easy to enable by uncommenting)
- Makes the UI more robust to High vs Low DPI issues
Change-Id: Iad99a67ac375de828883b4add99d440f7a6994c6
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'examples/bluetooth/pingpong/assets/Menu.qml')
-rw-r--r-- | examples/bluetooth/pingpong/assets/Menu.qml | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/examples/bluetooth/pingpong/assets/Menu.qml b/examples/bluetooth/pingpong/assets/Menu.qml index b7516262..09eabb36 100644 --- a/examples/bluetooth/pingpong/assets/Menu.qml +++ b/examples/bluetooth/pingpong/assets/Menu.qml @@ -47,17 +47,18 @@ Rectangle { Rectangle { width: parent.width - height: 70 + height: headerText.implicitHeight *1.2 border.width: 1 border.color: "#363636" radius: 5 Text { + id: headerText horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter anchors.fill: parent text: "Welcome to PingPong Game \n Please select an option" - font.pixelSize: 20 + font.pointSize: 20 elide: Text.ElideMiddle color: "#363636" } @@ -67,10 +68,11 @@ Rectangle { id: startServer anchors.centerIn: parent width: parent.width/2 - height: parent.height/5 + height: startServerText.implicitHeight*5 color: "#363636" Text { + id: startServerText horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter anchors.fill: parent @@ -95,10 +97,11 @@ Rectangle { anchors.top: startServer.bottom anchors.topMargin: 10 width: parent.width/2 - height: parent.height/5 + height: startClientText.implicitHeight*5 color: "#363636" Text { + id: startClientText horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter anchors.fill: parent |