Repository navigation
feat(linux-grid): shade alternate rows of the data grid - #3932
Merged
datlechin merged 5 commits intoOct 31, 2026
Merged
Conversation
Every other row of a data grid gets a light shade so a row reads across its columns. A new Show Alternate Row Backgrounds switch in Preferences, on by default as on macOS, turns it off. The shade follows the row's position, since GTK recycles row widgets as the view scrolls, and stays off a selected row.
GTK aborts when a list factory restyles the cell widget it is setting up. The stripe class moves to the cell's child, which now carries the cell padding, as in GTK's file chooser, so the shade spans the cell.
sedax90
pushed a commit
to sedax90/TablePro
that referenced
this pull request
Oct 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
show-alternate-rows, default true). Each open grid follows the key live.:nth-childcannot stripe recycled rows. Each cell's child takes a class from its row'sposition, so stripes stay right after scrolling and when a row is added above.style.cssonvar(--view-fg-color), stronger under high contrast, and stays off a selected row. No runtime CSS provider.Test plan
every_other_row_is_striped_out_to_the_filler(the row number column, both data columns and the filler) andopen_grids_follow_the_stripes_preferencefail on the first version.a_row_added_above_moves_the_stripesandrecycled_rows_take_the_stripe_of_their_new_position(300 rows, scrolled to row 250) check that the stripe follows the position.preference_rows_are_bound, plusdefaults_match_schemaandshow_alternate_rows_round_tripin the storage tests.