BaBar Widgets: pass a proper section name instead of a longer string.
This commit is contained in:
parent
28677d6888
commit
380f31fbd9
16 changed files with 19 additions and 33 deletions
|
|
@ -15,13 +15,12 @@ Item {
|
|||
|
||||
// Widget properties passed from Bar.qml for per-instance settings
|
||||
property string widgetId: ""
|
||||
property string barSection: ""
|
||||
property string section: ""
|
||||
property int sectionWidgetIndex: -1
|
||||
property int sectionWidgetsCount: 0
|
||||
|
||||
property var widgetMetadata: BarWidgetRegistry.widgetMetadata[widgetId]
|
||||
property var widgetSettings: {
|
||||
var section = barSection.replace("Section", "").toLowerCase()
|
||||
if (section && sectionWidgetIndex >= 0) {
|
||||
var widgets = Settings.data.bar.widgets[section]
|
||||
if (widgets && sectionWidgetIndex < widgets.length) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue