terminal icon indicating copy to clipboard operation
terminal copied to clipboard

Make sure caption controls "dim out" when window loses NC focus (WM_NCACTIVATE?)

Open Poopooracoocoo opened this issue 2 years ago • 3 comments

Windows Terminal version

1.13.10395.0

Windows build number

10.0.19044

Other Software

No response

Steps to reproduce

  1. Open Windows Terminal
  2. Click outside of window to lose focus and make the window inactive

Expected Behavior

Current tab would go grey Caption buttons would go grey

Actual Behavior

Neither titlebar element go grey

Poopooracoocoo avatar Mar 06 '22 06:03 Poopooracoocoo

Generally, I've been duping these to #4862. However, I totally missed the one other checkbox in #1625 about the caption button colors, so I'm gonna re-purpose this issue to track that element. Thanks!

Note

Walkthrough

To do this, we'd need to:

  • Listen for a WM_NCACTIVATE in IslandWindow
  • Plumb that as an event up to AppHost
  • Call a new method on AppLogic, which plumbs that down to TerminalPage to tell them that the window was activated/inactivated
  • in TerminalPage, when _settings.GlobalSettings().ShowTabsInTitlebar() is true, call to MinMaxCloseControl in TitlebarControl to tell it the window is no longer active
  • There, change the color of the buttons when the window is activated/deactivated.

See also #10401, which never got finished.

zadjii-msft avatar Mar 07 '22 13:03 zadjii-msft

I'm psyched to see that #4862 was implemented. Is this still being worked on?

Poopooracoocoo avatar Sep 14 '22 04:09 Poopooracoocoo

Is this still being worked on?

Not currently, but it seems fairly trivial these days. The plumbing in #4862 should make it trivial.

proposed "schema":

captionButtons: {
  foreground: ThemeColor,
  background: ThemeColor (default: #00000000),
  unfocusedForeground: ThemeColor,
  unfocusedBackground: ThemeColor (default: #00000000),
}

I don't really think we need to have separate knobs for each of the buttons.

zadjii-msft avatar Sep 14 '22 11:09 zadjii-msft

I may take a stab at this one if that is ok.

jamespack avatar Jul 09 '23 23:07 jamespack

@jamespack Go for it!

zadjii-msft avatar Jul 10 '23 10:07 zadjii-msft