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

Layout.left/rightMargin doesn't mirror with LayoutMirroring

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.9.1
    • Fix Version/s: None
    • Component/s: Quick: Layouts
    • Labels:
      None
    • Environment:
      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

            • Assignee:
              smd Jan Arve
              Reporter:
              safa alfulaij Safa Alfulaij
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes