[PR #1672] Move implementation of padding to DxRenderer #24642

Open
opened 2026-01-31 09:04:32 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/1672

State: closed
Merged: No


Summary of the Pull Request

Moved padding from TermControl to DxRenderer. It solves problems with handling pointer input at padded area, since now this is the same control as the text is (#1367). Since this removes padding from _root element, scrollbar now sticks to the right edge (#1365).

It allows the renderer to draw on that area, which can be now somehow used. Specifically, it prevents potential effects from being cut on the char grid edge, when there is still some space for them (like selection outlining, which I would like).

References

PR Checklist

  • Closes #1367, Bug Report - Application error : (0Xc0000142) Help-Wanted (#1365)
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Requires documentation to be updated
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Detailed Description of the Pull Request / Additional comments

  • I implemented this only on DxRendere since padding is only used there.
  • It removes support for floating-point padding, but playing with floating-point pixel dimensions in such cases seems only to cause trouble.

Validation Steps Performed

Set padding, click or select both inside and outside padding, change padding at rutime.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/1672 **State:** closed **Merged:** No --- <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request Moved padding from `TermControl` to `DxRenderer`. It solves problems with handling pointer input at padded area, since now this is the same control as the text is (#1367). Since this removes padding from `_root` element, scrollbar now sticks to the right edge (#1365). It allows the renderer to draw on that area, which can be now somehow used. Specifically, it prevents potential effects from being cut on the char grid edge, when there is still some space for them (like selection outlining, which I would like). <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [X] Closes #1367, #1365 * [X] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Requires documentation to be updated * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments - I implemented this only on `DxRendere` since padding is only used there. - It removes support for floating-point padding, but playing with floating-point pixel dimensions in such cases seems only to cause trouble. <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Set padding, click or select both inside and outside padding, change padding at rutime.
claunia added the pull-request label 2026-01-31 09:04:32 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#24642