Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-49468

Missing baseline offsets

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.6.0 RC
    • 5.6.0 Alpha
    • Quick: Controls 2
    • 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
          }
      }
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            jpnurmi J-P Nurmi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes