Skip to content

fix(panel): give GPU icons the same CSS styling as other sensors - #575

Closed
MatrixNeoKozak wants to merge 1 commit into
corecoding:mainfrom
MatrixNeoKozak:fix/fix-panel-give-gpu-icons-the-same-css-styling-as-other-sensors-1785604770796
Closed

fix(panel): give GPU icons the same CSS styling as other sensors#575
MatrixNeoKozak wants to merge 1 commit into
corecoding:mainfrom
MatrixNeoKozak:fix/fix-panel-give-gpu-icons-the-same-css-styling-as-other-sensors-1785604770796

Conversation

@MatrixNeoKozak

Copy link
Copy Markdown

What

Fixes #565: in the top bar, the GPU icon's value text was shifted ~8px to the right of every other sensor's, and the icon itself rendered visually out of line.

Root cause: hot-sensor keys for GPUs are numbered (_gpu#1_utilization_, _gpu#2_...), so _defaultIcon() built the style class vitals-panel-icon-gpu#1. That class contains a # and cannot match any CSS rule, so the GPU icon was the only panel icon without a .vitals-panel-icon-* rule in stylesheet.css. Every other sensor type defines padding: 0 plus a small right margin there; with the rule missing, GNOME Shell's generic .system-status-icon padding applied to the GPU icon, pushing its value text right and making the icon look smaller/misaligned.

Fix: normalize the style class in _defaultIcon() exactly like _sensorIconPath() already does (gpu#N -> gpu), so all GPUs share one matchable vitals-panel-icon-gpu class, and add the corresponding CSS rule following the existing per-sensor convention. No behavior change for non-GPU sensors.

Why

This change resolves the target issue or improvement.

How to test

Verify that the project builds/runs correctly and the specific bug/improvement is addressed.

Fixes #565

@MatrixNeoKozak MatrixNeoKozak closed this by deleting the head repository Aug 5, 2026
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.

Inconsistent margins and scaled-down GPU icon size in top bar

1 participant