mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-18 16:54:39 +00:00
WizardLanguage: navigate with keyboard; enable accessibility
This commit is contained in:
parent
b58bff39a0
commit
1f4e337cc0
3 changed files with 68 additions and 2 deletions
|
@ -36,6 +36,15 @@ import "../components" as MoneroComponents
|
||||||
Item {
|
Item {
|
||||||
implicitHeight: layout.height
|
implicitHeight: layout.height
|
||||||
implicitWidth: layout.width
|
implicitWidth: layout.width
|
||||||
|
Keys.onReturnPressed: appWindow.toggleLanguageView()
|
||||||
|
Keys.onEnterPressed: appWindow.toggleLanguageView()
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
width: parent.width * 1.25
|
||||||
|
height: parent.height
|
||||||
|
anchors.centerIn: parent
|
||||||
|
color: parent.focus ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent"
|
||||||
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: layout
|
id: layout
|
||||||
|
|
|
@ -21,6 +21,14 @@ Text {
|
||||||
font.pixelSize: 14
|
font.pixelSize: 14
|
||||||
textFormat: Text.PlainText
|
textFormat: Text.PlainText
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
width: root.contentWidth
|
||||||
|
height: root.height
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.top: parent.top
|
||||||
|
color: root.focus ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent"
|
||||||
|
}
|
||||||
|
|
||||||
MoneroEffects.ColorTransition {
|
MoneroEffects.ColorTransition {
|
||||||
enabled: root.themeTransition
|
enabled: root.themeTransition
|
||||||
themeTransition: root.themeTransition
|
themeTransition: root.themeTransition
|
||||||
|
|
|
@ -40,6 +40,7 @@ Rectangle {
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
property alias pageHeight: pageRoot.height
|
property alias pageHeight: pageRoot.height
|
||||||
|
property alias pageRoot: pageRoot
|
||||||
property string viewName: "wizardLanguage"
|
property string viewName: "wizardLanguage"
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
@ -48,6 +49,7 @@ Rectangle {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
spacing: 30
|
spacing: 30
|
||||||
|
KeyNavigation.tab: textWelcome
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
// some margins for the titlebar
|
// some margins for the titlebar
|
||||||
|
@ -73,12 +75,25 @@ Rectangle {
|
||||||
leftPadding: 0
|
leftPadding: 0
|
||||||
topPadding: 0
|
topPadding: 0
|
||||||
|
|
||||||
|
Accessible.role: Accessible.StaticText
|
||||||
|
Accessible.name: qsTr("Welcome to Monero") + translationManager.emptyString;
|
||||||
|
KeyNavigation.up: versionText
|
||||||
|
KeyNavigation.backtab: versionText
|
||||||
|
KeyNavigation.down: globe
|
||||||
|
KeyNavigation.tab: globe
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: 350;
|
duration: 350;
|
||||||
easing.type: Easing.InCubic;
|
easing.type: Easing.InCubic;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
width: textWelcome.width
|
||||||
|
height: textWelcome.height
|
||||||
|
color: textWelcome.focus ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
|
@ -104,6 +119,19 @@ Rectangle {
|
||||||
property real animFrom: 0
|
property real animFrom: 0
|
||||||
property real animTo: 360
|
property real animTo: 360
|
||||||
|
|
||||||
|
Accessible.role: Accessible.Graphic
|
||||||
|
Accessible.name: qsTr("Globe with country flags rotating") + translationManager.emptyString;
|
||||||
|
KeyNavigation.up: textWelcome
|
||||||
|
KeyNavigation.backtab: textWelcome
|
||||||
|
KeyNavigation.down: btnLanguage
|
||||||
|
KeyNavigation.tab: btnLanguage
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
width: globe.width
|
||||||
|
height: globe.height
|
||||||
|
color: globe.focus ? MoneroComponents.Style.titleBarButtonHoverColor : "transparent"
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
visible: !globe.small
|
visible: !globe.small
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
@ -152,19 +180,33 @@ Rectangle {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
columnSpacing: 20
|
columnSpacing: 20
|
||||||
|
|
||||||
MoneroComponents.LanguageButton { }
|
MoneroComponents.LanguageButton {
|
||||||
|
id: btnLanguage
|
||||||
|
Accessible.role: Accessible.Button
|
||||||
|
Accessible.name: qsTr("Selected language ") + persistentSettings.language + translationManager.emptyString
|
||||||
|
KeyNavigation.up: globe
|
||||||
|
KeyNavigation.backtab: globe
|
||||||
|
KeyNavigation.down: btnContinue
|
||||||
|
KeyNavigation.tab: btnContinue
|
||||||
|
}
|
||||||
|
|
||||||
MoneroComponents.StandardButton {
|
MoneroComponents.StandardButton {
|
||||||
id: btnContinue
|
id: btnContinue
|
||||||
Layout.minimumWidth: 150
|
Layout.minimumWidth: 150
|
||||||
text: qsTr("Continue") + translationManager.emptyString
|
text: qsTr("Continue") + translationManager.emptyString
|
||||||
|
Accessible.role: Accessible.Button
|
||||||
|
Accessible.name: qsTr("Continue") + translationManager.emptyString
|
||||||
|
KeyNavigation.up: btnLanguage
|
||||||
|
KeyNavigation.backtab: btnLanguage
|
||||||
|
KeyNavigation.down: versionText
|
||||||
|
KeyNavigation.tab: versionText
|
||||||
onClicked: {
|
onClicked: {
|
||||||
wizardController.wizardStackView.backTransition = false;
|
wizardController.wizardStackView.backTransition = false;
|
||||||
if(wizardController.skipModeSelection){
|
if(wizardController.skipModeSelection){
|
||||||
wizardStateView.state = "wizardHome"
|
wizardStateView.state = "wizardHome"
|
||||||
} else {
|
} else {
|
||||||
wizardStateView.state = "wizardModeSelection"
|
wizardStateView.state = "wizardModeSelection"
|
||||||
|
wizardStateView.wizardModeSelectionView.pageRoot.forceActiveFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -186,6 +228,12 @@ Rectangle {
|
||||||
font.family: MoneroComponents.Style.fontRegular.name
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
color: MoneroComponents.Style.defaultFontColor
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
text: Version.GUI_VERSION + " (Qt " + qtRuntimeVersion + ")"
|
text: Version.GUI_VERSION + " (Qt " + qtRuntimeVersion + ")"
|
||||||
|
Accessible.role: Accessible.StaticText
|
||||||
|
Accessible.name: qsTr("Monero GUI version") + " " + text + translationManager.emptyString;
|
||||||
|
KeyNavigation.up: btnContinue
|
||||||
|
KeyNavigation.backtab: btnContinue
|
||||||
|
KeyNavigation.down: textWelcome
|
||||||
|
KeyNavigation.tab: textWelcome
|
||||||
|
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
|
@ -213,6 +261,7 @@ Rectangle {
|
||||||
delay(versionTimer, 350, function() {
|
delay(versionTimer, 350, function() {
|
||||||
versionText.opacity = 1;
|
versionText.opacity = 1;
|
||||||
});
|
});
|
||||||
|
pageRoot.forceActiveFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
function delay(timer, interval, cb) {
|
function delay(timer, interval, cb) {
|
||||||
|
|
Loading…
Reference in a new issue