Give notch mode its own control layout and backgroundless islands

- The notch's cog edits a separate tile layout (notch.controls); normal
  mode keeps the Control Center's. Reset follows the Control Center again.
- Notch islands draw no bar behind their modules.
- The notch strip picker comes first in Settings → Notch, and an empty
  strip offers a shortcut to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mxandClaude Opus 5.5 committed 2026-11-12 17:08:46 +01:00
1 parent 74b6ad50ec
commit 73de4b06a8
9 files changed
+89 -19

No files matched your search

+39 -2
View File
@@ -196,6 +196,34 @@ PanelWindow {
anchors.verticalCenter: parent.verticalCenter
}
}
// Empty strip: a shortcut to pick its modules.
Rectangle {
objectName: "notchStripAdd"
x: main.x
y: (root.band - height) / 2
width: addLabel.implicitWidth + 24
height: 28
radius: 14
visible: body.headerShown && stripRow.modules.length === 0
opacity: root.contentOpacity
color: addArea.containsMouse ? Theme.hover : Theme.fill
border.width: 1
border.color: Theme.hairline
Text {
id: addLabel
anchors.centerIn: parent
text: "+ Add bar modules"
color: Theme.textSecondary
font.pixelSize: 12
}
MouseArea {
id: addArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: ShellState.revealSetting("notch", "Notch strip")
}
}
MouseArea {
anchors.fill: strip
visible: strip.visible
@@ -500,10 +528,19 @@ PanelWindow {
readonly property int gap: 10
readonly property int cellHeight: 68
readonly property real cellWidth: (width - 3 * gap) / Grid.COLS
readonly property var tiles: (ConfigService.ready ? ConfigService.data.controlCenter.modules : []).filter(m => m.enabled && m.id !== "media" && !!ControlRegistry.entry(m.id) && !ControlRegistry.entry(m.id).section).slice().sort((a, b) => ((Number.isInteger(a.y) ? a.y : 99) - (Number.isInteger(b.y) ? b.y : 99)) || ((Number.isInteger(a.x) ? a.x : 0) - (Number.isInteger(b.x) ? b.x : 0)))
// The notch's own layout keeps its edited cells; until edited it
// follows the Control Center's order, packed, without Now Playing.
readonly property bool ownLayout: ConfigService.ready && ConfigService.data.notch.controls.length > 0
readonly property var tiles: ControlRegistry.notchModules.filter(m => m.enabled && m.id !== "media" && !!ControlRegistry.entry(m.id) && !ControlRegistry.entry(m.id).section).slice().sort((a, b) => ((Number.isInteger(a.y) ? a.y : 99) - (Number.isInteger(b.y) ? b.y : 99)) || ((Number.isInteger(a.x) ? a.x : 0) - (Number.isInteger(b.x) ? b.x : 0)))
readonly property var plan: Grid.layout(tiles.map(m => {
const size = ControlRegistry.size(m);
return {
return middle.ownLayout ? {
id: m.id,
w: size.w,
h: size.h,
x: m.x,
y: m.y
} : {
id: m.id,
w: size.w,
h: size.h