Skip to content

Fix scrollable padding - #1466

Merged
mmstick merged 1 commit into
pop-os:masterfrom
git-f0x:master
Oct 19, 2026
Merged

mmstick merged 1 commit into
pop-os:masterfrom
git-f0x:master

Conversation

@git-f0x

@git-f0x git-f0x commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Fixes vertical scrollable padding, since .direction() overrides the padding set before it.


  • I have not included any LLM (also known as AI) generated content in this PR, including code, comments, and descriptions.
  • I understand these changes in full and will be able to respond to review comments.
  • My change is accurately described in the commit message.
  • My contribution is tested and working as described.
  • I have read the Developer Certificate of Origin and certify my contribution under its conditions.
  • I have read and followed all of the above requirements. For more information, see our contributor guide.

@git-f0x
git-f0x marked this pull request as ready for review October 9, 2026 21:29
@git-f0x
git-f0x force-pushed the master branch 2 times, most recently from 1f3e533 to 7e6c597 Compare October 11, 2026 19:34
@mmstick

mmstick commented Oct 12, 2026

Copy link
Copy Markdown
Member

I don't think this is the correct approach since it works around the issue and requires applications to manually call this workaround in their application. Padding issues with the main content area should be worked out internally with the widgets. The Core logic also already tracks whether an application is condensed or not so we shouldn't need to manually calculate breakpoints.

@git-f0x

git-f0x commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Apps already manually do their content padding. This would just ensure the padding follows designs and devs don't need to know the logic.
I don't know how else this could be done, since if the main content is a scrollable, padding shouldn't be applied around it in libcosmic. It could maybe work if libcosmic added a scrollable itself, but that would also need ways to add non-scrolling content above (and maybe below?) the scrollable, alongside an opt-out flag for the scrollable where it isn't applicable (like cosmic-edit or terminal).

The Core logic also already tracks whether an application is condensed or not so we shouldn't need to manually calculate breakpoints.

Maybe I misunderstand this, but is_condensed is separate from the horizontal padding. is_condensed just indicates if it's a single-column view, while padding changes based on both the view and the content width in the designs.

@mmstick

mmstick commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

It's already not ideal that applications are manually applying padding so it would not be ideal to make this workaround a standardized requirement. The application view is already managing padding for thresholds as needed to compensate for the navbar behavior (condensed and collapsed) so we shouldn't need a second layer that applications have to manually apply on top of that.

@git-f0x git-f0x changed the title Add method for getting horizontal padding values from designs Fix scrollable padding Oct 18, 2026
@git-f0x

git-f0x commented Oct 18, 2026

Copy link
Copy Markdown
Contributor Author

I've moved the padding method to a different branch so it can be used as a reference in the future with the new scrollable container widget.
This now has just the scrollable padding fix.

@git-f0x

git-f0x commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

@mmstick (sorry for the ping), can this maybe be merged to fix the regression (that I caused 😅)?

@mmstick
mmstick merged commit 430f3d4 into pop-os:master Oct 19, 2026
16 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.

2 participants