Add a setting to manually set the Pane highlight color #4259

Open
opened 2026-01-30 23:42:21 +00:00 by claunia · 7 comments
Owner

Originally created by @zadjii-msft on GitHub (Oct 4, 2019).

Follow up from #994 and PR:#3060

In the aforementioned PR, we're just using the accent color for highlighting the pane. We should let that be a customizable global setting.

Questions:

  • There's been discussion before about allowing custom theming, hypothetically powered by XAML. Would we want to wait for that discussion to be had before we do this?
    • We'd probably want to change it from using SystemAccentColor to some FocusedPaneBorder color resource, that we define by default to be SystemAccentColor, should we decide to pursue this option
    • If we do want to do this in XAML later, would enabling it in the json now negatively impact that future scenario?
Originally created by @zadjii-msft on GitHub (Oct 4, 2019). Follow up from #994 and PR:#3060 In the aforementioned PR, we're just using the accent color for highlighting the pane. We should let that be a customizable global setting. Questions: * There's been discussion before about allowing custom theming, hypothetically powered by XAML. Would we want to wait for that discussion to be had before we do this? - We'd probably want to change it from using `SystemAccentColor` to some `FocusedPaneBorder` color resource, that we define by default to be `SystemAccentColor`, should we decide to pursue this option - If we do want to do this in XAML later, would enabling it in the json _now_ negatively impact that future scenario?
claunia added the Area-SettingsIssue-TaskIn-PRProduct-TerminalArea-Theming labels 2026-01-30 23:42:21 +00:00
Author
Owner

@javierdlg commented on GitHub (Oct 29, 2019):

We're actually very interested in this since we have found a few contrast ratio issues with our colors and the terminal. We've also received some feedback since the terminal is the only tool that has different highlighting colors in VS:
image

Any ideas on the cost for this feature request?

@javierdlg commented on GitHub (Oct 29, 2019): We're actually very interested in this since we have found a few contrast ratio issues with our colors and the terminal. We've also received some feedback since the terminal is the only tool that has different highlighting colors in VS: ![image](https://user-images.githubusercontent.com/2334756/67793279-c1053500-fa37-11e9-84ab-0fb0a10ccf11.png) Any ideas on the cost for this feature request?
Author
Owner

@zadjii-msft commented on GitHub (Oct 29, 2019):

@javierdlg I think you're probably looking for #3326 - this issue is about the color used to indicate that a pane is focused (which is currently in PR in #3060). I'll respond to the ask in that thread :)

@zadjii-msft commented on GitHub (Oct 29, 2019): @javierdlg I think you're probably looking for #3326 - this issue is about the color used to indicate that a pane is focused (which is currently in PR in #3060). I'll respond to the ask in that thread :)
Author
Owner

@SkyTrix commented on GitHub (Jul 20, 2020):

Not sure if this should be a separate issue, but in addition to this, it would be nice to be able to completely hide the focused pane border when the Terminal isn't the active application. I often have a few panes open on a separate screen where the focused pane border becomes more of a distraction than a help when the Terminal isn't the active window and I'm just glancing over at the outputs of the different panes.

@SkyTrix commented on GitHub (Jul 20, 2020): Not sure if this should be a separate issue, but in addition to this, it would be nice to be able to completely hide the focused pane border when the Terminal isn't the active application. I often have a few panes open on a separate screen where the focused pane border becomes more of a distraction than a help when the Terminal isn't the active window and I'm just glancing over at the outputs of the different panes.
Author
Owner

@zadjii-msft commented on GitHub (Feb 6, 2023):

Note

Walkthrough

  • Start by adding a new Theme object for Panes:
    • PaneTheme in Theme.idl, quite similar to TabRowTheme in the same file
    • Add a single ThemeColor ActiveBorderColor to that runtimeclass.
    • In MTSMSettings.h, define a new MTSM_THEME_PANE_SETTINGS, again taking cues from the tab row version. The key for this one should just be "pane"
    • Add a THEME_OBJECT(PaneTheme, MTSM_THEME_PANE_SETTINGS); to Theme.h
    • Add the pane theme to the other places theme objects appear in Theme.cpp as well.
  • The "hard" part: actually plumb that color through to the panes
    • Pane currently uses a static `Brush for the border colors. It probably shouldn't.
    • TerminalPage::_updateThemeColors is what updates theme colors to the tabs, the window, etc. Similarly, it should plumb that through to all the panes.
      • WalkTree is a really handy helper for doing something to every pane.
    • Make sure that a null or otherwise omitted pane.activeBorderColor still uses accent by default
  • While you're here, probably add a similar pane.inactiveBorderColor, for controlling the appearance of the inactive pane border color.

Once this is done, if you wanted to get really ambitious, you could follow up with a similar property to configure the pane hover color, ala #8564.

@zadjii-msft commented on GitHub (Feb 6, 2023): > **Note** > ## Walkthrough * [ ] Start by adding a new Theme object for Panes: * [ ] `PaneTheme` in `Theme.idl`, quite similar to `TabRowTheme` in the same file * [ ] Add a single `ThemeColor ActiveBorderColor` to that `runtimeclass`. * [ ] In `MTSMSettings.h`, define a new `MTSM_THEME_PANE_SETTINGS`, again taking cues from the tab row version. The key for this one should just be `"pane"` * [ ] Add a `THEME_OBJECT(PaneTheme, MTSM_THEME_PANE_SETTINGS);` to `Theme.h` * [ ] Add the pane theme to the other places theme objects appear in Theme.cpp as well. * [ ] The "hard" part: actually plumb that color through to the panes * [ ] `Pane` currently uses a `static` `Brush for the border colors. It probably shouldn't. * [ ] `TerminalPage::_updateThemeColors` is what updates theme colors to the tabs, the window, etc. Similarly, it should plumb that through to all the panes. * [ ] `WalkTree` is a really handy helper for doing something to every pane. * [ ] Make sure that a `null` or otherwise omitted `pane.activeBorderColor` still uses `accent` by default * [ ] While you're here, probably add a similar `pane.inactiveBorderColor`, for controlling the appearance of the inactive pane border color. Once this is done, if you wanted to get really ambitious, you could follow up with a similar property to configure the pane hover color, ala #8564.
Author
Owner

@peter-lee20 commented on GitHub (Aug 26, 2024):

Hello, can I take a stab at this?

@peter-lee20 commented on GitHub (Aug 26, 2024): Hello, can I take a stab at this?
Author
Owner

@Haaziq386 commented on GitHub (Oct 27, 2024):

@zadjii-msft where is the Theme.idl file i.e in which folder ?

@Haaziq386 commented on GitHub (Oct 27, 2024): @zadjii-msft where is the `Theme.idl` file i.e in which folder ?
Author
Owner

@zadjii-msft commented on GitHub (Oct 28, 2024):

@Haaziq386 src/cascadia/TerminalSettingsModel/Theme.idl

@zadjii-msft commented on GitHub (Oct 28, 2024): @Haaziq386 [src/cascadia/TerminalSettingsModel/Theme.idl](https://github.com/microsoft/terminal/blob/8d3f12b1c065a965974cd6b5bc7a81176ffb0f1b/src/cascadia/TerminalSettingsModel/Theme.idl)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#4259