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

TextFieldStyle messes up TextField.baseline

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.2.0
    • Fix Version/s: 5.3.0
    • Component/s: Quick: Controls 1
    • Labels:
      None
    • Environment:
      Linux, Fedora, 64bit, qmlsceneviewer
    • Commits:
      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

          For Gerrit Dashboard: QTBUG-36529
          # Subject Branch Project Status CR V

            Activity

              People

              Assignee:
              smd Jan Arve
              Reporter:
              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