Skip to content

Commit

Permalink
Make TabView padding equal (#11115)
Browse files Browse the repository at this point in the history
Doing #10242 again.

The space around the tabs was made equal in windowed mode.
For maximized mode, I made the titlebar be 33px tall, to compensate for #10746.

![padding](https://user-images.githubusercontent.com/84711285/131723737-d63b015c-2134-465a-a15b-6b44538b95c5.png)
  • Loading branch information
gabrielconl authored Sep 2, 2021
1 parent 7908164 commit a0670cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/cascadia/TerminalApp/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
Color="{ThemeResource SystemErrorTextColor}" />

<!-- Suppress top padding -->
<Thickness x:Key="TabViewHeaderPadding">8,0,8,0</Thickness>
<Thickness x:Key="TabViewHeaderPadding">9,0,8,0</Thickness>

<!-- Remove when implementing WinUI 2.6 -->
<Thickness x:Key="FlyoutContentPadding">12</Thickness>
Expand Down
7 changes: 4 additions & 3 deletions src/cascadia/TerminalApp/MinMaxCloseControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
HorizontalAlignment="Left"
VerticalAlignment="Top"
d:DesignHeight="36"
d:DesignHeight="40"
d:DesignWidth="400"
Background="Transparent"
Orientation="Horizontal"
Expand Down Expand Up @@ -124,8 +124,9 @@
tabs will be flush with the top of the window. See GH#2541 for
details.
-->
<x:Double x:Key="CaptionButtonHeightWindowed">36.0</x:Double>
<x:Double x:Key="CaptionButtonHeightMaximized">32.0</x:Double>
<x:Double x:Key="CaptionButtonHeightWindowed">40.0</x:Double>
<!-- 32 + 1 to compensate for GH#10746 -->
<x:Double x:Key="CaptionButtonHeightMaximized">33.0</x:Double>

<Style x:Key="CaptionButton"
TargetType="Button">
Expand Down

3 comments on commit a0670cb

@DHowett
Copy link
Member

Choose a reason for hiding this comment

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

Interestingly, the compensation for GH#10746 might have caused 10746 to stop functioning by pushing the application body down one more pixel. I can't get the tab bar hit targets at the top of the screen when maximized to work any longer.

@zadjii-msft
Copy link
Member

Choose a reason for hiding this comment

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

@DHowett If you've got a repro for that, can you fix that again? I checked out this PR when it was first opened to make sure that one was still fixed, but I guess I didn't have my monitors in the very peculiar config that repro'd #7422 in the first place.

@zadjii-msft
Copy link
Member

Choose a reason for hiding this comment

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

Moved to #11309 to make sure we don't lose this.

Please sign in to comment.