Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable changing the color of the active pane border #3752

Closed
wants to merge 1 commit into from

Conversation

zadjii-msft
Copy link
Member

Summary of the Pull Request

Adds a new setting, "activePaneBorderColor", which lets the user change the color of the active pane border. This setting can have 3 values:

  • null: to clear the active pane border color (and have no color there)
  • "accent": to use the accent color
  • a color string in format "#RRGGBB", to use that color

If it's not one of those values, it will display a warning, and default to null.

PR Checklist

@zadjii-msft zadjii-msft added Area-Settings Issues related to settings and customizability, for console or terminal Product-Terminal The new Windows Terminal. labels Nov 27, 2019
try
{
const auto color = _globals.GetPaneFocusColor();
color;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment why you did this or use UNREFERENCED_PARAMETER macro to make it clear.

winrt::TerminalApp::LaunchMode _launchMode;
std::optional<std::wstring> _activePaneBorderColor{ std::nullopt };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of the rest of these private variables are initialized here. Are they initialized in the constructor instead?

Comment on lines +550 to +555
_root.Dispatcher().RunAsync(CoreDispatcherPriority::Low, [this]() {
// Call _SetupResources to potentially reload the active pane brush,
// and UpdateVisuals to apply the brush
_SetupResources();
UpdateVisuals();
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably a good use for the co_await pattern.

// Return Value:
// - A COLORREF if the string could successfully be parsed. If the string is not
// the correct format, throws E_INVALIDARG
COLORREF Utils::ColorFromHexString(const std::wstring& str)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has template potential.
Utils::ColorFromHexString<T>(const T& str).

@ghost ghost added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jan 9, 2020
@zadjii-msft
Copy link
Member Author

@miniksa good catch, I forgot this was still open. I'm actually going to abandon this PR in favor of a more comprehensive solution to #3327. I've got a spec that I'm working on with @cinnamon-msft that should actually more holistically solve this feature.

Thanks for the review though!

@zadjii-msft zadjii-msft closed this Jan 9, 2020
@ghost ghost removed the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jan 9, 2020
@miniksa
Copy link
Member

miniksa commented Jan 9, 2020

@miniksa Michael Niksa FTE good catch, I forgot this was still open. I'm actually going to abandon this PR in favor of a more comprehensive solution to #3327. I've got a spec that I'm working on with @cinnamon-msft Kayla Cinnamon FTE that should actually more holistically solve this feature.

Thanks for the review though!

OK no problem.

@zadjii-msft zadjii-msft deleted the dev/migrie/f/3061-pane-accent-color branch March 19, 2020 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a setting to manually set the Pane highlight color
2 participants