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