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

Layout.left/rightMargin doesn't mirror with LayoutMirroring

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.9.1
    • Quick: Layouts
    • None
    • ArchLinux 64bit
      Plasma KDE 5.10.5

    Description

      The LayoutMirroring attached property doesn't mirror the effect of Layout.leftMargin/rightMargin.

      A workaround to use is having both margins but with “LayoutMirroring.enabled ? ... : 0” condition, and it's too much of work if there are many uses of “Layout” type.
      “layoutDirection” just changes the direction of the items not the margins.

      import QtQuick 2.7
      import QtQuick.Layouts 1.3
      Item {
          width: 400
          height: 100
          //LayoutMirroring.enabled: true
          LayoutMirroring.childrenInherit: true
          RowLayout {
              anchors.fill: parent
              Text {
                  Layout.leftMargin: 50
                  text: "Min."
              }
              Item {Layout.fillWidth: true}
              Text {
                  Layout.leftMargin: 50
                  text: "Max."
              }
          }
      }
      

      Attachments

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

        Activity

          People

            smd Jan Arve
            safa alfulaij Safa Alfulaij
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes