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

Rectangular Tab border instead of circular #7213

Open
Tracked by #3327
iseeghosts opened this issue Aug 7, 2020 · 10 comments
Open
Tracked by #3327

Rectangular Tab border instead of circular #7213

iseeghosts opened this issue Aug 7, 2020 · 10 comments
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Area-Theming Anything related to the theming of elements of the window Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal.
Milestone

Comments

@iseeghosts
Copy link

iseeghosts commented Aug 7, 2020

Rectangular border like Microsoft Edge Legacy

Remove the curved border of tabs in Terminal and the weird colored border around the entire title bar.
The current one looks ugly, and resembles chromium (but bad), The first tab shouldn't have any space left to it's left.
and The tile bar is little thick when not maximized.

Current Look
image
What should it look like
image

@iseeghosts iseeghosts added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Aug 7, 2020
@ghost ghost added 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 Aug 7, 2020
@zadjii-msft
Copy link
Member

Thanks for the suggestion! This is something that's already being discussed in #5772, but I'll tag this up as a sub-task of #3327. Thanks!

@zadjii-msft zadjii-msft added Area-Settings Issues related to settings and customizability, for 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. and removed Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. labels Aug 7, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Aug 7, 2020
@zadjii-msft zadjii-msft added this to the Terminal Backlog milestone Aug 7, 2020
@zadjii-msft zadjii-msft removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Aug 12, 2020
@zadjii-msft zadjii-msft added the Area-Theming Anything related to the theming of elements of the window label Aug 4, 2021
@zadjii-msft
Copy link
Member

Notes:

  • Overriding the tab corner radius ON THE TOP seems fairly trivial. Just set the OverlayCornerRadius resource to whatever.
  • Changing the bottom seems Hard. Seems like there's no easy way to hide (Left|Right)RadiusRenderArc.Visibility on the TabViewItem itself. So you end up with this weird square on top, rounded into the terminal bottom that looks awful.
  • How would we express "I want the bottom tab corners to round inwards, so they look like buttons?
    • I'm thinking we'd want the bottom corners to accept a positive number as the current outwards radius, and a negative number to be the inwards radius.
    • We'd need a TabViewItemCornerRadiusConverter to convert the negative radius to something sensible
    • We'd need TabViewItemCornerArcVisibilityConverter that collapses the bottom arcs when the corner radius set by the user is negative

@zadjii-msft
Copy link
Member

From discussion with WinUI folks:

I think you would have to retemplate the TabViewItem component.

I would try the following: Apply a custom Style to TabViewItem without the LeftRadiusRenderArc, RightRadiusRenderArc and SelectedBackgroundPath elements. You get this which is not enough:

image

You need to extend the vertical lines down. Maybe TabViewItemSeparatorMargin affects that - I'm not sure.

You may have to replace the SelectedBackgroundPath with your own element, because unfortunately its shape is hardcoded in TabViewItem::UpdateTabGeometry(). This is pretty bad I know.

The key problem is this hardcoded line in \dev\TabView\TabViewItem.cpp

auto data = L"<Geometry xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'>F1 M0,%f a 4,4 0 0 0 4,-4 L 4,%f a %f,%f 0 0 1 %f,-%f l %f,0 a %f,%f 0 0 1 %f,%f l 0,%f a 4,4 0 0 0 4,4 Z</Geometry>";

I think you'd have to write the same kind of code without the 2 bottom curves. Then call your own version of UpdateTabGeometry when the size changes like we do in TabViewItem::OnSizeChanged.

We'd need to make a specific request on WinUI to allow this to be changed in the tab view.

@zadjii-msft zadjii-msft modified the milestones: Up Next, Backlog Jun 16, 2022
@ghost
Copy link

ghost commented Jul 5, 2022

If you are willing to give up the two corner overlays, then customizing the entire tab can be easily done through TabContainer, without having to update the path through code.

Otherwise, I'd suggest using a single positive corner radius and another property for the tab attaching to the bottom or not.
This is for the eventuality that TabView will support different orientations in the future (+ negative radius doesn't make sense for the other two corners).
For the current design, it would look like this:

<TabViewItem CornerRadius="8,8,4,4" IsAttached="True">

@zadjii-msft
Copy link
Member

That seems like a pretty sensible approach to me - we should make sure to capture that in the feature request on the WinUI team (whenever we get around to filing it)

@zadjii-msft
Copy link
Member

Maybe I've been overcomplicating by trying to dedupe this with #3327 (comment). There's basically two sides to this spectrum

  • I want the tabs to be rectangular, without curved corners
  • I want the tabs to be buttons / pills. That should both include pills (floating "tabs", aka buttons), but also just like, rectangular buttons (like this)

@zadjii-msft
Copy link
Member

WinUI thread: microsoft/microsoft-ui-xaml#7032

@riotrah
Copy link

riotrah commented Jan 1, 2023

Hi just to be clear - the work referenced being done in this issue is to allow end-users to make such OS/1st party UI-disruptive changes at their own peril, right? Or at a maximum, perhaps check if they're on win10 vs 11 or something?

Most certainly a linguistic/tonal/inference thing on my part, but if anyone is actually demanding regressing back to right angles again in 2022 as "the" WT design, on the basis of an obviously subjective and almost certainly minority-held premise of "rounded ugly" then I'll eat my shoe 🙄

@zadjii-msft
Copy link
Member

Yes, to be totally clear - this would be a setting as a part of Themes. This would absolutely not be something we roll out by default to all users. It'd instead be a knob users could set if they so choose.

@Shomnipotence
Copy link

image

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 Area-Theming Anything related to the theming of elements of the window 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

No branches or pull requests

4 participants