Skip to content

feat(sensors): DPI-aware column density, bordered sections - #2

Merged
mirkobrombin merged 2 commits into
singularityos-lab:mainfrom
perlowja:feat/sensors-responsive-columns
Oct 14, 2026
Merged

mirkobrombin merged 2 commits into
singularityos-lab:mainfrom
perlowja:feat/sensors-responsive-columns

Conversation

@perlowja

@perlowja perlowja commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Makes the sensors detail popover responsive using logical monitor pixels only and keeps the balanced multi-column layout.

The sensors-resource-section rule now lives in the plugin own compact_rows_provider, so the plugin no longer depends on libsingularity for plugin-specific styling.

Verified by building sensors/libsensors.so with Meson and Ninja in a Debian trixie container against the current libsingularity fallback. The 1280 logical-pixel acceptance calculation produces one 340-pixel column at either scale 1 or scale 2.

AI assistance: disclosed

@perlowja
perlowja force-pushed the feat/sensors-responsive-columns branch 2 times, most recently from 2ef5167 to ebed25c Compare September 18, 2026 20:15
@perlowja

Copy link
Copy Markdown
Contributor Author

@mirkobrombin bumping this one - restores the bordered-section styling and DPI-aware column density that got dropped when sensors moved from panel.vala into this plugin. Depends on libsingularity#15 for the CSS class.

@mirkobrombin

Copy link
Copy Markdown
Member

The scale factor logic is backwards: popovers are laid out in logical pixels, so multiplying by scale gives HiDPI screens more columns on less space (1280 logical @2x gets 3 columns, a ~1056px popover). Keep the logical-only calculation. Also move .sensors-resource-section into the plugin's own CSS provider (compact_rows_provider), libsingularity#15 is closed.

@perlowja
perlowja force-pushed the feat/sensors-responsive-columns branch from 93a5bd5 to 05d6471 Compare September 29, 2026 19:07
@perlowja

Copy link
Copy Markdown
Contributor Author

@mirkobrombin both points from your review are fixed in 05d6471 (rebased on main d255d47):

  • the column count uses the logical popover width only; the scale-factor term is gone
  • the .sensors-resource-section style now lives in the plugin's compact_rows_provider, so no libsingularity change is needed

Built on main with shell#30 and desktop#262 on forky arm64: ninja 379/379 targets, meson test 23/23 pass. Please take another look.

perlowja and others added 2 commits October 14, 2026 12:46
The detail popover used a fixed one or two columns. Count columns from the logical monitor width (up to three) and outline each resource section with a plugin-owned style.

Assisted-by: Claude Code:claude-sonnet-5
Assisted-by: Codex:gpt-5.6-sol
AI-Scope: Wrote the multi-column layout and the section outline style.
@mirkobrombin
mirkobrombin force-pushed the feat/sensors-responsive-columns branch from 8553cb7 to 7e0584e Compare October 14, 2026 10:47
@mirkobrombin

Copy link
Copy Markdown
Member

The new math dropped 1280 logical px to a single column, which was two before. I put fixed thresholds back: two columns from 1280, three from 1920. Also rebased and removed the added comment. Merging.

@mirkobrombin
mirkobrombin merged commit 4e177c1 into singularityos-lab:main Oct 14, 2026
1 check passed
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.

2 participants