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

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

          Activity

            People

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

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There is 1 open Gerrit change