Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.6.0 Alpha
-
None
-
6980589344b67f6a68e5fa86d3ea89d9f659d842, 408eb756d0a429c7b9c8189b7475b0ddfaa7a21e
Description
All controls that have text, should specify baselineOffset for their root element.
Steps:
- run the following test app
Expected result:
- the text baseline of label & button text matches
Actual result:
- the baseline of the button is at the top of the control
import QtQuick 2.3 import Qt.labs.templates 1.0 as T import Qt.labs.controls 1.0 ApplicationWindow { width: 520 height: 320 visible: true Button { id: button text: "Button" anchors.centerIn: parent } Text { id: label text: "Baseline" anchors.left: parent.left anchors.right: button.left anchors.baseline: button.baseline horizontalAlignment: Text.AlignHCenter } Rectangle { color: "red" opacity: 0.25 width: parent.width height: 1 anchors.baseline: label.baseline } }