mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-19 23:28:31 +01:00
Update AltPages to List<Row> instead of Keyboard
This commit is contained in:
parent
2e883781d5
commit
942fe63d96
@ -85,11 +85,7 @@ rows:
|
|||||||
- "$delete"
|
- "$delete"
|
||||||
|
|
||||||
altPages:
|
altPages:
|
||||||
- name: International Phonetic Alphabet
|
- - letters:
|
||||||
minimumFunctionalKeyWidth: 0.0
|
|
||||||
attributes: *attrs
|
|
||||||
rows:
|
|
||||||
- letters:
|
|
||||||
- "i"
|
- "i"
|
||||||
- "y"
|
- "y"
|
||||||
- "$gap"
|
- "$gap"
|
||||||
@ -158,11 +154,7 @@ altPages:
|
|||||||
- "ɑ"
|
- "ɑ"
|
||||||
- "ɒ"
|
- "ɒ"
|
||||||
- "$delete"
|
- "$delete"
|
||||||
- name: International Phonetic Alphabet
|
- - letters:
|
||||||
minimumFunctionalKeyWidth: 0.0
|
|
||||||
attributes: *attrs
|
|
||||||
rows:
|
|
||||||
- letters:
|
|
||||||
- "ɓ̥"
|
- "ɓ̥"
|
||||||
- "ɓ"
|
- "ɓ"
|
||||||
- "ɗ̥"
|
- "ɗ̥"
|
||||||
|
@ -149,9 +149,7 @@ data class Keyboard(
|
|||||||
val minimumFunctionalKeyWidth: Float = 0.125f,
|
val minimumFunctionalKeyWidth: Float = 0.125f,
|
||||||
val minimumBottomRowFunctionalKeyWidth: Float = 0.15f,
|
val minimumBottomRowFunctionalKeyWidth: Float = 0.15f,
|
||||||
|
|
||||||
// TODO: These should probably be lists of List<Row> or similar,
|
val altPages: List<List<Row>> = listOf()
|
||||||
// it doesn't make sense to declare name and description repeatedly
|
|
||||||
val altPages: List<Keyboard> = listOf()
|
|
||||||
) {
|
) {
|
||||||
var id: String = ""
|
var id: String = ""
|
||||||
|
|
||||||
|
@ -169,6 +169,8 @@ class KeyboardLayoutSetV2 internal constructor(
|
|||||||
val baseElement = element.copy(page = KeyboardLayoutPage.Base)
|
val baseElement = element.copy(page = KeyboardLayoutPage.Base)
|
||||||
val baseLayout = elements[baseElement]
|
val baseLayout = elements[baseElement]
|
||||||
baseLayout?.altPages?.get(altIdx)
|
baseLayout?.altPages?.get(altIdx)
|
||||||
|
}?.let {
|
||||||
|
mainLayout.copy(definedRows = it)
|
||||||
}
|
}
|
||||||
} ?: run {
|
} ?: run {
|
||||||
// If all else fails, show the error layout
|
// If all else fails, show the error layout
|
||||||
|
Loading…
Reference in New Issue
Block a user