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

Terminal window has white border #6620

Closed
michalhudecek opened this issue Jun 21, 2020 · 16 comments · Fixed by #6624
Closed

Terminal window has white border #6620

michalhudecek opened this issue Jun 21, 2020 · 16 comments · Fixed by #6624
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Impact-Visual It look bad. Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-2 A description (P2) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Milestone

Comments

@michalhudecek
Copy link

This issue has been reported several times but incorrectly marked as duplicate or just closed with no explanation.

The terminal window should have under no circumstances a white border. Not just in dark mode but NEVER. It is completely inconsistent with all other Windows apps including those from Microsoft.

Terminal border

image

Any other Windows app

image

image

image

image

image

Issues that were incorrectly closed:

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jun 21, 2020
@michalhudecek
Copy link
Author

Btw ... aren't there any Microsoft design guidelines? I assume this issue shouldn't be discussed at all per application.

@j4james
Copy link
Collaborator

j4james commented Jun 21, 2020

The border color is affected by a number of settings. Typically it uses the accent color, in which case it could be white (or at least a light gray) if that's the accent color you chose. But I suspect in this case you've probably just turned off Title bars and window borders option, and that's what's responsible for the white border in the Light mode.

I think that might be a bug, but it's different from the original white border issue.

@michalhudecek
Copy link
Author

Here is my setting:

image

@beviu
Copy link
Contributor

beviu commented Jun 21, 2020

This is because the Windows Terminal is a Win32 app with a custom title bar and Win32 apps with custom title bars have white borders by default:
image
image

Note that when I made the PR #3394 which added a custom title bar by removing the standard Win32 title bar, I did not change the default behavior of having that white border. Because the Windows Terminal wants to look like a UWP app, maybe this should be faked as well, like the title bar, by always making the border dark?

We could do this by chaging _OnNcCreate on NonClientIslandWindow to unconditionally set the black border, something like this:

// Method Description:
// - This method is called when the window receives the WM_NCCREATE message.
// Return Value:
// - The value returned from the window proc.
[[nodiscard]] LRESULT NonClientIslandWindow::_OnNcCreate(WPARAM wParam, LPARAM lParam) noexcept
{
const auto ret = IslandWindow::_OnNcCreate(wParam, lParam);
if (ret == FALSE)
{
return ret;
}
// we always want a dark border
LOG_IF_FAILED(TerminalTrySetDarkTheme(_window.get(), true));
return TRUE;
}

I can make a PR that does this if the Windows Terminal team wants the black border.

@j4james
Copy link
Collaborator

j4james commented Jun 21, 2020

I don't think it's meant to be black exactly. I suspect it might be version specific, but the border colors I'm seeing on most UWP apps is different on the top and sides, and it's actually a level of transparency, so what you see will depend on the background. I'm talking specifically about the Light mode, with the Title bars and window borders option disabled.

I'm on version 10.0.18362.836. The OP didn't fill in the bug template, so I don't know what version he is using, but his screenshots look different to what I'm seeing.

@michalhudecek
Copy link
Author

I am using Terminal 1.0.1401.0 (stable) and 1.1.1671.0 (preview). The issue is the same in both.

Here is my Windows version:
image

@beviu
Copy link
Contributor

beviu commented Jun 21, 2020

Yes sorry I meant "dark" instead of "black".

j4james, I don't know if you're talking about this when you say that the top and side colors are not the same, but if you are, I think it's a bug because it disappears after a restart:
image
(see how the top border is dark but other borders are light)

I am on 10.0.18362.900.

@j4james
Copy link
Collaborator

j4james commented Jun 21, 2020

j4james, I don't know if you're talking about this when you say that the top and side colors are not the same, but if you are, I think it's a bug because it disappears after a restart:

That makes sense. That's exactly what I'm seeing. I thought it might be a bug.

@beviu
Copy link
Contributor

beviu commented Jun 21, 2020

This is unrelated to the OP but I reported this bug (with the UWP apps, not with the Windows Terminal, again not related to the OP) in the Feedback Hub: https://aka.ms/AA6pqh3.

@DHowett
Copy link
Member

DHowett commented Jun 21, 2020

Unfortunately, there isn’t a standard here. If somebody wants to remove the theme check around “TrySetDarkMode” in “NonClientIslandWindow.cpp”, I would absolutely accept that pull request.
Thanks for digging up all these counterexamples, @michalhudecek!

@DHowett
Copy link
Member

DHowett commented Jun 21, 2020

(When I say “there isn’t a standard here,” I mean “terminal even has to use a private API to get its window borders to look like other UWP applications.” It drives me crazy!)

@DHowett DHowett added Area-User Interface Issues pertaining to the user interface of the Console or Terminal Impact-Visual It look bad. Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-2 A description (P2) Product-Terminal The new Windows Terminal. and removed Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jun 21, 2020
@DHowett DHowett added this to the Terminal v1.2 milestone Jun 21, 2020
@ghost ghost added the In-PR This issue has a related PR label Jun 21, 2020
@michalhudecek
Copy link
Author

There is no standard even "on paper"? I mean something like a codified design system: https://atlassian.design/guidelines/product/overview or https://material.io/components

@ghost ghost added Needs-Tag-Fix Doesn't match tag requirements Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed In-PR This issue has a related PR labels Jun 22, 2020
@michalhudecek
Copy link
Author

That was quick! Good job :)

@ghost
Copy link

ghost commented Jul 22, 2020

🎉This issue was addressed in #6624, which has now been successfully released as Windows Terminal Preview v1.2.2022.0.:tada:

Handy links:

@harristom
Copy link

This problem is back in v1.17, I guess due to the recent changes around theming. The grey border is there to start with until you switch to another window and back (presumably it's part of the dark theme and doesn't get repainted until switching). Once you switch back it is white and will stay so even after closing/re-opening.

Steps to reproduce:

  • Delete settings.json and state.json
  • Open Terminal and switch to light theme
  • Border is grey
  • Alt tab to another window then back again
  • Border is now forever white

@kaecy
Copy link

kaecy commented Jun 11, 2023

I don't want a border around my terminal. I'm very sensitive to colour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Impact-Visual It look bad. Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-2 A description (P2) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants