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

Slider does not work correctly in RTL locales with no mirroring

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • None
    • 5.9.1
    • Quick: Controls 2
    • None
    • ArchLinux 64bit
      Qt 5.9.1
      Plasma KDE 5.10.5
      Arabic (Bahrain) locale
    • Bug Fixing Week Q2/2020

    Description

      The Slider widget doesn't change the value correctly if it's use in an RTL locale enviroment with no mirroring applied.

      LTR locale (LANG=C for example):
      -No mirroring: dragging the value to "Min." (left) takes it down, dragging it to "Max." (right) takes it up.
      -With mirroring: dragging the value to "Min." (right) takes it down, dragging it to "Max." (left) takes it up.
      RTL locale (LANG=ar_BH.utf8 for example):
      -No mirroring: dragging the value to "Min." (left) takes it up, dragging it to "Max." (right) takes it down.
      -With mirroring: dragging the value to "Min." (right) takes it down, dragging it to "Max." (left) takes it up.

      The --reverse parameter didn't reproduce this for me.

       

      import QtQuick 2.7
      import QtQuick.Controls 2.2
      import QtQuick.Layouts 1.3
      ApplicationWindow {
          visible: true
          minimumWidth: 400
          minimumHeight: 100
          locale: Qt.locale("ar_BH")
          //LayoutMirroring.enabled: true
          LayoutMirroring.childrenInherit: true
          RowLayout {
              anchors.fill: parent
              Label {text: "Min."}
              Slider {
                  Layout.fillWidth: true
                  value: 0.5
                  onValueChanged: console.log(value)
              }
              Label {text: "Max."}
          }
      }
      

      Attachments

        Issue Links

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

          Activity

            People

              mitch_curtis Mitch Curtis
              safa alfulaij Safa Alfulaij
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There is 1 open Gerrit change