Skip to content

Gnome: equalize d-pad cell widths - #137

Merged
JumpLink merged 1 commit into
mainfrom
fix/dpad-cell-widths
Jun 12, 2026
Merged

Gnome: equalize d-pad cell widths#137
JumpLink merged 1 commit into
mainfrom
fix/dpad-cell-widths

Conversation

@JumpLink

Copy link
Copy Markdown
Owner

Summary

The up/down d-pad buttons were 2px narrower than the center box (1px offset per side), see #136.

Cause: All d-pad buttons share width-request: 50. The icon buttons get 5px horizontal padding from libadwaita's .image-button rule, so their CSS minimum (32px osd min-width + 10px) stays below the width-request. The empty center filler is not an image button and keeps the default 10px-per-side padding, pushing its minimum width to 52px — overruling the width-request. With halign: center, the 50px up/down buttons floated centered inside the 52px column.

Fix: Give the center filler the same horizontal padding as the icon buttons via a new gamepad.css, so every cell is exactly 50px.

Verification

Ran the app and pixel-analyzed a screenshot of the d-pad: up, center, and down cells now all span the same 50px (previously the center was 52px wide); all seams are flush, including the left/right button rows.

Before After
Up button left edge offset 1px from center box All three vertical cells share identical edges

Fixes #136

The empty center filler keeps the default button padding (10px per
side) instead of the 5px the surrounding icon buttons get from
libadwaita's .image-button rule. Combined with osd's 32px min-width
that pushed its minimum width to 52px, overruling the shared 50px
width-request and offsetting the up/down buttons by 1px per side.
Give the filler the icon buttons' padding so every cell is 50px.

Fixes #136
@JumpLink
JumpLink merged commit 2395053 into main Jun 12, 2026
3 checks passed
@JumpLink
JumpLink deleted the fix/dpad-cell-widths branch June 12, 2026 19:08
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.

vertical buttons on d-pad are short

1 participant