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

TextFieldStyle messes up TextField.baseline

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.3.0
    • 5.2.0
    • Quick: Controls 1
    • None
    • Linux, Fedora, 64bit, qmlsceneviewer
    • 41f44e224695789974e2c92db95810e19e6fab49 109889428edc5e4cf25c9fdd11a5e006e8a08630

    Description

      Adding an empty "default" style to a TextField messes up its baseline property. See the following sample code:

      ------------------------

      import QtQuick 2.0
      import QtQuick.Controls 1.1
      import QtQuick.Controls.Styles 1.1

      Rectangle {
      width: 360
      height: 360

      Column {
      Rectangle

      { color: "yellow" height: 100 width: 100 }

      Row {
      spacing: 20
      Text

      { anchors.baseline: text_field_good.baseline text: "correct" }

      TextField

      { id: text_field_good text: "good" }

      }

      Rectangle

      { color: "yellow" height: 100 width: 100 }

      Row {
      spacing: 20
      Text

      { anchors.baseline: text_field_bad.baseline text: "wrong" }

      TextField {
      id: text_field_bad
      text: "bad"
      style: TextFieldStyle {
      }
      }
      }
      }
      }

      Attachments

        Issue Links

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

          Activity

            People

              smd Jan Arve
              rggjan Jan Rüegg
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes