Skip to content

Commit 5cfda86

Browse files
committed
some fixes to tabbar styling
1 parent 7a70f13 commit 5cfda86

File tree

2 files changed

+31
-11
lines changed

2 files changed

+31
-11
lines changed

FluentTerminal.App/Views/MainPage.xaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<Rectangle x:Name="TitleBar" Fill="Transparent" />
3434
<Grid
3535
x:Name="TitleBarContents"
36-
Height="42"
36+
Height="44"
3737
Margin="{Binding CoreTitleBarPadding, Mode=OneWay}">
3838
<Grid.ColumnDefinitions>
3939
<ColumnDefinition Width="Auto" />
@@ -70,6 +70,7 @@
7070
x:Name="TopTabBar"
7171
Grid.Column="1"
7272
HorizontalAlignment="Left"
73+
Height="44"
7374
AddCommand="{x:Bind ViewModel.AddDefaultTabCommand}"
7475
ItemsSource="{x:Bind ViewModel.Terminals, Mode=OneWay}"
7576
SelectedItem="{x:Bind ViewModel.SelectedTerminal, Mode=TwoWay}"
@@ -100,7 +101,7 @@
100101
Opacity="0.2"
101102
Visibility="{x:Bind DraggingHappensFromAnotherWindow, Mode=TwoWay, Converter={StaticResource TrueToVisibleConverter}}" />
102103
<views:TabBar
103-
Height="42"
104+
Height="44"
104105
x:Name="BottomTabBar"
105106
Grid.Row="2"
106107
Margin="0 0 4 0"

FluentTerminal.App/Views/TabBar.xaml

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,22 @@
4444
<ScrollViewer
4545
x:Name="ScrollViewer"
4646
Grid.Column="1"
47+
Height="44"
48+
Margin="4 0 4 0"
49+
Padding="0"
50+
Background="Transparent"
4751
HorizontalScrollBarVisibility="Hidden"
4852
HorizontalScrollMode="Enabled"
4953
VerticalScrollBarVisibility="Hidden"
5054
VerticalScrollMode="Disabled">
5155
<ListView
5256
Margin="0"
57+
Height="44"
5358
x:Name="ListView"
5459
AllowDrop="True"
5560
Background="Transparent"
61+
VerticalContentAlignment="Center"
62+
Padding="0 0 0 0"
5663
CanDragItems="true"
5764
CanReorderItems="True"
5865
DragEnter="ListView_DragEnter"
@@ -68,10 +75,15 @@
6875
<utilities:InteractiveSurface
6976
x:Name="InteractiveSurface"
7077
HorizontalContentAlignment="Stretch"
78+
Padding="0"
79+
Height="32"
80+
FocusVisualPrimaryThickness="0"
81+
BorderThickness="0"
82+
FocusVisualSecondaryThickness="0"
7183
Hovered="{x:Bind IsHovered, Mode=TwoWay}">
7284
<RelativePanel
7385
Height="32"
74-
Margin="4 2 4 2"
86+
Margin="2 0 2 0"
7587
Padding="0"
7688
CornerRadius="4"
7789
Background="Transparent"
@@ -86,14 +98,14 @@
8698
</behaviors:MiddleClickBehavior>
8799
</interactivity:Interaction.Behaviors>
88100

89-
<Border
101+
<!--<Border
90102
Height="3"
91103
VerticalAlignment="Bottom"
92104
Background="{x:Bind TabTheme.Theme.Color, Mode=OneWay, Converter={StaticResource ColorResourceKeyFallbackConverter}, ConverterParameter=SystemControlHighlightAccentBrush}"
93105
RelativePanel.AlignBottomWithPanel="True"
94106
RelativePanel.AlignLeftWithPanel="True"
95107
RelativePanel.AlignRightWithPanel="True"
96-
Visibility="{x:Bind IsUnderlined, Mode=OneWay, Converter={StaticResource TrueToVisibleConverter}}" />
108+
Visibility="{x:Bind IsUnderlined, Mode=OneWay, Converter={StaticResource TrueToVisibleConverter}}" />-->
97109
<Grid
98110
x:Name="HasExitedWithErrorGrid"
99111
Height="32"
@@ -114,6 +126,7 @@
114126
RelativePanel.LeftOf="CloseButton"
115127
RelativePanel.RightOf="HasExitedWithErrorGrid"
116128
Style="{StaticResource CaptionTextBlockStyle}"
129+
Foreground="{ThemeResource ListViewItemForeground}"
117130
Text="{x:Bind TabTitle, Mode=OneWay, Converter={StaticResource TextMiddleEllipsisConverter}}"
118131
TextWrapping="NoWrap" />
119132
<Grid
@@ -122,6 +135,7 @@
122135
RelativePanel.AlignRightWithPanel="True">
123136
<Button
124137
Width="32"
138+
Background="Aqua"
125139
HorizontalAlignment="Center"
126140
Command="{x:Bind CloseCommand}"
127141
Style="{StaticResource TitleBarButtonStyle}"
@@ -150,7 +164,9 @@
150164
<Style TargetType="ListViewItem">
151165
<Setter Property="MinWidth" Value="100" />
152166
<Setter Property="MaxWidth" Value="200" />
167+
<Setter Property="Height" Value="32" />
153168
<Setter Property="MinHeight" Value="32" />
169+
<Setter Property="MaxHeight" Value="32" />
154170
<Setter Property="Padding" Value="0" />
155171
<Setter Property="Margin" Value="0" />
156172
<Setter Property="views:TabBarBackgroundBindingHelper.BackgroundBindingPath" Value="BackgroundTabTheme" />
@@ -172,9 +188,15 @@
172188
<Setter.Value>
173189
<ControlTemplate TargetType="ListViewItem">
174190
<ListViewItemPresenter
191+
BackgroundSizing="OuterBorderEdge"
175192
x:Name="Root"
176193
CornerRadius="4"
177-
Height="36"
194+
MinHeight="{TemplateBinding Height}"
195+
Height="{TemplateBinding Height}"
196+
MaxHeight="{TemplateBinding Height}"
197+
Padding="{TemplateBinding Padding}"
198+
Margin="{TemplateBinding Margin}"
199+
SelectedBorderThickness="0"
178200
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
179201
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
180202
CheckBoxBrush="{ThemeResource ListViewItemCheckBoxBrush}"
@@ -191,17 +213,14 @@
191213
FocusSecondaryBorderBrush="{ThemeResource ListViewItemFocusSecondaryBorderBrush}"
192214
FocusVisualMargin="{TemplateBinding FocusVisualMargin}"
193215
FocusVisualPrimaryBrush="{TemplateBinding FocusVisualPrimaryBrush}"
194-
FocusVisualPrimaryThickness="0"
216+
FocusVisualPrimaryThickness="{TemplateBinding FocusVisualPrimaryThickness}"
195217
FocusVisualSecondaryBrush="{TemplateBinding FocusVisualSecondaryBrush}"
196-
FocusVisualSecondaryThickness="0"
218+
FocusVisualSecondaryThickness="{TemplateBinding FocusVisualSecondaryThickness}"
197219
PlaceholderBackground="{ThemeResource ListViewItemPlaceholderBackground}"
198220
PointerOverBackground="{Binding TabTheme, Mode=OneWay, Converter={StaticResource TabColorFallbackConverter}, ConverterParameter=BackgroundPointerOver}"
199221
PointerOverForeground="{ThemeResource ListViewItemForegroundPointerOver}"
200222
PressedBackground="{Binding TabTheme, Mode=OneWay, Converter={StaticResource TabColorFallbackConverter}, ConverterParameter=BackgroundPressed}"
201223
ReorderHintOffset="{ThemeResource ListViewItemReorderHintThemeOffset}"
202-
RevealBackground="{ThemeResource ListViewItemRevealBackground}"
203-
RevealBorderBrush="{ThemeResource ListViewItemRevealBorderBrush}"
204-
RevealBorderThickness="0"
205224
SelectedBackground="{Binding TabTheme, Mode=OneWay, Converter={StaticResource TabColorFallbackConverter}, ConverterParameter=BackgroundSelected}"
206225
SelectedForeground="{ThemeResource ListViewItemForegroundSelected}"
207226
SelectedPointerOverBackground="{Binding TabTheme, Mode=OneWay, Converter={StaticResource TabColorFallbackConverter}, ConverterParameter=BackgroundSelectedPointerOver}"

0 commit comments

Comments
 (0)