Skip to content

Show terminal size overlay (COLSxROWS) during resize (#2833)#20059

Open
sagarbhure-msft wants to merge 1 commit intomicrosoft:mainfrom
sagarbhure-msft:feature/resize-overlay
Open

Show terminal size overlay (COLSxROWS) during resize (#2833)#20059
sagarbhure-msft wants to merge 1 commit intomicrosoft:mainfrom
sagarbhure-msft:feature/resize-overlay

Conversation

@sagarbhure-msft
Copy link
Copy Markdown
Contributor

@sagarbhure-msft sagarbhure-msft commented Apr 3, 2026

Summary of the Pull Request

Displays a centered overlay showing columns × rows when the terminal control is resized. The overlay auto-hides after 750ms.

References and Relevant Issues

Closes #2833

Detailed Description

When the user resizes the Terminal window, a themed overlay appears at the center showing dimensions in COLS × ROWS format (e.g. 100 × 27). Matches Konsole, iTerm2, and GNOME Terminal.

Changes (5 files, 52 lines):

  • TermControl.xaml Centered ResizeOverlay Border with themed TextBlock
  • TermControl.cpp Show overlay in _SwapChainSizeChanged, auto-hide via SafeDispatcherTimer
  • ControlCore.cpp/h Added ViewWidth() (mirrors existing ViewHeight())

Design decisions:

  • Center placement (standard for modern terminals)
  • 750ms auto-hide
  • Themed with SystemControlBackgroundAltHighBrush + SystemAccentColor border

Validation Steps Performed

  • Resized window → overlay shows correct COLSxROWS
  • Auto-hides after ~750ms
  • Works with split panes
  • Themed correctly in light/dark modes
sdf

PR Checklist

  • Closes #xxx
  • Tests added/passed
  • Documentation updated
    • If checked, please file a pull request on our docs repo and link it here: #xxx
  • Schema updated (if necessary)

@microsoft-github-policy-service microsoft-github-policy-service bot added Issue-Task It's a feature request, but it doesn't really need a major design. Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Product-Terminal The new Windows Terminal. labels Apr 3, 2026
Display a centered overlay showing columns x rows when the terminal
control is resized. The overlay auto-hides after 750ms of inactivity.

- Add ResizeOverlay Border element to TermControl.xaml
- Add ViewWidth() to ControlCore (matches existing ViewHeight())
- Show overlay in _SwapChainSizeChanged using SafeDispatcherTimer
- Use fmt::format for string formatting

Closes microsoft#2833
@sagarbhure-msft sagarbhure-msft force-pushed the feature/resize-overlay branch from aa7ea3a to c7a51c9 Compare April 4, 2026 07:05
@sagarbhure-msft sagarbhure-msft requested a review from DHowett April 4, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Show terminal size when resizing the window

2 participants