925b05a3b7
I started from here:
9052972906/dev/CommonStyles/Button_themeresources_v1.xaml (L121)
but adding a padding of 3 was still off by one pixel, so it's 4 now.
_enhance.png_
![image](https://user-images.githubusercontent.com/18356694/136219225-3fcffd48-79b4-4efc-a4c3-4b59f9878962.png)
* [x] closes #11421
118 lines
7.2 KiB
XML
118 lines
7.2 KiB
XML
<!--
|
|
Copyright (c) Microsoft Corporation. All rights reserved. Licensed under
|
|
the MIT License. See LICENSE in the project root for license information.
|
|
-->
|
|
<ContentPresenter x:Class="TerminalApp.TabRowControl"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="using:TerminalApp"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:mux="using:Microsoft.UI.Xaml.Controls"
|
|
mc:Ignorable="d">
|
|
|
|
<mux:TabView x:Name="TabView"
|
|
VerticalAlignment="Bottom"
|
|
HorizontalContentAlignment="Stretch"
|
|
AllowDropTabs="True"
|
|
CanDragTabs="True"
|
|
CanReorderTabs="True"
|
|
IsAddTabButtonVisible="false"
|
|
TabWidthMode="Equal">
|
|
|
|
<mux:TabView.TabStripHeader>
|
|
<!-- EA18 is the "Shield" glyph -->
|
|
<FontIcon x:Uid="ElevationShield"
|
|
Margin="9,4,0,4"
|
|
FontFamily="Segoe MDL2 Assets"
|
|
FontSize="16"
|
|
Foreground="{ThemeResource SystemControlForegroundBaseMediumBrush}"
|
|
Glyph=""
|
|
Visibility="{x:Bind ShowElevationShield, Mode=OneWay}" />
|
|
</mux:TabView.TabStripHeader>
|
|
|
|
<mux:TabView.TabStripFooter>
|
|
<mux:SplitButton x:Name="NewTabButton"
|
|
x:Uid="NewTabSplitButton"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Stretch"
|
|
AllowDrop="True"
|
|
AutomationProperties.AccessibilityView="Control"
|
|
BorderThickness="0"
|
|
Click="OnNewTabButtonClick"
|
|
Content=""
|
|
CornerRadius="{Binding Source={ThemeResource OverlayCornerRadius}, Converter={StaticResource TopCornerRadiusFilterConverter}}"
|
|
DragOver="OnNewTabButtonDragOver"
|
|
Drop="OnNewTabButtonDrop"
|
|
FontFamily="Segoe MDL2 Assets"
|
|
FontSize="12"
|
|
FontWeight="SemiLight"
|
|
UseLayoutRounding="true">
|
|
<ToolTipService.ToolTip>
|
|
<ToolTip Placement="Mouse">
|
|
<TextBlock IsTextSelectionEnabled="False">
|
|
<Run x:Uid="NewTabRun" /> <LineBreak />
|
|
<Run x:Uid="NewPaneRun"
|
|
FontStyle="Italic" /> <LineBreak />
|
|
<Run x:Uid="NewWindowRun"
|
|
FontStyle="Italic" />
|
|
</TextBlock>
|
|
</ToolTip>
|
|
</ToolTipService.ToolTip>
|
|
<!-- U+E710 is the fancy plus icon. -->
|
|
<mux:SplitButton.Resources>
|
|
<!-- Override the SplitButton* resources to match the tab view's button's styles. -->
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.ThemeDictionaries>
|
|
<ResourceDictionary x:Key="Light">
|
|
<StaticResource x:Key="SplitButtonBackground"
|
|
ResourceKey="TabViewButtonBackground" />
|
|
<StaticResource x:Key="SplitButtonForeground"
|
|
ResourceKey="TabViewButtonForeground" />
|
|
<StaticResource x:Key="SplitButtonBackgroundPressed"
|
|
ResourceKey="TabViewItemHeaderBackgroundPressed" />
|
|
<StaticResource x:Key="SplitButtonForegroundPressed"
|
|
ResourceKey="TabViewItemHeaderForegroundPressed" />
|
|
<StaticResource x:Key="SplitButtonBackgroundPointerOver"
|
|
ResourceKey="TabViewItemHeaderBackgroundPointerOver" />
|
|
<StaticResource x:Key="SplitButtonForegroundPointerOver"
|
|
ResourceKey="TabViewItemHeaderForegroundPointerOver" />
|
|
</ResourceDictionary>
|
|
<ResourceDictionary x:Key="Dark">
|
|
<StaticResource x:Key="SplitButtonBackground"
|
|
ResourceKey="TabViewButtonBackground" />
|
|
<StaticResource x:Key="SplitButtonForeground"
|
|
ResourceKey="TabViewButtonForeground" />
|
|
<StaticResource x:Key="SplitButtonBackgroundPressed"
|
|
ResourceKey="TabViewItemHeaderBackgroundPressed" />
|
|
<StaticResource x:Key="SplitButtonForegroundPressed"
|
|
ResourceKey="TabViewItemHeaderForegroundPressed" />
|
|
<StaticResource x:Key="SplitButtonBackgroundPointerOver"
|
|
ResourceKey="TabViewItemHeaderBackgroundPointerOver" />
|
|
<StaticResource x:Key="SplitButtonForegroundPointerOver"
|
|
ResourceKey="TabViewItemHeaderForegroundPointerOver" />
|
|
</ResourceDictionary>
|
|
<ResourceDictionary x:Key="HighContrast">
|
|
<StaticResource x:Key="SplitButtonBackground"
|
|
ResourceKey="TabViewButtonBackground" />
|
|
<StaticResource x:Key="SplitButtonForeground"
|
|
ResourceKey="TabViewButtonForeground" />
|
|
<StaticResource x:Key="SplitButtonBackgroundPressed"
|
|
ResourceKey="TabViewItemHeaderBackgroundPressed" />
|
|
<StaticResource x:Key="SplitButtonForegroundPressed"
|
|
ResourceKey="TabViewItemHeaderForegroundPressed" />
|
|
<StaticResource x:Key="SplitButtonBackgroundPointerOver"
|
|
ResourceKey="TabViewItemHeaderBackgroundPointerOver" />
|
|
<StaticResource x:Key="SplitButtonForegroundPointerOver"
|
|
ResourceKey="TabViewItemHeaderForegroundPointerOver" />
|
|
</ResourceDictionary>
|
|
</ResourceDictionary.ThemeDictionaries>
|
|
</ResourceDictionary>
|
|
</mux:SplitButton.Resources>
|
|
</mux:SplitButton>
|
|
</mux:TabView.TabStripFooter>
|
|
|
|
</mux:TabView>
|
|
|
|
</ContentPresenter>
|