[app] Added settings UI for "Turn page by tap" option

This commit is contained in:
Slava Monich 2018-07-24 00:29:52 +03:00
parent 278baef519
commit 4af6dfe06f
11 changed files with 157 additions and 33 deletions

View file

@ -78,6 +78,8 @@ Page {
title: qsTrId("harbour-books-settings-page-header") title: qsTrId("harbour-books-settings-page-header")
} }
// =============== Display ===============
SectionHeader { SectionHeader {
//: Section header for display settings //: Section header for display settings
//% "Display" //% "Display"
@ -251,7 +253,7 @@ Page {
//: Text switch description //: Text switch description
//% "Prevent the display from blanking while reading the book." //% "Prevent the display from blanking while reading the book."
description: qsTrId("harbour-books-settings-page-keep_display_on_description") description: qsTrId("harbour-books-settings-page-keep_display_on_description")
onClicked: keepDisplayOn.value = !checked onClicked: keepDisplayOn.value = !keepDisplayOn.value
ConfigurationValue { ConfigurationValue {
id: keepDisplayOn id: keepDisplayOn
@ -260,10 +262,12 @@ Page {
} }
} }
// =============== Navigation ===============
SectionHeader { SectionHeader {
//: Section header for media keys //: Section header for media keys
//% "Media keys" //% "Navigation"
text: qsTrId("harbour-books-settings-page-media-keys-section_header") text: qsTrId("harbour-books-settings-page-navigation-section_header")
} }
BooksActionSelector { BooksActionSelector {
@ -282,6 +286,26 @@ Page {
defaultValue: 1 // BooksSettings.ActionPreviousPage defaultValue: 1 // BooksSettings.ActionPreviousPage
} }
TextSwitch {
automaticCheck: false
checked: turnPageByTap.value
//: Text switch label
//% "Turn pages by tapping the screen"
text: qsTrId("harbour-books-settings-page-turn_pages_by_tap")
//: Text switch description
//% "Tapping near the left edge of the screen returns to the previous page, tapping near the right edge gets you to the next page."
description: qsTrId("harbour-books-settings-page-turn_pages_by_tap-description")
onClicked: turnPageByTap.value = !turnPageByTap.value
ConfigurationValue {
id: turnPageByTap
key: rootPath + "turnPageByTap"
defaultValue: false
}
}
// =============== Memory card ===============
SectionHeader { SectionHeader {
//: Section header for memory card settings //: Section header for memory card settings
//% "Memory card" //% "Memory card"

View file

@ -229,10 +229,10 @@
<extracomment>Text switch description</extracomment> <extracomment>Text switch description</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message id="harbour-books-settings-page-media-keys-section_header"> <message id="harbour-books-settings-page-navigation-section_header">
<source>Media keys</source> <source>Navigation</source>
<extracomment>Section header for media keys</extracomment> <extracomment>Section header for media keys</extracomment>
<translation type="unfinished">Medienschlüssel</translation> <translation type="unfinished">Navigation</translation>
</message> </message>
<message id="harbour-books-settings-page-action-none"> <message id="harbour-books-settings-page-action-none">
<source>No action</source> <source>No action</source>
@ -259,6 +259,16 @@
<extracomment>Combo box label</extracomment> <extracomment>Combo box label</extracomment>
<translation type="unfinished">Lautstärke runter</translation> <translation type="unfinished">Lautstärke runter</translation>
</message> </message>
<message id="harbour-books-settings-page-turn_pages_by_tap">
<source>Turn pages by tapping the screen</source>
<extracomment>Text switch label</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap-description">
<source>Tapping near the left edge of the screen returns to the previous page, tapping near the right edge gets you to the next page.</source>
<extracomment>Text switch description</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-removable-section_header"> <message id="harbour-books-settings-page-removable-section_header">
<source>Memory card</source> <source>Memory card</source>
<extracomment>Section header for memory card settings</extracomment> <extracomment>Section header for memory card settings</extracomment>

View file

@ -229,10 +229,10 @@
<extracomment>Text switch description</extracomment> <extracomment>Text switch description</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message id="harbour-books-settings-page-media-keys-section_header"> <message id="harbour-books-settings-page-navigation-section_header">
<source>Media keys</source> <source>Navigation</source>
<extracomment>Section header for media keys</extracomment> <extracomment>Section header for media keys</extracomment>
<translation>Teclas multimedia</translation> <translation type="unfinished">Navegación</translation>
</message> </message>
<message id="harbour-books-settings-page-volume_up-label"> <message id="harbour-books-settings-page-volume_up-label">
<source>Volume up</source> <source>Volume up</source>
@ -259,6 +259,16 @@
<extracomment>Combo box value for next page action</extracomment> <extracomment>Combo box value for next page action</extracomment>
<translation>Página posterior</translation> <translation>Página posterior</translation>
</message> </message>
<message id="harbour-books-settings-page-turn_pages_by_tap">
<source>Turn pages by tapping the screen</source>
<extracomment>Text switch label</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap-description">
<source>Tapping near the left edge of the screen returns to the previous page, tapping near the right edge gets you to the next page.</source>
<extracomment>Text switch description</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-removable-section_header"> <message id="harbour-books-settings-page-removable-section_header">
<source>Memory card</source> <source>Memory card</source>
<extracomment>Section header for memory card settings</extracomment> <extracomment>Section header for memory card settings</extracomment>

View file

@ -229,10 +229,10 @@
<extracomment>Text switch description</extracomment> <extracomment>Text switch description</extracomment>
<translation>Estä näytön sammuminen kirjaa lukiessa.</translation> <translation>Estä näytön sammuminen kirjaa lukiessa.</translation>
</message> </message>
<message id="harbour-books-settings-page-media-keys-section_header"> <message id="harbour-books-settings-page-navigation-section_header">
<source>Media keys</source> <source>Navigation</source>
<extracomment>Section header for media keys</extracomment> <extracomment>Section header for media keys</extracomment>
<translation type="unfinished">Media näppäimet</translation> <translation type="unfinished">Navigointi</translation>
</message> </message>
<message id="harbour-books-settings-page-action-none"> <message id="harbour-books-settings-page-action-none">
<source>No action</source> <source>No action</source>
@ -259,6 +259,16 @@
<extracomment>Combo box label</extracomment> <extracomment>Combo box label</extracomment>
<translation type="unfinished">Äänenvoimakkuus alas</translation> <translation type="unfinished">Äänenvoimakkuus alas</translation>
</message> </message>
<message id="harbour-books-settings-page-turn_pages_by_tap">
<source>Turn pages by tapping the screen</source>
<extracomment>Text switch label</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap-description">
<source>Tapping near the left edge of the screen returns to the previous page, tapping near the right edge gets you to the next page.</source>
<extracomment>Text switch description</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-removable-section_header"> <message id="harbour-books-settings-page-removable-section_header">
<source>Memory card</source> <source>Memory card</source>
<extracomment>Section header for memory card settings</extracomment> <extracomment>Section header for memory card settings</extracomment>

View file

@ -227,10 +227,10 @@
<extracomment>Text switch description</extracomment> <extracomment>Text switch description</extracomment>
<translation>Megakadályozza, hogy a kijelző elsötétüljön olvasás közben.</translation> <translation>Megakadályozza, hogy a kijelző elsötétüljön olvasás közben.</translation>
</message> </message>
<message id="harbour-books-settings-page-media-keys-section_header"> <message id="harbour-books-settings-page-navigation-section_header">
<source>Media keys</source> <source>Navigation</source>
<extracomment>Section header for media keys</extracomment> <extracomment>Section header for media keys</extracomment>
<translation>Média gombok</translation> <translation type="unfinished">Navigáció</translation>
</message> </message>
<message id="harbour-books-settings-page-volume_up-label"> <message id="harbour-books-settings-page-volume_up-label">
<source>Volume up</source> <source>Volume up</source>
@ -257,6 +257,16 @@
<extracomment>Combo box value for next page action</extracomment> <extracomment>Combo box value for next page action</extracomment>
<translation>Következő oldal</translation> <translation>Következő oldal</translation>
</message> </message>
<message id="harbour-books-settings-page-turn_pages_by_tap">
<source>Turn pages by tapping the screen</source>
<extracomment>Text switch label</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap-description">
<source>Tapping near the left edge of the screen returns to the previous page, tapping near the right edge gets you to the next page.</source>
<extracomment>Text switch description</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-removable-section_header"> <message id="harbour-books-settings-page-removable-section_header">
<source>Memory card</source> <source>Memory card</source>
<extracomment>Section header for memory card settings</extracomment> <extracomment>Section header for memory card settings</extracomment>

View file

@ -229,10 +229,10 @@
<extracomment>Text switch description</extracomment> <extracomment>Text switch description</extracomment>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message id="harbour-books-settings-page-media-keys-section_header"> <message id="harbour-books-settings-page-navigation-section_header">
<source>Media keys</source> <source>Navigation</source>
<extracomment>Section header for media keys</extracomment> <extracomment>Section header for media keys</extracomment>
<translation>Mediatoetsen</translation> <translation type="unfinished">Navigatie</translation>
</message> </message>
<message id="harbour-books-settings-page-volume_up-label"> <message id="harbour-books-settings-page-volume_up-label">
<source>Volume up</source> <source>Volume up</source>
@ -259,6 +259,16 @@
<extracomment>Combo box value for next page action</extracomment> <extracomment>Combo box value for next page action</extracomment>
<translation>Volgende pagina</translation> <translation>Volgende pagina</translation>
</message> </message>
<message id="harbour-books-settings-page-turn_pages_by_tap">
<source>Turn pages by tapping the screen</source>
<extracomment>Text switch label</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap-description">
<source>Tapping near the left edge of the screen returns to the previous page, tapping near the right edge gets you to the next page.</source>
<extracomment>Text switch description</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-removable-section_header"> <message id="harbour-books-settings-page-removable-section_header">
<source>Memory card</source> <source>Memory card</source>
<extracomment>Section header for memory card settings</extracomment> <extracomment>Section header for memory card settings</extracomment>

View file

@ -231,10 +231,10 @@
<extracomment>Text switch description</extracomment> <extracomment>Text switch description</extracomment>
<translation>Zapobiegaj wygaszaniu wyświetlacza podczas czytania książki.</translation> <translation>Zapobiegaj wygaszaniu wyświetlacza podczas czytania książki.</translation>
</message> </message>
<message id="harbour-books-settings-page-media-keys-section_header"> <message id="harbour-books-settings-page-navigation-section_header">
<source>Media keys</source> <source>Navigation</source>
<extracomment>Section header for media keys</extracomment> <extracomment>Section header for media keys</extracomment>
<translation>Przyciski multimedialne</translation> <translation type="unfinished">Nawigacja</translation>
</message> </message>
<message id="harbour-books-settings-page-volume_up-label"> <message id="harbour-books-settings-page-volume_up-label">
<source>Volume up</source> <source>Volume up</source>
@ -261,6 +261,16 @@
<extracomment>Combo box value for next page action</extracomment> <extracomment>Combo box value for next page action</extracomment>
<translation>Następna strona</translation> <translation>Następna strona</translation>
</message> </message>
<message id="harbour-books-settings-page-turn_pages_by_tap">
<source>Turn pages by tapping the screen</source>
<extracomment>Text switch label</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap-description">
<source>Tapping near the left edge of the screen returns to the previous page, tapping near the right edge gets you to the next page.</source>
<extracomment>Text switch description</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-removable-section_header"> <message id="harbour-books-settings-page-removable-section_header">
<source>Memory card</source> <source>Memory card</source>
<extracomment>Section header for memory card settings</extracomment> <extracomment>Section header for memory card settings</extracomment>

View file

@ -229,10 +229,10 @@
<extracomment>Text switch description</extracomment> <extracomment>Text switch description</extracomment>
<translation>Evita que a tela apague durante a leitura.</translation> <translation>Evita que a tela apague durante a leitura.</translation>
</message> </message>
<message id="harbour-books-settings-page-media-keys-section_header"> <message id="harbour-books-settings-page-navigation-section_header">
<source>Media keys</source> <source>Navigation</source>
<extracomment>Section header for media keys</extracomment> <extracomment>Section header for media keys</extracomment>
<translation>Teclas de mídia</translation> <translation type="unfinished">Navegação</translation>
</message> </message>
<message id="harbour-books-settings-page-volume_up-label"> <message id="harbour-books-settings-page-volume_up-label">
<source>Volume up</source> <source>Volume up</source>
@ -259,6 +259,16 @@
<extracomment>Combo box value for next page action</extracomment> <extracomment>Combo box value for next page action</extracomment>
<translation>Próxima página</translation> <translation>Próxima página</translation>
</message> </message>
<message id="harbour-books-settings-page-turn_pages_by_tap">
<source>Turn pages by tapping the screen</source>
<extracomment>Text switch label</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap-description">
<source>Tapping near the left edge of the screen returns to the previous page, tapping near the right edge gets you to the next page.</source>
<extracomment>Text switch description</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-removable-section_header"> <message id="harbour-books-settings-page-removable-section_header">
<source>Memory card</source> <source>Memory card</source>
<extracomment>Section header for memory card settings</extracomment> <extracomment>Section header for memory card settings</extracomment>

View file

@ -231,10 +231,20 @@
<extracomment>Text switch description</extracomment> <extracomment>Text switch description</extracomment>
<translation>Не гасить экран, пока открыта книга. Это не очень хорошо для батареи, зато удобно для чтения. Главное - не уснуть.</translation> <translation>Не гасить экран, пока открыта книга. Это не очень хорошо для батареи, зато удобно для чтения. Главное - не уснуть.</translation>
</message> </message>
<message id="harbour-books-settings-page-media-keys-section_header"> <message id="harbour-books-settings-page-navigation-section_header">
<source>Media keys</source> <source>Navigation</source>
<extracomment>Section header for media keys</extracomment> <extracomment>Section header for media keys</extracomment>
<translation>Кнопки</translation> <translation>Навигация</translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap">
<source>Turn pages by tapping the screen</source>
<extracomment>Text switch label</extracomment>
<translation>Листать страницы касанием экрана</translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap-description">
<source>Tapping near the left edge of the screen returns to the previous page, tapping near the right edge gets you to the next page.</source>
<extracomment>Text switch description</extracomment>
<translation>Касание ближе к левому краю экрана вызывает переход на предыдущую страницу, ближе к правому краю - на следующую.</translation>
</message> </message>
<message id="harbour-books-settings-page-action-none"> <message id="harbour-books-settings-page-action-none">
<source>No action</source> <source>No action</source>

View file

@ -229,10 +229,10 @@
<extracomment>Text switch description</extracomment> <extracomment>Text switch description</extracomment>
<translation>Förhindra att skärmen slocknar vid läsning</translation> <translation>Förhindra att skärmen slocknar vid läsning</translation>
</message> </message>
<message id="harbour-books-settings-page-media-keys-section_header"> <message id="harbour-books-settings-page-navigation-section_header">
<source>Media keys</source> <source>Navigation</source>
<extracomment>Section header for media keys</extracomment> <extracomment>Section header for media keys</extracomment>
<translation>Mediaknappar</translation> <translation type="unfinished">Navigering</translation>
</message> </message>
<message id="harbour-books-settings-page-action-none"> <message id="harbour-books-settings-page-action-none">
<source>No action</source> <source>No action</source>
@ -259,6 +259,16 @@
<extracomment>Combo box label</extracomment> <extracomment>Combo box label</extracomment>
<translation>Sänk volymen</translation> <translation>Sänk volymen</translation>
</message> </message>
<message id="harbour-books-settings-page-turn_pages_by_tap">
<source>Turn pages by tapping the screen</source>
<extracomment>Text switch label</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap-description">
<source>Tapping near the left edge of the screen returns to the previous page, tapping near the right edge gets you to the next page.</source>
<extracomment>Text switch description</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-removable-section_header"> <message id="harbour-books-settings-page-removable-section_header">
<source>Memory card</source> <source>Memory card</source>
<extracomment>Section header for memory card settings</extracomment> <extracomment>Section header for memory card settings</extracomment>

View file

@ -229,10 +229,10 @@
<extracomment>Text switch description</extracomment> <extracomment>Text switch description</extracomment>
<translation>Prevent the display from blanking while reading the book.</translation> <translation>Prevent the display from blanking while reading the book.</translation>
</message> </message>
<message id="harbour-books-settings-page-media-keys-section_header"> <message id="harbour-books-settings-page-navigation-section_header">
<source>Media keys</source> <source>Navigation</source>
<extracomment>Section header for media keys</extracomment> <extracomment>Section header for media keys</extracomment>
<translation>Media keys</translation> <translation>Navigation</translation>
</message> </message>
<message id="harbour-books-settings-page-volume_up-label"> <message id="harbour-books-settings-page-volume_up-label">
<source>Volume up</source> <source>Volume up</source>
@ -259,6 +259,16 @@
<extracomment>Combo box value for next page action</extracomment> <extracomment>Combo box value for next page action</extracomment>
<translation>Next page</translation> <translation>Next page</translation>
</message> </message>
<message id="harbour-books-settings-page-turn_pages_by_tap">
<source>Turn pages by tapping the screen</source>
<extracomment>Text switch label</extracomment>
<translation>Turn pages by tapping the screen</translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap-description">
<source>Tapping near the left edge of the screen returns to the previous page, tapping near the right edge gets you to the next page.</source>
<extracomment>Text switch description</extracomment>
<translation>Tapping near the left edge of the screen returns to the previous page, tapping near the right edge gets you to the next page.</translation>
</message>
<message id="harbour-books-settings-page-removable-section_header"> <message id="harbour-books-settings-page-removable-section_header">
<source>Memory card</source> <source>Memory card</source>
<extracomment>Section header for memory card settings</extracomment> <extracomment>Section header for memory card settings</extracomment>