layout: Split out static data

This will make it possible later to cache this data or compare for best size selection without hassle.
This commit is contained in:
Dorota Czaplejewicz
2022-09-30 17:42:00 +00:00
parent c017a773ea
commit 649f67d319
4 changed files with 136 additions and 130 deletions

View File

@ -192,7 +192,7 @@ fn iter_layout_sources(
}
fn load_layout_data(source: DataSource)
-> Result<::layout::LayoutData, LoadError>
-> Result<::layout::LayoutParseData, LoadError>
{
let handler = logging::Print {};
match source {
@ -217,7 +217,7 @@ fn load_layout_data_with_fallback(
kind: ArrangementKind,
purpose: ContentPurpose,
overlay: Option<&str>,
) -> (ArrangementKind, layout::LayoutData) {
) -> (ArrangementKind, layout::LayoutParseData) {
// Build the path to the right keyboard layout subdirectory
let path = env::var_os("SQUEEKBOARD_KEYBOARDSDIR")