Bar Widget Settings: One file per Widget settings, refactor - wip
This commit is contained in:
parent
c01167c9da
commit
45af873a6f
27 changed files with 707 additions and 765 deletions
|
|
@ -32,23 +32,6 @@ RowLayout {
|
|||
readonly property bool userShowNetworkStats: (widgetSettings.showNetworkStats
|
||||
!== undefined) ? widgetSettings.showNetworkStats : ((Settings.data.bar.showNetworkStats !== undefined) ? Settings.data.bar.showNetworkStats : BarWidgetRegistry.widgetMetadata["SystemMonitor"].showNetworkStats)
|
||||
|
||||
Component.onCompleted: {
|
||||
try {
|
||||
var section = barSection.replace("Section", "").toLowerCase()
|
||||
if (section && sectionWidgetIndex >= 0) {
|
||||
var widgets = Settings.data.bar.widgets[section]
|
||||
if (widgets && sectionWidgetIndex < widgets.length) {
|
||||
if (widgets[sectionWidgetIndex].showNetworkStats === undefined
|
||||
&& Settings.data.bar.showNetworkStats !== undefined) {
|
||||
widgets[sectionWidgetIndex].showNetworkStats = Settings.data.bar.showNetworkStats
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
spacing: Style.marginS * scaling
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue