diff options
author | Kari Oikarinen <kari.oikarinen@qt.io> | 2017-04-28 15:45:22 +0300 |
---|---|---|
committer | Kari Oikarinen <kari.oikarinen@qt.io> | 2018-08-28 10:11:43 +0000 |
commit | 1810562378787224997a8476a46efa2030a8caef (patch) | |
tree | 97e2c7843cf371cba9218493e36a77d8a7f83afd /qml/MainWindow.qml | |
parent | d1d81167b5621ee4bd4d3636c7ffc4df9602a22c (diff) |
Move FPS indicator to its own QML file
Change-Id: I34670b95f8fe1bce49042734e168bfff6b3e78b4
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
Diffstat (limited to 'qml/MainWindow.qml')
-rw-r--r-- | qml/MainWindow.qml | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/qml/MainWindow.qml b/qml/MainWindow.qml index 060b9b5..0249773 100644 --- a/qml/MainWindow.qml +++ b/qml/MainWindow.qml @@ -319,28 +319,8 @@ Item { } } - Item { - id: fps - opacity: engine.fpsEnabled ? 1 : 0 - Behavior on opacity { NumberAnimation { duration: 500 } } - - anchors.bottom: parent.bottom; - anchors.left: parent.left; - width: fpsLabel.width - height: fpsLabel.height - - Rectangle { - color: "black" - opacity: 0.5 - anchors.fill: fpsLabel - } - - Text { - id: fpsLabel; - color: "white" - text: "FPS: " + engine.fps - font.pixelSize: engine.sensibleButtonSize() * 0.2 - } + FpsIndicator { + enabled: engine.fpsEnabled } } } |