Skip to content

Grid picker cells: revert uneven padding, uniform 3px margins - #480

Merged
Linuxuser67 merged 3 commits into
mainfrom
revert/grid-cell-pad
Oct 19, 2026
Merged

Linuxuser67 merged 3 commits into
mainfrom
revert/grid-cell-pad

Conversation

@Linuxuser67

@Linuxuser67 Linuxuser67 commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Supersedes #478. Uniform 3px margins on all sides of the factory cell box — GridView has no spacing properties, the child margins are the only inter-cell gap mechanism (libadwaita paints gridview > child:selected over the whole cell). 3px everywhere = 6px gap on both axes, matching GNOME's 6px spacing rhythm; #478's 4/6 split produced unequal 8/12px gaps.

houssemko added 2 commits October 19, 2026 11:38
#478 used 4px vertical and 6px horizontal margins, giving 8px row gaps
and 12px column gaps — unequal and off the 6px GNOME rhythm. One
uniform 3px on all sides yields 6px between cells on both axes.
@Linuxuser67 Linuxuser67 changed the title Revert "Pad grid picker cells on both axes" Grid picker cells: revert uneven padding, uniform 3px margins Oct 19, 2026
@Linuxuser67

Copy link
Copy Markdown
Owner Author

beta.16 investigation: the chip (the theme's gridview > child:selected painting) spans the whole cell node, so #478's margins on the inner box only moved content inside the chip. The 3px margins now go on the ListItem itself — the widget the chip is painted on — so the chip shrinks with the gap.

@Linuxuser67

Copy link
Copy Markdown
Owner Author

Correction to the first attempt: GtkListItem is not a GtkWidget (docs confirm ancestors = GObject only), so Rust-side margins don't exist and my set_margin block wouldn't compile. The chip is painted on the item's gridview > child CSS node spanning the whole cell, so the 3px gaps now ship as an app stylesheet rule on that exact node (margin: 3px, APPLICATION priority, loaded once per display) — the same node adwaita itself pads by 3px for these cells.

The chip is the theme's painting of the gridview > child node, which
spans the whole cell, and GtkListItem is not a widget — margins can't
be set from Rust at all. Inner-box margins (beta.16 report) only inset
content inside the chip. Ship a small app stylesheet rule instead:
gridview > child { margin: 3px } on the same node, loaded once per
display. 3px = 6px gap between cells on both axes, the GNOME rhythm.
@Linuxuser67
Linuxuser67 merged commit f678acc into main Oct 19, 2026
5 checks 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.

1 participant