Overview
The theme.config.json
file contains configuration of a theme part. This file is optional and can be set in the root folder of theme part, for example <GBC_PROJECT_DIR>/theme/platform/mobile/theme.config.json
.
Contents
The JSON object provided in this file has two main entries, conditions
and widgetFactory
.
conditions
entry
The conditions
entry is a JSON array containing theme part's conditions as described in Theme conditions.
widgetFactory
entry
The widgetFactory
entry is a JSON object that defines overrides to apply in cls.WidgetFactory
. It replaces registrations made with cls.WidgetFactory.registerBuilder
, and means every subsequent widget instantiation will use the class defined by this override rather than the one defined in javascript code.
// sample theme/platform/mobile/theme.config.json
{
"conditions": ["isMobile"],
"widgetFactory": {
"DateEdit": "cls.DateEditMobileWidget",
"DateTimeEdit": "cls.DateTimeEditMobileWidget",
"TimeEdit": "cls.TimeEditMobileWidget",
"SpinEdit": "cls.SpinEditMobileWidget"
}
}