[PR #1672] [CLOSED] Move implementation of padding to DxRenderer #24637

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/1672
Author: @mcpiroman
Created: 6/27/2019
Status: Closed

Base: masterHead: padding-at-renderer-site


📝 Commits (2)

  • 9a8a6de Move implementation of padding to DxRenderer
  • 3011a9d Fix formatting

📊 Changes

4 files changed (+82 additions, -42 deletions)

View changed files

📝 src/cascadia/TerminalControl/TermControl.cpp (+44 -24)
📝 src/cascadia/TerminalControl/TermControl.h (+3 -2)
📝 src/renderer/dx/DxRenderer.cpp (+33 -16)
📝 src/renderer/dx/DxRenderer.hpp (+2 -0)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/1672 **Author:** [@mcpiroman](https://github.com/mcpiroman) **Created:** 6/27/2019 **Status:** ❌ Closed **Base:** `master` ← **Head:** `padding-at-renderer-site` --- ### 📝 Commits (2) - [`9a8a6de`](https://github.com/microsoft/terminal/commit/9a8a6ded12a95a03a0c5e989de18f78ba788d17f) Move implementation of padding to DxRenderer - [`3011a9d`](https://github.com/microsoft/terminal/commit/3011a9d718f300ffd526f3ad234f3bc136f2c2c6) Fix formatting ### 📊 Changes **4 files changed** (+82 additions, -42 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+44 -24) 📝 `src/cascadia/TerminalControl/TermControl.h` (+3 -2) 📝 `src/renderer/dx/DxRenderer.cpp` (+33 -16) 📝 `src/renderer/dx/DxRenderer.hpp` (+2 -0) </details> ### 📄 Description <!-- 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:04:31 +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#24637