Rebrand to Offscale and rework the panel header

Forked from omarchy.tailscale at the packaged commit (omarchy-dev
4.0.0.r1744.gf002044). The `tailscale` branch holds the pristine upstream
subtree history so upstream changes can still be merged in; `master` is
this fork.

- Rename the plugin to pastilhas.offscale: manifest id/name, moduleName
  and ipcTarget, and display strings. Deliberately NOT renamed: the
  lowercase "tailscale" CLI invocations, the TailscaleIPs/TailscaleIPv6
  JSON fields from `tailscale status --json`, and
  authorizeTailscaleOperator. Renaming those loads fine but silently
  breaks peer parsing.
- TailscaleIcon.qml -> OffscaleIcon.qml, now rendering offscale-logo.png
  instead of the 3x3 dot grid, keeping the crossed/warning states.
- Add OffscaleHero.qml: a copy of qs.Ui.PanelHero with a titleComponent
  slot, so the wordmark (offscale-text.png) can replace the title text.
  Otherwise byte-identical to the original, so it stays diffable.
- Drop the cycling hero phrases entirely - the array, the 2.8s timer and
  the metaOpacity fade.
- Show the local machine as a PeerRow of its own, so it gets the same
  layout and copy menu as tailnet peers. Adds `navigable` to PeerRow so
  that row stays out of the peers keyboard cursor.
- Enlarge the bar icon: BarIconButton pins its icon to opticalCanvas, so
  opticalSize/slotSize are overridden alongside iconSize.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-15 17:04:41 +01:00
co-authored by Claude Opus 5
parent ba90129612
commit 0912b2b50d
9 changed files with 275 additions and 102 deletions
+74
View File
@@ -0,0 +1,74 @@
import QtQuick
import qs.Commons
import qs.Ui
Item {
id: root
property real iconSize: Style.font.icon
property color color: Color.foreground
property color badgeColor: Color.urgent
property bool crossed: false
property bool warning: false
width: iconSize
height: iconSize
implicitWidth: iconSize
implicitHeight: iconSize
// The Offscale mark, replacing the stock 3x3 Tailscale dot grid.
//
// offscale-logo.png lives beside this file rather than being referenced from
// ~/projects, so the plugin stays self-contained and keeps working if that
// tree moves. It is the source PNG trimmed of its transparent margin, padded
// back to square so it centres, and scaled 1254 -> 256 (1.1 MB -> 77 KB).
//
// sourceSize caps the decode at 256 regardless of how large iconSize gets, so
// the bar slot never decodes more pixels than it needs; mipmap keeps the
// downscale to ~27px clean instead of aliased.
Image {
id: logo
anchors.fill: parent
source: Qt.resolvedUrl("offscale-logo.png")
sourceSize.width: 256
sourceSize.height: 256
fillMode: Image.PreserveAspectFit
smooth: true
mipmap: true
// Dim the mark when Tailscale is down, matching how the stock icon faded
// its inactive dots.
opacity: root.crossed ? 0.45 : 1.0
}
// Diagonal strike when disconnected.
Rectangle {
visible: root.crossed
anchors.centerIn: parent
width: parent.width * 1.22
height: Math.max(2, parent.height * 0.14)
radius: height / 2
color: root.color
rotation: -45
}
// "!" badge when a login is needed.
BorderSurface {
visible: root.warning
width: Math.max(7, parent.width * 0.42)
height: width
radius: width / 2
color: root.badgeColor
anchors.right: parent.right
anchors.bottom: parent.bottom
borderSpec: Border.flat(Color.popups.background, 1)
Text {
anchors.centerIn: parent
text: "!"
color: Color.background
font.family: Style.font.family
font.pixelSize: Math.max(6, parent.height * 0.72)
font.bold: true
}
}
}