Wi-Fi network panel: QR / speed-test header highlight doesn't line up with the button
Description
In the network (Wi‑Fi) panel, the keyboard/hover cursor highlight on the QR code and speed test header buttons is not aligned with the actual button. The highlight box comes out visibly wider‑than‑tall (lopsided) around the roughly square icon instead of tracking the control, so it reads as offset/misaligned.
Steps to reproduce
- Open the network panel (click the network/ Wi‑Fi widget in the bar).
- With a Wi‑Fi connection active (so the QR and speed‑test actions are visible), hover the QR button or the speed‑test button, or keyboard‑navigate to the header section.
- Observe the cursor/hover highlight: it is an asymmetric rounded rectangle around the icon rather than a balanced box centered on the button.
Expected
The cursor highlight should be a symmetric box (or ring) centered on the control, matching how every other header action in the kit renders (e.g. the audio/bluetooth power ToggleSwitch, or PanelActionButton/CursorSurface rows).
Root cause (from code)
The two header actions are Button components with asymmetric padding in shell/plugins/panels/network/Panel.qml (around lines 1110–1140):
horizontalPadding: Style.space(5)(5px each side → 10px total)verticalPadding: Style.space(2)(2px each side → 4px total)iconSize: Style.font.subtitle * 1.5(~20px glyph)
The cursor/hover highlight is the Button's own color fill, sized to exactly iconW + 2·hPad × iconH + 2·vPad (shell/Ui/Button.qml:73‑74). Around a ~20px square icon that yields a ~30×24px highlight — wider than tall — so it doesn't track the (near‑square) button.
This is also the only header cursor target in the kit implemented as a raw Button. Every other one uses ToggleSwitch (external ring, shell/Ui/ToggleSwitch.qml:68‑74) or PanelActionButton/CursorSurface. The dev‑gallery explicitly calls out CursorSurface + PanelActionButton as the component new panel action buttons should use (shell/plugins/dev‑gallery/GalleryPanel.qml:1684).
Suggested fix
Replace the two Buttons with PanelActionButton (the canonical inline‑action component). Its size is max(Style.space(22), fontSize + Style.spacing.sm * 2) — a symmetric square — so the highlight is centered on the icon:
PanelActionButton {
id: qrAction
visible: root.canShareWifi
iconText: ""
tooltipText: "Show QR code"
foreground: root.bar.foreground
fontFamily: root.bar.fontFamily
fontSize: Style.font.subtitle * 1.5
hasCursor: root.qrHeaderHasCursor
Layout.alignment: Qt.AlignVCenter
onHovered: function(on) { if (on) root.setHeaderCursor(root.qrHeaderIndex) }
onClicked: root.summonWifiQr()
}
// same swap for speedAction (speedHeaderIndex / summonSpeedTest)
PanelActionButton already supports hasCursor, onHovered(bool), onClicked(), and tooltipText, so no other wiring changes are needed. (Minimal alternative: make the padding symmetric, e.g. verticalPadding: Style.space(5).)
System details
- Omarchy version: 4.0.1-1
- CPU: Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz
- GPU: Intel Corporation Ivy Bridge mobile GT2 [HD Graphics 4000]; NVIDIA GeForce 610M/710M (GF117M)
- Kernel: 7.1.9-arch1-2
Note:
omarchy debugis not present in 4.0.1 (Unknown Omarchy command: omarchy debug), so the debug log could not be attached. A screenshot of the lopsided highlight on the QR / speed‑test buttons should be attached to confirm.
Thanks for the detailed write-up. I couldn't reproduce this on a stock install, and the root cause in the report doesn't hold up when measured, so I need a little more from you to go further.
What I checked, on a fresh Omarchy VM running current quattro with its default font (JetBrainsMono Nerd Font) and theme:
- The size of the highlight. I built the two buttons exactly as
shell/plugins/panels/network/Panel.qmlconfigures them and measured them in Quickshell. The QR button's highlight is 27×33 px and the speed-test button's is 29×33 px, so taller than wide rather than wider. The report's ~30×24 assumes a ~20 px square text box. Qt sizes aTextfrom the font's line height instead, about 27 px here. The small 2 px vertical padding offsets that, and the result comes out close to square. - The real panel. I opened the Network panel and put the keyboard cursor on the speed-test button. The VM has only Ethernet, so the QR button doesn't show. The highlight is a near-square box, and the icon sits centred in it to within about a pixel.
- Your version. None of the sizing for these buttons has changed between v4.0.1 and
quattro:Panel.qmlhas the same padding andshell/Ui/Button.qmlthe same sizing.
The second opinion came from Codex at medium effort. It agreed with the measurements, but it could read this analysis, so treat that agreement as not fully independent. It added one finding, which I checked against the source: a theme or shell.toml that sets [spacing] scale to about 2 doubles both paddings through Style.space() (shell/Commons/Style.qml:210-218). That makes the speed-test highlight slightly wider than tall (about 39×37). A different font, base-size or font-token override also changes the shape. So what you're seeing probably depends on your setup, and I can't see it from a stock install.
To take this further, could you add:
- A screenshot of the highlight on the QR and speed-test buttons.
- The output of
fc-match monospace. - Any
[font]or[spacing]settings in~/.config/omarchy/shell.tomlor your current theme'sshell.toml.
On the suggested fix: switching to PanelActionButton would change more than the shape. That component draws no hover border unless it is bordered, so the keyboard cursor here would lose the border Button always draws. That makes the switch a design choice rather than a straight fix, and it's for the maintainer to make. This issue is waiting on the details above.
Thanks for checking. Details below.
Screenshots (keyboard cursor, Tokyo Night, laptop panel 1600×900 @ 1.25 scale). QR highlighted, speed test highlighted, and both at 5× zoom:
fc-match monospace
JetBrainsMonoNerdFont-Regular.ttf: "JetBrainsMono Nerd Font" "Regular"
[font] / [spacing]: stock. There's no ~/.config/omarchy/shell.toml, and the theme's generated shell.toml has [spacing] scale = 1.0, scale-with-font = true, [font] base-size = 12, and no per-token overrides. Omarchy 4.0.4-1.
Correction to my report: you're right about the shape. Measured from these screenshots, the highlights are 34×41 and 36×41 physical px at 1.25×, which is ~27×33 and ~29×33 logical. They're taller than wide, not the ~30×24 I estimated. That matches your numbers, so the setup isn't a factor. My estimate assumed a ~20px text box instead of the font's line height. The highlight is still not square around the icon, which is what #8787 fixes (you measured 28×28 there).
On PanelActionButton dropping the hover border: agreed that's a design call for the maintainer. It matches the other PanelActionButton cursor targets (Bluetooth row action, dev gallery).
Thanks for the screenshots and settings. They settle what I asked about: on a stock setup the highlights are about 27×33 and 29×33 logical px, the same as I measured on a fresh VM, so your font and spacing aren't a factor. The icon is centred in the box; what remains is that the box is taller than wide rather than square.
I checked current quattro (c352b62d) again. qrAction and speedAction in shell/plugins/panels/network/Panel.qml are still Buttons with horizontalPadding: Style.space(5) and verticalPadding: Style.space(2), so nothing there has changed the shape since your report.
#8787 is the fix for this and already says it closes this issue. It was verified on an Omarchy worker at 725136e3: both highlights went from 27×33 and 29×33 to 28×28, and back again with the change reverted. It still merges cleanly onto current quattro. Besides the shape, it changes a few other visible things, all of which match the Bluetooth row action that already uses PanelActionButton: the keyboard cursor loses Button's 1px border, a press no longer shows a separate pressed fill, the hover fade is shorter, and the tooltip takes the theme's corner radius instead of square corners.
Reviewed by Claude Opus 5.5, with a second opinion from Codex Medium. Codex agreed on the sizing and contributed the pressed-fill, animation and tooltip differences above, which I checked against shell/Ui/Button.qml and shell/Ui/PanelActionButton.qml. It also pointed out that nothing in the kit requires header actions to be square, so whether that's worth those trade-offs is a design call. That decision, and merging #8787, are with the maintainer. Nothing more is needed from you.
No. The icon is NOT centered in the highlighted box. There is noticeably less padding on the right side than the left side
I measured the horizontal centring itself this time, on a fresh Omarchy VM running current quattro (c352b62d) at Hyprland scale 1.25, with JetBrainsMono Nerd Font and the stock theme. The buttons are built exactly as Panel.qml declares them, and the counts are physical pixels between the edge of the highlight and the icon:
| left | right | |
|---|---|---|
QR, current Button |
8 | 7 |
Speed test, current Button |
8 | 8 |
QR, PanelActionButton as in #8787 |
9 | 7 |
Speed test, PanelActionButton as in #8787 |
8 | 6 |
The box sizes come out at 34×41 and 36×41, the same as yours. At scale 1 the current buttons are 6/6 on both.
Both icons draw wider than the font says they are: their advance is 0.6 em, but their ink runs 0.75 and 0.83 em to the right. Button already sizes the box from the full drawn width (shell/Ui/Button.qml:74), so on quattro I can't find more than one pixel of rounding.
#8787 makes the right side tighter, not looser. PanelActionButton is 27.5 px square here, and its icon is placed with anchors.centerIn (shell/Ui/PanelActionButton.qml:74), which Qt rounds to a whole pixel. That puts both icons about 0.75 logical px right of centre, about one physical pixel at 1.25. That is the asymmetry you describe, so if your screenshots came from the #8787 branch, this would explain them.
I couldn't open your screenshot attachments from here. Could you say which build the screenshots were taken on, quattro or #8787, and how many pixels of space you count on each side of the icon in the 5× zoom?
Reviewed by Claude Opus 5.5, with a second opinion from Codex Medium. Codex found no mechanism on quattro beyond a pixel of rounding. It named the anchors.centerIn rounding behind #8787's offset, and noted that a brightness-threshold measurement shows where pixels are drawn, not how balanced the icon looks. It could read this analysis, so its agreement is not fully independent. Whether #8787 lands is for the maintainer; the counts above are what this waits on.
They're from stock quattro, not #8787: Omarchy 4.0.4-1 from the package, with qrAction and speedAction still Buttons with horizontalPadding: Style.space(5) / verticalPadding: Style.space(2). Captured from the real Network panel with grim -o LVDS-1 (1600×900 @ 1.25), keyboard cursor on each button.
Physical pixels of highlight fill between the 1px border and the icon ink, read off a single pixel row through the middle of each box:
| left | right | box (incl. border) | |
|---|---|---|---|
QR, current Button |
7 | 5 | 34×41 |
Speed test, current Button |
7 | 5 | 36×41 |
The QR row, for example (max channel, 52 = fill, 82 = border):
82 52 52 52 52 52 52 52 105 213 214 … 214 161 55 52 52 52 52 82
└───── 7 fill ─────┘ ink … ink └──── 5 fill ────┘
Top and bottom are even (10 / 10). So on the real panel it's a 2px left/right imbalance, not the ≤1px your fixture shows. The box sizes match yours, so the difference is probably in where the button lands in the real layout rather than its size. At 1.25, the panel's fractional x position could change which way the icon rounds, but I haven't confirmed that. It also lines up with @fabianbehrendt's measurement on #8787 of the current Button being 7 / 5 horizontally, and with the Math.round / Math.ceil fixes suggested there for both Button and PanelActionButton.
Thanks, those counts settled it. I reproduced your 7 / 5 on the real Network panel on a fresh Omarchy VM running current quattro (c352b62d) at scale 1.25: the speed-test highlight is 37×41 with 7 px of fill left of the icon and 5 px right, and 10 / 10 top and bottom. My earlier fixture missed it because nothing there snapped the button's width, and the cause turns out to be exactly that.
Cause. The header's RowLayout gives the speed-test button a whole-pixel width of 29. Button centres its icon with anchors.horizontalCenter, and Qt rounds the button's centre and the icon row's centre separately: 15 − 8 puts the row at x 7, where the true centre is 6.01. That one logical pixel is your 2 px imbalance at 1.25. It isn't specific to these two actions: any Button whose layout width rounds that way is off by the same pixel.
Fix: #14700. Button now places its content at a rounded x, so it sits on a whole pixel within half a pixel of the centre. On the same VM the speed-test highlight goes from 7 / 5 to 6 / 7. The leftover space there is an odd number of pixels, so a one-pixel split is the best any layout can do. The icon's ink centre moves from 1.06 px right of the box's centre to 0.18 px left of it. A new test builds buttons at whole and fractional widths, mirrored and not; it fails on quattro and passes with the fix. The full shell suite fails the same eight unrelated files with and without the change, and ./test/cli passes. It follows the rounding @fabianbehrendt proposed on #8787.
This was reviewed by Claude Opus 5.5, with a second opinion from Codex Medium over three rounds. Codex pinned down the separate-rounding mechanism in Qt's anchor code. It also found that the first version of the fix would have broken right-to-left mirroring for left-aligned buttons and left a mirrored centred button on a fractional pixel; both are fixed in #14700. Its last round found nothing open. It could read this session's analysis, so where it simply agreed, that agreement is not fully independent.
#8787 handles the other half of this issue, the box being taller than wide, by switching these two actions to PanelActionButton. That component centres with anchors.centerIn, which rounds the same way, so it would need the same correction. Which of the two lands, or both, is the maintainer's call. Nothing more is needed from you.