Commit d606d301 authored by Karel Slaný's avatar Karel Slaný

Playing with accessibility in FileDialogue.

parent aabaa00c
......@@ -22,7 +22,7 @@
*/
import QtQuick 2.7
import QtQuick.Controls 2.1
import QtQuick.Controls 2.2
/*
* Accessible button component.
......@@ -35,8 +35,11 @@ Button {
property string accessibleName: ""
Accessible.role: Accessible.Button
Accessible.checkable: root.checkable
Accessible.checked: root.checked
Accessible.description: root.accessibleDescription
Accessible.name: (root.accessibleName !== "") ? root.accessibleName : root.text
Accessible.pressed: root.pressed
Accessible.onPressAction: {
root.clicked()
}
......
......@@ -22,7 +22,7 @@
*/
import QtQuick 2.7
import QtQuick.Controls 2.1
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import Qt.labs.folderlistmodel 2.1
import cz.nic.mobileDatovka 1.0
......@@ -34,7 +34,20 @@ Dialog {
focus: true
modal: true
title: qsTr("Select path")
standardButtons: (selectedFileIndex != -1) ? (Dialog.Ok | Dialog.Cancel) : Dialog.Cancel
//standardButtons: (selectedFileIndex != -1) ? (Dialog.Ok | Dialog.Cancel) : Dialog.Cancel
footer: DialogButtonBox {
AccessibleButton {
text: qsTr("Cancel")
DialogButtonBox.buttonRole: DialogButtonBox.RejectRole
}
AccessibleButton {
text: qsTr("Ok")
enabled: (selectedFileIndex != -1)
visible: (selectedFileIndex != -1)
DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
}
}
/* Place the dialogue in the centre. */
x: 2 * defaultMargin
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment