make the tabs a little prettier

This commit is contained in:
Grant Limberg 2015-11-04 18:39:45 -08:00
parent 7b86176d0e
commit 2721804ebf

View file

@ -8,52 +8,54 @@
Title="ZeroTier One" Height="500" Width="700" Icon="ZeroTierIcon.ico"> Title="ZeroTier One" Height="500" Width="700" Icon="ZeroTierIcon.ico">
<Window.Resources> <Window.Resources>
<ResourceDictionary> <SolidColorBrush x:Key="GreenBrush" Color="#ff91a2a3"/>
<SolidColorBrush x:Key="SolidBorderBrush" Color="#888" />
<SolidColorBrush x:Key="GreenDisabledBrush" Color="#FF234447" />
<SolidColorBrush x:Key="DisabledBackgroundBrush" Color="#EEE" />
<SolidColorBrush x:Key="DisabledBorderBrush" Color="#AAA" />
<SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888" />
<Style TargetType="{x:Type TabItem}"> <Style TargetType="{x:Type TabItem}">
<Setter Property="BorderThickness"
Value="3" />
<Setter Property="BorderBrush"
Value="Blue" />
<Setter Property="VerticalContentAlignment"
Value="Center" />
<Setter Property="HorizontalContentAlignment"
Value="Center" />
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="{x:Type TabItem}"> <ControlTemplate TargetType="{x:Type TabItem}">
<Border>
<Grid> <Grid>
<Grid> <Border
<Border x:Name="border" Name="Border"
CornerRadius="3,3,0,0" Margin="0,0,-4,0"
Background="{TemplateBinding Background}" Background="{StaticResource GreenBrush}"
BorderBrush="{TemplateBinding BorderBrush}" BorderBrush="{StaticResource SolidBorderBrush}"
BorderThickness="1,1,1,0" /> BorderThickness="1,1,1,1"
</Grid> CornerRadius="2,12,0,0" >
<Border BorderThickness="{TemplateBinding BorderThickness}" <ContentPresenter x:Name="ContentSite"
Padding="{TemplateBinding Padding}"> VerticalAlignment="Center"
<ContentPresenter ContentSource="Header" HorizontalAlignment="Center"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" ContentSource="Header"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" /> Margin="12,2,12,2"
RecognizesAccessKey="True"/>
</Border> </Border>
</Grid> </Grid>
</Border>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
<Trigger Property="IsSelected" <Trigger Property="IsSelected" Value="True">
Value="True"> <Setter Property="Panel.ZIndex" Value="100" />
<Setter TargetName="border" <Setter TargetName="Border" Property="Background" Value="{StaticResource GreenDisabledBrush}" />
Property="BorderBrush" <Setter TargetName="Border" Property="BorderThickness" Value="1,1,1,0" />
Value="#ff91a2a3" /> </Trigger>
<Setter TargetName="border" <Trigger Property="IsEnabled" Value="False">
Property="BorderThickness" <Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}" />
Value="0,3,0,0" /> <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
<Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}" />
</Trigger> </Trigger>
</ControlTemplate.Triggers> </ControlTemplate.Triggers>
</ControlTemplate> </ControlTemplate>
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Style> </Style>
</ResourceDictionary>
</Window.Resources> </Window.Resources>
<DockPanel> <DockPanel>
@ -87,7 +89,7 @@
</StatusBarItem> </StatusBarItem>
</StatusBar> </StatusBar>
<TabControl> <TabControl>
<TabItem x:Name="Networks" Header="Networks" Background="#FF234447" Foreground="White" IsSelected="True" IsManipulationEnabled="True"> <TabItem x:Name="Networks" Header="Networks" Foreground="White" IsSelected="True" IsManipulationEnabled="True">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
@ -98,7 +100,7 @@
<local:NetworksPage x:Name="networksPage" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="0" Margin="0,0,0,0"/> <local:NetworksPage x:Name="networksPage" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="0" Margin="0,0,0,0"/>
</Grid> </Grid>
</TabItem> </TabItem>
<TabItem x:Name="Peers" Header="Peers" Background="#FF234447" Foreground="White"> <TabItem x:Name="Peers" Header="Peers" Foreground="White">
<Grid Background="#FFE5E5E5" HorizontalAlignment="Left" VerticalAlignment="Top"> <Grid Background="#FFE5E5E5" HorizontalAlignment="Left" VerticalAlignment="Top">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>