[PR #7371] Add titlebars to panes #26912

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

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

State: closed
Merged: No


Summary of the Pull Request

This pull request adds titlebars to panes. Below are a few features / changes:

  • The pane's title can be changed by double-click or by a context menu when right clicking on the titlebar.
  • The tab's title reflects the active pane's title, not the control's title.
  • The pane titlebar's background color can be changed using the "tabColor" setting only right now.
  • If no "tabColor" is chosen, the default is ChromeDisabledHigh.
  • The pane's foreground color is dynamically changed depending on the brightness of its background.

References

This pull request should close #7290 and provides #7075 with a solution.

PR Checklist

  • Closes Programs don't take mouse input due to selection (#7290)
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Documentation updated. If checked, please file a pull request on our docs repo and link it here: #xxx
  • Schema 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: #7290

Detailed Description of the Pull Request / Additional comments

Current Issues with this PR

  • A crash occurs when closing a pane child and then attempting to edit the pane title. I am looking for some guidance here, as I could not figure out the root cause of the issue. Inside the _CloseChild method, if I don't release _firstChild or _secondChild, it works (however creating a memory leak).
  • Currently, setting the tab's background color with the color picker does not update the pane titlebar color.
  • Code Quality – I am sure there are better ways of doing some of the things in this PR (new to the codebase and C++ isn't my primary language). I would be more than happy to make edits based on feedback received.

Future Thoughts:

Validation Steps Performed

  1. Set showPaneTitlebar to true if not already.
  2. Double-Click the title or use the context-menu by right-clicking the titlebar to edit the title.
  3. Confirm by pressing enter or clicking away from textbox. Press escape to cancel the edit.
**Original Pull Request:** https://github.com/microsoft/terminal/pull/7371 **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 This pull request adds titlebars to panes. Below are a few features / changes: - The pane's title can be changed by double-click or by a context menu when right clicking on the titlebar. - The tab's title reflects the active pane's title, not the control's title. - The pane titlebar's background color can be changed using the "tabColor" setting only right now. - If no "tabColor" is chosen, the default is `ChromeDisabledHigh`. - The pane's foreground color is dynamically changed depending on the brightness of its background. <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References This pull request should close #7290 and provides #7075 with a solution. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [X] Closes #7290 * [X] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx * [X] Schema updated. * [X] 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: #7290 <!-- 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 ### Current Issues with this PR - A crash occurs when closing a pane child and then attempting to edit the pane title. I am looking for some guidance here, as I could not figure out the root cause of the issue. Inside the `_CloseChild` method, if I don't release `_firstChild` or `_secondChild`, it works (however creating a memory leak). - Currently, setting the tab's background color with the color picker does not update the pane titlebar color. - Code Quality – I am sure there are better ways of doing some of the things in this PR (new to the codebase and C++ isn't my primary language). I would be more than happy to make edits based on feedback received. ### Future Thoughts: - Add support for changing the pane titlebar background/foreground colors, font/font-size, etc. directly. This was discussed here: https://github.com/microsoft/terminal/issues/7290#issuecomment-674887400 - Add support for changing the pane titlebar background/foreground colors to indicate if a pane is active. My thoughts on that start here: https://github.com/microsoft/terminal/issues/7290#issuecomment-678266263 <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed 1. Set `showPaneTitlebar` to `true` if not already. 2. Double-Click the title or use the context-menu by right-clicking the titlebar to edit the title. 3. Confirm by pressing `enter` or clicking away from textbox. Press `escape` to cancel the edit.
claunia added the pull-request label 2026-01-31 09:18:51 +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#26912