mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
autofmt
This commit is contained in:
@@ -397,12 +397,12 @@ ColumnLayout {
|
||||
availableWidgets.clear()
|
||||
const widgets = BarWidgetRegistry.getAvailableWidgets()
|
||||
widgets.forEach(entry => {
|
||||
availableWidgets.append({
|
||||
"key": entry,
|
||||
"name": entry,
|
||||
"badgeLocations": getWidgetLocations(entry)
|
||||
})
|
||||
})
|
||||
availableWidgets.append({
|
||||
"key": entry,
|
||||
"name": entry,
|
||||
"badgeLocations": getWidgetLocations(entry)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// Base list model for all combo boxes
|
||||
|
||||
@@ -15,7 +15,7 @@ Singleton {
|
||||
// Key format: "screenName|section|widgetId|index"
|
||||
property var widgetInstances: ({})
|
||||
|
||||
signal activeWidgetsChanged()
|
||||
signal activeWidgetsChanged
|
||||
|
||||
signal barReadyChanged(string screenName)
|
||||
|
||||
|
||||
@@ -210,49 +210,49 @@ RowLayout {
|
||||
combo.popup.close()
|
||||
}
|
||||
|
||||
contentItem: RowLayout {
|
||||
width: parent.width
|
||||
spacing: Style.marginM
|
||||
|
||||
NText {
|
||||
text: name
|
||||
pointSize: Style.fontSizeM
|
||||
color: highlighted ? Color.mOnTertiary : Color.mOnSurface
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
elide: Text.ElideRight
|
||||
Layout.fillWidth: true
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: Style.animationFast
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: Style.marginS
|
||||
Layout.alignment: Qt.AlignRight
|
||||
|
||||
Repeater {
|
||||
model: badgeLocations
|
||||
|
||||
delegate: NBox {
|
||||
width: Style.baseWidgetSize * 0.7
|
||||
height: Style.baseWidgetSize * 0.7
|
||||
color: "transparent"
|
||||
radius: Style.radiusS
|
||||
border.width: 0
|
||||
contentItem: RowLayout {
|
||||
width: parent.width
|
||||
spacing: Style.marginM
|
||||
|
||||
NText {
|
||||
anchors.centerIn: parent
|
||||
text: modelData
|
||||
pointSize: Style.fontSizeXXS
|
||||
font.weight: Style.fontWeightBold
|
||||
color: highlighted ? Color.mOnTertiary : Color.mOnSurface
|
||||
NText {
|
||||
text: name
|
||||
pointSize: Style.fontSizeM
|
||||
color: highlighted ? Color.mOnTertiary : Color.mOnSurface
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
elide: Text.ElideRight
|
||||
Layout.fillWidth: true
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: Style.animationFast
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: Style.marginS
|
||||
Layout.alignment: Qt.AlignRight
|
||||
|
||||
Repeater {
|
||||
model: badgeLocations
|
||||
|
||||
delegate: NBox {
|
||||
width: Style.baseWidgetSize * 0.7
|
||||
height: Style.baseWidgetSize * 0.7
|
||||
color: "transparent"
|
||||
radius: Style.radiusS
|
||||
border.width: 0
|
||||
|
||||
NText {
|
||||
anchors.centerIn: parent
|
||||
text: modelData
|
||||
pointSize: Style.fontSizeXXS
|
||||
font.weight: Style.fontWeightBold
|
||||
color: highlighted ? Color.mOnTertiary : Color.mOnSurface
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
background: Rectangle {
|
||||
width: listView.width
|
||||
color: highlighted ? Color.mTertiary : Color.transparent
|
||||
|
||||
Reference in New Issue
Block a user