# Centre the compact row when the panel reserves spare width · lucenx/codexbar-plasma

[View on GitCafe](https://git.cafe/lucenx/codexbar-plasma/commit/82a50a3737e29167813cf348a734bddff8f4bb2f)

Repository: [lucenx/codexbar-plasma](https://git.cafe/lucenx/codexbar-plasma)

Visibility: public

Requested revision: 82a50a3737e29167813cf348a734bddff8f4bb2f

Requested commit: 82a50a3737e29167813cf348a734bddff8f4bb2f

Commit: 82a50a3737e29167813cf348a734bddff8f4bb2f

Tree: 4990c756f20e92f83ffb950807db3563745b4f73

Author: Simone

Committer: Simone

## Message

```
Centre the compact row when the panel reserves spare width

desiredWidth keeps a minimum of gridUnit * 4.8, so with panel meters and
no panel text the content is narrower than the applet. The row filled
the applet and left-aligned, piling every spare pixel on the right; with
the popup open, Plasma's full-width active-applet indicator makes the
offset content obvious.

Size the row on its own implicitWidth, clamped to the available space,
and centre it. The clamp preserves the previous behaviour when the
content is wider than the panel allows: the panel text still fills and
elides at the gridUnit * 18 maximum.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

```

## Parents

- [274d0b1716733d89f39ce85c79de70cd0229fc5e](https://git.cafe/lucenx/codexbar-plasma/commit/274d0b1716733d89f39ce85c79de70cd0229fc5e?format=markdown)

[Source at this commit](https://git.cafe/lucenx/codexbar-plasma/tree/82a50a3737e29167813cf348a734bddff8f4bb2f?format=markdown)
