Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion BoatIcon.qml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import QtQuick
import qs.Commons
import qs.Commons as Commons

// A compact side-profile ship for the bar, separate from radar contact markers.
Canvas {
id: root
implicitWidth: 16
implicitHeight: 16
property color ink: Color.foreground
property color ink: Commons.Color.foreground
onInkChanged: requestPaint()
onWidthChanged: requestPaint()
onHeightChanged: requestPaint()
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,23 @@ version commit. From 0.7.1 onward, version headings link to release tags.

## Unreleased

## [0.9.1](https://github.com/simoz/omarchy-vessel/releases/tag/v0.9.1) — 2026-11-28

### Changed

- Check in `tests/run` that `qmldir` declares every QML component and that
palette references are qualified, since neither `qmllint` nor
`omarchy plugin validate` reports these.

### Fixed

- Load the widget on Qt 6.12, where it failed with "Type Radar unavailable" and,
once loaded, lost its colors. `qmldir` now declares every component, because
the shell resolves only declared types, and palette colors are read through
`Commons.Color`, which QtQuick's new `Color` type cannot shadow. Restart the
shell after updating (`omarchy-restart-shell`): a plugin reload can keep the
previous `qmldir`.

## [0.9.0](https://github.com/simoz/omarchy-vessel/releases/tag/v0.9.0) — 2026-09-27

### Added
Expand Down
13 changes: 7 additions & 6 deletions ContactList.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import QtQuick
import qs.Commons
import qs.Commons as Commons
import "Model.js" as Model

// Contacts in receiver order, nearest first. The widget owns selection and
Expand All @@ -18,7 +19,7 @@ ListView {
signal activated()

component Label: Text {
color: Color.foreground; font.family: root.family; font.pixelSize: root.textSize
color: Commons.Color.foreground; font.family: root.family; font.pixelSize: root.textSize
textFormat: Text.PlainText
}

Expand All @@ -36,19 +37,19 @@ ListView {
spacing: 4
// Keep delegates stable across snapshots; MMSI, not position, is identity.
model: ShipModel { ships: root.ships }
Rectangle { anchors.fill: parent; color: "transparent"; border.color: Color.accent; visible: root.activeFocus; z: 2 }
Rectangle { anchors.fill: parent; color: "transparent"; border.color: Commons.Color.accent; visible: root.activeFocus; z: 2 }
delegate: Rectangle {
required property var ship
readonly property var modelData: ship
objectName: "vessel-" + modelData.mmsi
width: ListView.view.width; height: 38
color: Color.background
color: Commons.Color.background
border.width: root.selectedMmsi === modelData.mmsi ? 1 : 0
border.color: Color.accent
border.color: Commons.Color.accent
opacity: modelData.stale ? 0.5 : 1
Rectangle { anchors.left: parent.left; anchors.leftMargin: 8; anchors.verticalCenter: parent.verticalCenter; width: 8; height: 8; radius: 4; color: root.typeColors[Model.typeGroup(modelData.type)] || Color.accent }
Rectangle { anchors.left: parent.left; anchors.leftMargin: 8; anchors.verticalCenter: parent.verticalCenter; width: 8; height: 8; radius: 4; color: root.typeColors[Model.typeGroup(modelData.type)] || Commons.Color.accent }
Label { anchors.left: parent.left; anchors.leftMargin: 24; anchors.verticalCenter: parent.verticalCenter; width: parent.width * 0.65 - 16; elide: Text.ElideRight; text: modelData.name || modelData.mmsi }
Label { anchors.right: parent.right; anchors.rightMargin: 8; anchors.verticalCenter: parent.verticalCenter; text: Model.distance(modelData.distance, root.unit); color: Color.accent }
Label { anchors.right: parent.right; anchors.rightMargin: 8; anchors.verticalCenter: parent.verticalCenter; text: Model.distance(modelData.distance, root.unit); color: Commons.Color.accent }
MouseArea { anchors.fill: parent; cursorShape: Qt.PointingHandCursor; onClicked: root.revealRequested(modelData) }
}
}
9 changes: 5 additions & 4 deletions DetailMap.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import QtQuick
import qs.Commons
import qs.Commons as Commons
import "Model.js" as Model

// Projected vectors share the AIS coordinate system; zoom never stretches a bitmap.
Expand All @@ -11,10 +12,10 @@ Canvas {
// One coordinate unit is the observer's loaded range; offset is already pixels.
property real viewScale: 1
property point offset: Qt.point(0, 0)
property color land: Color.foreground
property color sea: Color.background
property color roads: Color.muted
property color waterway: Color.accent
property color land: Commons.Color.foreground
property color sea: Commons.Color.background
property color roads: Commons.Color.muted
property color waterway: Commons.Color.accent
onGeographyChanged: requestPaint()
onViewScaleChanged: requestPaint()
onOffsetChanged: requestPaint()
Expand Down
23 changes: 12 additions & 11 deletions KeyboardHelp.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import QtQuick
import qs.Commons
import qs.Commons as Commons
import "Keyboard.js" as Keyboard

// Modal within the current surface; never opens another receiver or window.
Expand All @@ -20,33 +21,33 @@ FocusScope {
else if (event.key === Qt.Key_Up || event.key === Qt.Key_PageUp)
scroll.contentY = Math.max(0, scroll.contentY - (event.key === Qt.Key_Up ? 32 : scroll.height * 0.8));
}
Rectangle { anchors.fill: parent; color: Color.background; opacity: 0.8 }
Rectangle { anchors.fill: parent; color: Commons.Color.background; opacity: 0.8 }
MouseArea { anchors.fill: parent; onClicked: root.closed() }
Rectangle {
x: root.centered ? Math.round((parent.width - width) / 2) : 0
y: root.centered ? Math.round((parent.height - height) / 2) : 0
width: Math.min(parent.width, 760)
height: Math.min(parent.height, contents.implicitHeight + 74)
color: Color.background
border.color: Color.muted
color: Commons.Color.background
border.color: Commons.Color.muted
MouseArea { anchors.fill: parent }
// Keep the close control outside the clipped, scrolling content.
Row {
id: header
anchors.top: parent.top; anchors.left: parent.left; anchors.right: parent.right
anchors.margins: 16
height: 26
Text { width: parent.width - 70; text: "K E Y S"; color: Color.accent; font.family: root.family; font.bold: true; font.pixelSize: 12; anchors.verticalCenter: parent.verticalCenter }
Text { width: parent.width - 70; text: "K E Y S"; color: Commons.Color.accent; font.family: root.family; font.bold: true; font.pixelSize: 12; anchors.verticalCenter: parent.verticalCenter }
Rectangle {
id: closeButton
objectName: "closeKeyboardHelp"
width: 70; height: 26
color: "transparent"; border.color: activeFocus ? Color.accent : Color.muted
color: "transparent"; border.color: activeFocus ? Commons.Color.accent : Commons.Color.muted
activeFocusOnTab: true
Accessible.role: Accessible.Button
Accessible.name: "Close keyboard shortcuts"
Accessible.onPressAction: root.closed()
Text { anchors.centerIn: parent; text: "ESC ×"; color: Color.foreground; font.family: root.family; font.pixelSize: 11 }
Text { anchors.centerIn: parent; text: "ESC ×"; color: Commons.Color.foreground; font.family: root.family; font.pixelSize: 11 }
MouseArea { anchors.fill: parent; cursorShape: Qt.PointingHandCursor; onClicked: root.closed() }
}
}
Expand Down Expand Up @@ -78,11 +79,11 @@ FocusScope {
Rectangle {
required property string modelData
width: Math.max(18, keyLabel.implicitWidth + 8); height: 18
color: "transparent"; border.color: Color.muted
color: "transparent"; border.color: Commons.Color.muted
Text {
id: keyLabel
anchors.centerIn: parent
text: modelData; color: Color.foreground
text: modelData; color: Commons.Color.foreground
font.family: root.family; font.pixelSize: 10
}
}
Expand All @@ -91,16 +92,16 @@ FocusScope {
Text {
width: parent.width - 140
text: modelData[1]; wrapMode: Text.WordWrap
color: Color.foreground; font.family: root.family; font.pixelSize: 11
color: Commons.Color.foreground; font.family: root.family; font.pixelSize: 11
}
}
}
}
Rectangle { width: parent.width; height: 1; color: Color.muted; opacity: 0.5 }
Rectangle { width: parent.width; height: 1; color: Commons.Color.muted; opacity: 0.5 }
Text {
width: parent.width; wrapMode: Text.WordWrap
text: "Click the status beside the location to pause / resume. Zoom in to pan.\nIn Settings, type normally and use Tab to move between controls.\nWith nothing else open, Esc closes the view."
color: Color.muted; font.family: root.family; font.pixelSize: 10
color: Commons.Color.muted; font.family: root.family; font.pixelSize: 10
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion KeyboardIcon.qml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import QtQuick
import qs.Commons
import qs.Commons as Commons

// Geometric keys stay legible even when the selected font lacks a keyboard glyph.
Rectangle {
property color ink: Color.foreground
property color ink: Commons.Color.foreground
implicitWidth: 20
implicitHeight: 13
color: "transparent"
Expand Down
5 changes: 3 additions & 2 deletions OfflineMap.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import QtQuick
import qs.Commons
import qs.Commons as Commons
import "Model.js" as Model

// Draw only the bundled geography. Both map layers accept the same normalized
Expand All @@ -15,8 +16,8 @@ Canvas {
onOffsetChanged: requestPaint()
property real viewScale: 1
onViewScaleChanged: requestPaint()
property color coastColor: Color.accent
property color landColor: Color.foreground
property color coastColor: Commons.Color.accent
property color landColor: Commons.Color.foreground
onGeographyChanged: requestPaint()
onCoastColorChanged: requestPaint()
onLandColorChanged: requestPaint()
Expand Down
35 changes: 18 additions & 17 deletions Radar.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import QtQuick
import qs.Commons
import qs.Commons as Commons
import "Model.js" as Model

// Positions are relative to the observer; vessel course controls the symbol orientation.
Expand Down Expand Up @@ -113,7 +114,7 @@ Item {
// Theme colors by type group; the accent covers themes without named hues.
property var typeColors: ({})
function inkFor(ship) {
return (ship && typeColors[Model.typeGroup(ship.type)]) || Color.accent;
return (ship && typeColors[Model.typeGroup(ship.type)]) || Commons.Color.accent;
}
signal selected(string mmsi)
implicitHeight: width
Expand Down Expand Up @@ -142,7 +143,7 @@ Item {
objectName: "radarSweep"
anchors.fill: parent
visible: root.scanning
property color ink: Color.accent
property color ink: Commons.Color.accent
onInkChanged: requestPaint()
onWidthChanged: requestPaint()
onHeightChanged: requestPaint()
Expand Down Expand Up @@ -171,8 +172,8 @@ Item {
Canvas {
id: grid
anchors.fill: parent
property color ink: Color.accent
property color muted: Color.muted
property color ink: Commons.Color.accent
property color muted: Commons.Color.muted
onInkChanged: requestPaint()
onMutedChanged: requestPaint()
onWidthChanged: requestPaint()
Expand Down Expand Up @@ -210,11 +211,11 @@ Item {
required property string modelData
x: index === 1 ? root.width - width : index === 3 ? 0 : (root.width - width) / 2
y: index === 0 ? 0 : index === 2 ? root.height - height : (root.height - height) / 2
text: modelData; color: Color.muted; font.pixelSize: 12; font.family: "monospace"
text: modelData; color: Commons.Color.muted; font.pixelSize: 12; font.family: "monospace"
}
}
Rectangle { anchors.centerIn: parent; anchors.horizontalCenterOffset: -root.centerPixels.x; anchors.verticalCenterOffset: -root.centerPixels.y; visible: Math.hypot(root.centerPixels.x, root.centerPixels.y) < root.chartRadius - 4; width: 7; height: 7; radius: 4; color: Color.foreground }
Text { anchors.centerIn: parent; anchors.horizontalCenterOffset: -root.centerPixels.x; anchors.verticalCenterOffset: 17 - root.centerPixels.y; visible: Math.hypot(root.centerPixels.x, 17 - root.centerPixels.y) < root.chartRadius - 16; text: "YOU"; font.pixelSize: 11; color: Color.muted }
Rectangle { anchors.centerIn: parent; anchors.horizontalCenterOffset: -root.centerPixels.x; anchors.verticalCenterOffset: -root.centerPixels.y; visible: Math.hypot(root.centerPixels.x, root.centerPixels.y) < root.chartRadius - 4; width: 7; height: 7; radius: 4; color: Commons.Color.foreground }
Text { anchors.centerIn: parent; anchors.horizontalCenterOffset: -root.centerPixels.x; anchors.verticalCenterOffset: 17 - root.centerPixels.y; visible: Math.hypot(root.centerPixels.x, 17 - root.centerPixels.y) < root.chartRadius - 16; text: "YOU"; font.pixelSize: 11; color: Commons.Color.muted }
// The selected vessel's recent wake, beneath the contacts. Older segments
// fade out; the line ends at the current position and is clipped to the chart.
readonly property var selectedShip: {
Expand Down Expand Up @@ -263,15 +264,15 @@ Item {
opacity: modelData.stale ? 0.4 : 1
Rectangle {
anchors.centerIn: parent; width: root.markerSize + 10; height: width; radius: width / 2
color: "transparent"; border.width: 1.5; border.color: Color.foreground
color: "transparent"; border.width: 1.5; border.color: Commons.Color.foreground
visible: target.chosen
}
Canvas {
anchors.centerIn: parent; width: root.markerSize; height: width
visible: target.motion === "moving"
rotation: target.orientation !== null ? target.orientation : 0
property color ink: target.ink
property color outline: Color.background
property color outline: Commons.Color.background
onWidthChanged: requestPaint()
onHeightChanged: requestPaint()
onInkChanged: requestPaint()
Expand All @@ -287,9 +288,9 @@ Item {
Rectangle {
anchors.centerIn: parent; width: root.markerSize * 0.75; height: width; radius: width / 2
visible: target.motion !== "moving"
color: target.motion === "stationary" ? target.ink : Color.background
color: target.motion === "stationary" ? target.ink : Commons.Color.background
border.width: target.motion === "stationary" ? 0.6 : 1
border.color: target.motion === "stationary" ? Color.background : target.ink
border.color: target.motion === "stationary" ? Commons.Color.background : target.ink
}
}
}
Expand Down Expand Up @@ -356,7 +357,7 @@ Item {
property bool available: true
signal activated()
width: 32; height: 32; radius: 3
color: Color.background; border.color: activeFocus ? Color.accent : Color.muted
color: Commons.Color.background; border.color: activeFocus ? Commons.Color.accent : Commons.Color.muted
opacity: available ? 0.9 : 0.3
activeFocusOnTab: available
Accessible.role: Accessible.Button
Expand All @@ -365,19 +366,19 @@ Item {
Item {
anchors.centerIn: parent; width: 12; height: 12
visible: !parent.centerIcon
Rectangle { anchors.centerIn: parent; width: 12; height: 2; color: Color.foreground }
Rectangle { anchors.centerIn: parent; width: 2; height: 12; color: Color.foreground; visible: parent.parent.label === "+" }
Rectangle { anchors.centerIn: parent; width: 12; height: 2; color: Commons.Color.foreground }
Rectangle { anchors.centerIn: parent; width: 2; height: 12; color: Commons.Color.foreground; visible: parent.parent.label === "+" }
}
// Draw the reticle geometrically so font metrics cannot shift its center.
Item {
anchors.centerIn: parent; width: 14; height: 14
visible: parent.centerIcon
Rectangle {
anchors.centerIn: parent; width: 10; height: 10; radius: 5
color: "transparent"; border.width: 1; border.color: Color.foreground
color: "transparent"; border.width: 1; border.color: Commons.Color.foreground
}
Rectangle { anchors.centerIn: parent; width: 14; height: 1; color: Color.foreground }
Rectangle { anchors.centerIn: parent; width: 1; height: 14; color: Color.foreground }
Rectangle { anchors.centerIn: parent; width: 14; height: 1; color: Commons.Color.foreground }
Rectangle { anchors.centerIn: parent; width: 1; height: 14; color: Commons.Color.foreground }
}
Keys.onReturnPressed: if (available) activated()
Keys.onEnterPressed: if (available) activated()
Expand Down
5 changes: 3 additions & 2 deletions RadarLabels.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import QtQuick
import qs.Commons
import qs.Commons as Commons
import "Model.js" as Model

// Lay out names after reserving space for the observer and visible contacts.
Expand All @@ -18,8 +19,8 @@ Canvas {
property point viewCenter: Qt.point(0, 0)
property real viewRadiusNm: 25
property real markerSize: 12
property color ink: Color.muted
property color halo: Color.background
property color ink: Commons.Color.muted
property color halo: Commons.Color.background
onGeographyChanged: requestPaint()
onContactsChanged: requestPaint()
onViewScaleChanged: requestPaint()
Expand Down
3 changes: 2 additions & 1 deletion Robot.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import QtQuick
import qs.Commons
import qs.Commons as Commons

// Render the sprite with theme-bound rectangles so palette changes apply immediately.
Item {
Expand Down Expand Up @@ -37,7 +38,7 @@ Item {
width: Math.ceil(root.width / 16)
height: pixel === "b" && (!root.awake) ? 1 : Math.ceil(root.height / 16)
visible: pixel !== "."
color: pixel === "a" ? Color.accent : pixel === "b" ? (!root.awake ? Color.muted : root.eyesLit ? Color.accent : Color.background) : Color.foreground
color: pixel === "a" ? Commons.Color.accent : pixel === "b" ? (!root.awake ? Commons.Color.muted : root.eyesLit ? Commons.Color.accent : Commons.Color.background) : Commons.Color.foreground
}
}
// A gentle bob makes activity visible without distracting from the chart.
Expand Down
Loading