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

ScrollBar handle does not move to just center of the mouse position

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • Some future release
    • 5.1.0
    • Quick: Controls 1
    • None
    • Mac OS X 10.8.4
    • c304d741a27b5822a35d1fb83f8f5e65719907ce

    Description

      When I click outside of the handle of the scroll bar in QML ScrollView, the handle position is a bit different than expected.

      import QtQuick 2.1
      import QtQuick.Controls 1.0
      import QtQuick.Controls.Styles 1.0
      
      Rectangle {
          width: 640
          height: 480
          ScrollView {
              anchors.fill: parent
              Item { width: 10000; height: 10000 }
              style: ScrollViewStyle {}
          }
      }
      

      I think that the following code in ScrollBar.qml should add the size of the decrement control.

      slider.position = horizontal ? mouseX -  handleRect.width/2
                                   : mouseY - handleRect.height/2
      

      Attachments

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

        Activity

          People

            bachewii Jens
            sqq S.Gold
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes