Conversation
2ef5167 to
ebed25c
Compare
|
@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. |
|
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 |
Two related restorations to the sensors popover's detail layout, both regressed when sensors moved from panel.vala into its own plugin: 1. Column count now derives from the monitor scale factor as well as logical width (see configure_detail_layout()), up to 3 columns instead of a fixed 1-or-2 split at one logical-width breakpoint. A scaled HiDPI panel can therefore use more columns than a native low-resolution display at the same logical width. Ports the density calculation from a working, screenshot-verified prototype (SensorsIndicator, merged upstream once already as #27, later simplified when sensors moved into this plugin). 2. begin_detail_section() now applies the sensors-resource-section CSS class (singularityos-lab/libsingularity#15) so each resource-pool section reads as a bordered card, restoring styling from an earlier unmerged NCZ patch (df20256) that never survived the plugin rewrite. Section-to-column placement stays the same always-balance-the-shortest- column approach already in place, just generalized from 2 fixed fields (detail_left/detail_right) to an array sized by the new column count. The scrolled-window safety net for unusually many rows on a short display is unchanged. Depends on singularityos-lab/libsingularity#15 for the CSS class. awareness, wired the outline CSS class into begin_detail_section(). Assisted-by: Claude Code:claude-sonnet-5 AI-Scope: Ported DPI-aware balanced column layout (get_scale_factor()-based density calc, up to 3 columns) for the sensors panel from a prior NCZ prototype.
Assisted-by: Codex:gpt-5.6-sol AI-Scope: Corrected responsive sensor columns and moved section styling into the plugin CSS provider.
93a5bd5 to
05d6471
Compare
|
@mirkobrombin both points from your review are fixed in 05d6471 (rebased on main d255d47):
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. |
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