Factor out construction of font-related JSON schemas (#15341)
This PR factors out the construction of the font-related JSON schemas, as they were used in multiple places. Release Notes: - N/A
This commit is contained in:
parent
1ffb34c5fc
commit
b8982ad385
7 changed files with 44 additions and 72 deletions
|
@ -17,6 +17,8 @@ use std::{
|
|||
};
|
||||
use util::{merge_non_null_json_value_into, RangeExt, ResultExt as _};
|
||||
|
||||
use crate::SettingsJsonSchemaParams;
|
||||
|
||||
/// A value that can be defined as a user setting.
|
||||
///
|
||||
/// Settings can be loaded from a combination of multiple JSON files.
|
||||
|
@ -146,12 +148,6 @@ pub struct SettingsLocation<'a> {
|
|||
pub path: &'a Path,
|
||||
}
|
||||
|
||||
pub struct SettingsJsonSchemaParams<'a> {
|
||||
pub staff_mode: bool,
|
||||
pub language_names: &'a [String],
|
||||
pub font_names: &'a [String],
|
||||
}
|
||||
|
||||
/// A set of strongly-typed setting values defined via multiple JSON files.
|
||||
pub struct SettingsStore {
|
||||
setting_values: HashMap<TypeId, Box<dyn AnySettingValue>>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue