Skip to content

Fit the weather panel to narrow popups - #11238

Open
SimonSchubert wants to merge 4 commits into
omacom:quattrofrom
SimonSchubert:weather-forecast-fit
Open

SimonSchubert wants to merge 4 commits into
omacom:quattrofrom
SimonSchubert:weather-forecast-fit

Conversation

@SimonSchubert

@SimonSchubert SimonSchubert commented Sep 10, 2026 •

Copy link
Copy Markdown

On a screen narrower than the weather panel's 480px, the popup is fitted to the screen, but the two rows inside it are still laid out for 480, so they overlap and clip.

Before After
  • Hero row. Icon-and-temperature is anchored to the left edge and location-and-stats to the right. At 360 logical the popup's content is 318 wide and the halves need 403, so they print 85px on top of each other.
  • Forecast row. Three days centred 44px apart, inside a Flickable that scrolls vertically only (contentWidth: width). The row is 329 wide in 318, so it's clipped at both ends with no way to reach the overflow: Friday's icon loses its left edge, and Sunday's low loses its degree sign.

The change

Both rows scale down to fit, the way SpeedTestOverlay already scales its dial. The hero is laid out at the width its halves need and scaled from its left edge:

width: Math.max(parent.width, heroLeft.width + heroRight.width + Style.space(16 + 20 + 16))
scale: Math.min(1, parent.width / width)
transformOrigin: Item.Left

The 16 + 20 + 16 is the existing left margin, the existing right margin, and a minimum gap between the halves. The forecast row is scaled about its centre:

scale: Math.min(1, parent.width / Math.max(1, width))

Why it's safe

  • Both scales are exactly 1 wherever the content fits, and the hero's width is then parent.width as before, so on a desktop the popup is unchanged.
  • Neither can loop: the widths they read are the rows' own implicit widths, which don't depend on scale or position.
  • At 360 logical the hero renders at about 76%. It keeps the desktop layout's shape, and the popup doesn't grow taller.

Verification

Per agents/skills/visual-verification.md, reference and candidate captures in the running shell (omarchy-restart-shell, then omarchy-shell omarchy.weather open):

  • 720x1440 at scale 2 (360 logical): both rows fit and nothing overlaps or clips. That's the "after" image above.
  • 1920x1080 at scale 1: the popup is unchanged. The capture matches the unpatched one to within 3/255 on 38 pixels, which is llvmpipe's anti-aliasing:
Desktop before Desktop after
  • Live switch between the two, in both directions: each lands where a fresh start at the new size does, and the journal shows no binding-loop warnings.

A companion to #11034, found the same way on a phone-shaped screen. Like that one, it's a narrow-screen robustness fix rather than a mobile-specific one.

Fixes #6991

@SimonSchubert
SimonSchubert force-pushed the weather-forecast-fit branch 2 times, most recently from 2c01209 to 454e81e Compare September 10, 2026 22:33
@SimonSchubert SimonSchubert changed the title Scale the weather forecast row to fit its popup Fit the weather panel to narrow popups Sep 10, 2026
On a screen narrower than the panel's 480px the popup is fitted to what the
screen has, but the two rows inside it are still laid out for 480, so they
overlap and clip.

The hero row anchors icon-and-temperature to the left edge and location-and-
stats to the right. At 360 logical the popup's content is 318 wide and the
halves need 403, so they print 85px on top of each other. The forecast row is
three days centred 44px apart inside a Flickable that scrolls vertically only,
so at 329 in 318 it is clipped with no way to reach the overflow.

Both rows now scale down to fit, the way SpeedTestOverlay scales its dial. The
hero is laid out at the width its halves need and scaled from its left edge;
the forecast row is scaled about its centre. Both scales are exactly 1 wherever
the content fits, so on a desktop the popup renders as before.

Verified in a 720x1440 VM at scale 2 (360 logical) and at 1920x1080, from a
fresh start at each and across a live switch between them in both directions,
with no binding-loop warnings. At 1920x1080 the popup matches the unpatched
render to within llvmpipe's anti-aliasing.
@SimonSchubert
SimonSchubert marked this pull request as ready for review September 10, 2026 22:44
@omarchybot omarchybot added the bug Something isn't working label Sep 27, 2026
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Oct 2, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed and reproduced on an Omarchy worker VM, with this branch merged into current quattro (821ae58). Reviewed by Claude Opus 5.5 alone: the second opinion did not run, because the reviewer's daily budget was spent.

The bug is real, and this fixes it. At 360 logical px (1440x900 portrait at scale 2.5) quattro draws the °C and FEELS on top of the temperature and clips the forecast row (Saturday's icon, Monday's low). With this change both rows fit. Putting quattro's Panel.qml back brings the overlap back.

It also fixes #6991, so I've linked it. With [font] base-size = 9 on a normal 1280x800 desktop, quattro draws the map pin over the °C, and in edit mode the search field over it too. Both match that issue's screenshots, and both are gone with this change. That works because Style.space(480) shrinks with the font while the hero's 64px and 56px glyphs don't.

Nothing changes on a desktop that fits. At 1280x800 and scale 1 the screen matches quattro pixel for pixel apart from the bar clock. Location editing, typing into the search field and the suggestion list all work in the scaled hero. The journal shows no binding-loop warnings.

Tests: test/shell.d/weather-test.sh (57), panel-entries-test.sh, panel-key-catcher-test.sh and qml-text-format-test.sh pass. ./test/cli stops at "vscode generated theme references current theme file" (test 92) on quattro just the same, so the rest of that suite didn't run on either. That failure isn't from this pull request.

Nothing is needed from you. This waits on the second opinion and on the maintainer.

omarchybot and others added 3 commits November 28, 2026 20:49
Keep the original hero typography at the default size and scale it with the shell text setting. Use the painted heights when the hero and forecast shrink, and exercise both rows at a capped width with the real QML bindings.

Co-Authored-By: Tech Man Dan <dan.inman@hotmail.co.uk>
Co-Authored-By: GPT-6 in Codex <noreply@openai.com>
Wait for layout and confirm that the narrow fixture actually scales populated rows. Measure the transformed bounds so the test also catches unused row height and checks the default typography.

Co-Authored-By: Opus 5.5 High <noreply@anthropic.com>
@omarchybot omarchybot removed verified Omarchy Triage has verified that this issue is ready for final review bug Something isn't working labels Nov 28, 2026
@greptile-apps

greptile-apps Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge; no actionable issues were found.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

The weather panel now shrinks its hero and forecast rows to fit narrow popups.

  • The weather hero keeps its halves inside a narrow popup.
  • The forecast row shrinks to fit the weather popup.

No actionable issues were found. Runtime tests and visual captures were not run during this review.

Reviews (1) · Last reviewed commit: "Check the rendered height of capped Weat..." · Reviewed by Greptile

@omarchybot

Copy link
Copy Markdown
Collaborator

I folded the Weather sizing and regression coverage from #20665 into 2400816, with Tech Man Dan credited in the commit. At 400 logical pixels on an Omarchy ISO worker, the temperature overlapped the location and stats on quattro and again after reverting the patch. The updated panel kept the rows within the popup, and the location remained editable at text size 9. The capped-width regression test and the full ./test/all suite passed on the updated head.

The comparison with #17633 and #20226 focused on keeping both rows visible when the screen caps the popup.

GPT-6 in Codex (high effort) reviewed and tested the change. Opus 5.5 High found no remaining code defects in the diff and used the worker evidence I supplied for the rendered result. Greptile scored this revision 5/5 with no findings. I classified the revised head as a bug fix for #6991, and DeepSeek V4P1 Flash classified it as an enhancement. The classification is unsettled, and GitHub Actions is waiting for maintainer approval.

Before, the temperature overlaps the location and feels-like column

After, the temperature, location and stats fit at the same width

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Weather plugin: Current location icon() overlaps on the current weather state

2 participants