]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Adding calls to updateAccessibility
authorAmandeep Singh <aman.dedman@gmail.com>
Fri, 10 Aug 2012 15:01:06 +0000 (20:31 +0530)
committerAmandeep Singh <aman.dedman@gmail.com>
Tue, 14 Aug 2012 14:57:56 +0000 (20:27 +0530)
Items location changes when scrollbar is moved in dolphin.
Accordingly calls to updateAccessibility should be made.

src/kitemviews/kitemlistcontainer.cpp

index 7d7ccb4d8e622e6ae6f2737ab5974a141a4ccdee..56438d732647f00f2fb2ab35629a158b26256406 100644 (file)
@@ -164,6 +164,8 @@ void KItemListContainer::keyPressEvent(QKeyEvent* event)
     if (view) {
         QApplication::sendEvent(view, event);
     }
+    QAccessible::updateAccessibility(view, m_controller->selectionManager()->currentItem()+1, QAccessible::Focus);
+    QAccessible::updateAccessibility(view, m_controller->selectionManager()->currentItem()+1, QAccessible::LocationChanged);
 }
 
 void KItemListContainer::showEvent(QShowEvent* event)
@@ -182,7 +184,8 @@ void KItemListContainer::scrollContentsBy(int dx, int dy)
 {
     m_horizontalSmoothScroller->scrollContentsBy(dx);
     m_verticalSmoothScroller->scrollContentsBy(dy);
-    //QAccessible::updateAccessibility(view(), , );
+    QAccessible::updateAccessibility(m_controller->view(), m_controller->selectionManager()->currentItem()+1, QAccessible::Focus);
+    QAccessible::updateAccessibility(m_controller->view(), m_controller->selectionManager()->currentItem()+1, QAccessible::LocationChanged);
 }
 
 void KItemListContainer::wheelEvent(QWheelEvent* event)
@@ -371,7 +374,8 @@ void KItemListContainer::updateGeometries()
         updateScrollOffsetScrollBar();
         updateItemOffsetScrollBar();
         QAccessible::updateAccessibility(m_controller->view(), 0, QAccessible::LocationChanged);
-        QAccessible::updateAccessibility(m_controller->view(), m_controller->selectionManager()->currentItem(), QAccessible::LocationChanged);
+        QAccessible::updateAccessibility(m_controller->view(), m_controller->selectionManager()->currentItem()+1, QAccessible::LocationChanged);
+        QAccessible::updateAccessibility(m_controller->view(), m_controller->selectionManager()->currentItem()+1, QAccessible::Focus);
     }
 }