Make nav buttons borderless and realign rail button offset
This commit is contained in:
@@ -216,9 +216,9 @@
|
|||||||
<Setter Property="Foreground"
|
<Setter Property="Foreground"
|
||||||
Value="{DynamicResource navForeground}" />
|
Value="{DynamicResource navForeground}" />
|
||||||
<Setter Property="BorderBrush"
|
<Setter Property="BorderBrush"
|
||||||
Value="{DynamicResource navigationRailBorderColor}" />
|
Value="Transparent" />
|
||||||
<Setter Property="BorderThickness"
|
<Setter Property="BorderThickness"
|
||||||
Value="1" />
|
Value="0" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style TargetType="ProgressBar"
|
<Style TargetType="ProgressBar"
|
||||||
x:Key="FlatProgressBar">
|
x:Key="FlatProgressBar">
|
||||||
@@ -467,18 +467,18 @@
|
|||||||
<Button Visibility="Hidden"
|
<Button Visibility="Hidden"
|
||||||
x:Name="BtnBack"
|
x:Name="BtnBack"
|
||||||
Tag="100"
|
Tag="100"
|
||||||
Canvas.Top="6"
|
Canvas.Top="10"
|
||||||
Canvas.Left="4"
|
Canvas.Left="4"
|
||||||
Width="62"
|
Width="62"
|
||||||
Height="62"
|
Height="62"
|
||||||
BorderThickness="1"
|
BorderThickness="0"
|
||||||
Style="{StaticResource FlatButtonStyle2}"
|
Style="{StaticResource FlatButtonStyle2}"
|
||||||
Panel.ZIndex="1000">
|
Panel.ZIndex="1000">
|
||||||
<Button.Template>
|
<Button.Template>
|
||||||
<ControlTemplate TargetType="{x:Type Button}">
|
<ControlTemplate TargetType="{x:Type Button}">
|
||||||
<Border Background="{Binding Background, ElementName=BtnBack}"
|
<Border Background="{Binding Background, ElementName=BtnBack}"
|
||||||
BorderBrush="{DynamicResource navigationRailBorderColor}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
BorderThickness="1"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
CornerRadius="14">
|
CornerRadius="14">
|
||||||
<ContentPresenter HorizontalAlignment="Center"
|
<ContentPresenter HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center" />
|
VerticalAlignment="Center" />
|
||||||
@@ -509,7 +509,7 @@
|
|||||||
Visibility="Visible"
|
Visibility="Visible"
|
||||||
Style="{StaticResource FlatButtonStyle2}"
|
Style="{StaticResource FlatButtonStyle2}"
|
||||||
ToolTip="{x:Static resx:Resources.mo_announcement}"
|
ToolTip="{x:Static resx:Resources.mo_announcement}"
|
||||||
BorderThickness="1"
|
BorderThickness="0"
|
||||||
Panel.ZIndex="1000"
|
Panel.ZIndex="1000"
|
||||||
Width="62"
|
Width="62"
|
||||||
Height="62"
|
Height="62"
|
||||||
@@ -519,8 +519,8 @@
|
|||||||
<ControlTemplate TargetType="{x:Type Button}">
|
<ControlTemplate TargetType="{x:Type Button}">
|
||||||
<Grid ClipToBounds="False">
|
<Grid ClipToBounds="False">
|
||||||
<Border Background="{Binding Background, ElementName=BtnAnnouncements}"
|
<Border Background="{Binding Background, ElementName=BtnAnnouncements}"
|
||||||
BorderBrush="{DynamicResource navigationRailBorderColor}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
BorderThickness="1"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
CornerRadius="14" />
|
CornerRadius="14" />
|
||||||
<Border Visibility="Hidden"
|
<Border Visibility="Hidden"
|
||||||
Tag="ActiveIndicator"
|
Tag="ActiveIndicator"
|
||||||
@@ -585,7 +585,7 @@
|
|||||||
Visibility="Hidden"
|
Visibility="Hidden"
|
||||||
Style="{StaticResource FlatButtonStyle2}"
|
Style="{StaticResource FlatButtonStyle2}"
|
||||||
ToolTip="{x:Static resx:Resources.mo_incidents }"
|
ToolTip="{x:Static resx:Resources.mo_incidents }"
|
||||||
BorderThickness="1"
|
BorderThickness="0"
|
||||||
Canvas.Top="0"
|
Canvas.Top="0"
|
||||||
Width="62"
|
Width="62"
|
||||||
Height="62"
|
Height="62"
|
||||||
@@ -594,8 +594,8 @@
|
|||||||
<ControlTemplate TargetType="{x:Type Button}">
|
<ControlTemplate TargetType="{x:Type Button}">
|
||||||
<Grid ClipToBounds="False">
|
<Grid ClipToBounds="False">
|
||||||
<Border Background="{Binding Background, ElementName=BtnIncident}"
|
<Border Background="{Binding Background, ElementName=BtnIncident}"
|
||||||
BorderBrush="{DynamicResource navigationRailBorderColor}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
BorderThickness="1"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
CornerRadius="14" />
|
CornerRadius="14" />
|
||||||
<Border Visibility="Hidden"
|
<Border Visibility="Hidden"
|
||||||
Tag="ActiveIndicator"
|
Tag="ActiveIndicator"
|
||||||
@@ -656,7 +656,7 @@
|
|||||||
Visibility="Hidden"
|
Visibility="Hidden"
|
||||||
Style="{StaticResource FlatButtonStyle2}"
|
Style="{StaticResource FlatButtonStyle2}"
|
||||||
ToolTip="{x:Static resx:Resources.mo_ssp}"
|
ToolTip="{x:Static resx:Resources.mo_ssp}"
|
||||||
BorderThickness="1"
|
BorderThickness="0"
|
||||||
Canvas.Top="0"
|
Canvas.Top="0"
|
||||||
Width="62"
|
Width="62"
|
||||||
Height="62"
|
Height="62"
|
||||||
@@ -665,8 +665,8 @@
|
|||||||
<ControlTemplate TargetType="{x:Type Button}">
|
<ControlTemplate TargetType="{x:Type Button}">
|
||||||
<Grid ClipToBounds="false">
|
<Grid ClipToBounds="false">
|
||||||
<Border Background="{Binding Background, ElementName=BtnSsp}"
|
<Border Background="{Binding Background, ElementName=BtnSsp}"
|
||||||
BorderBrush="{DynamicResource navigationRailBorderColor}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
BorderThickness="1"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
CornerRadius="14" />
|
CornerRadius="14" />
|
||||||
<Border Visibility="Hidden"
|
<Border Visibility="Hidden"
|
||||||
Tag="ActiveIndicator"
|
Tag="ActiveIndicator"
|
||||||
@@ -726,7 +726,7 @@
|
|||||||
Visibility="Hidden"
|
Visibility="Hidden"
|
||||||
Style="{StaticResource FlatButtonStyle2}"
|
Style="{StaticResource FlatButtonStyle2}"
|
||||||
ToolTip="{x:Static resx:Resources.CustomLink}"
|
ToolTip="{x:Static resx:Resources.CustomLink}"
|
||||||
BorderThickness="1"
|
BorderThickness="0"
|
||||||
Canvas.Top="0"
|
Canvas.Top="0"
|
||||||
Width="62"
|
Width="62"
|
||||||
Height="62"
|
Height="62"
|
||||||
@@ -736,8 +736,8 @@
|
|||||||
<ControlTemplate TargetType="{x:Type Button}">
|
<ControlTemplate TargetType="{x:Type Button}">
|
||||||
<Grid ClipToBounds="False">
|
<Grid ClipToBounds="False">
|
||||||
<Border Background="{Binding Background, ElementName=BtnCustomLink}"
|
<Border Background="{Binding Background, ElementName=BtnCustomLink}"
|
||||||
BorderBrush="{DynamicResource navigationRailBorderColor}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
BorderThickness="1"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
CornerRadius="14" />
|
CornerRadius="14" />
|
||||||
<Border Visibility="Hidden"
|
<Border Visibility="Hidden"
|
||||||
Tag="ActiveIndicator"
|
Tag="ActiveIndicator"
|
||||||
@@ -797,7 +797,7 @@
|
|||||||
Visibility="Hidden"
|
Visibility="Hidden"
|
||||||
Style="{StaticResource FlatButtonStyle2}"
|
Style="{StaticResource FlatButtonStyle2}"
|
||||||
ToolTip="{x:Static resx:Resources.mo_information}"
|
ToolTip="{x:Static resx:Resources.mo_information}"
|
||||||
BorderThickness="1"
|
BorderThickness="0"
|
||||||
Canvas.Top="0"
|
Canvas.Top="0"
|
||||||
Width="62"
|
Width="62"
|
||||||
Height="62"
|
Height="62"
|
||||||
@@ -807,8 +807,8 @@
|
|||||||
<ControlTemplate TargetType="{x:Type Button}">
|
<ControlTemplate TargetType="{x:Type Button}">
|
||||||
<Grid ClipToBounds="False">
|
<Grid ClipToBounds="False">
|
||||||
<Border Background="{Binding Background, ElementName=BtnInfo}"
|
<Border Background="{Binding Background, ElementName=BtnInfo}"
|
||||||
BorderBrush="{DynamicResource navigationRailBorderColor}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
BorderThickness="1"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
CornerRadius="14" />
|
CornerRadius="14" />
|
||||||
<Border Visibility="Hidden"
|
<Border Visibility="Hidden"
|
||||||
Tag="ActiveIndicator"
|
Tag="ActiveIndicator"
|
||||||
|
|||||||
@@ -623,6 +623,7 @@ namespace C4IT_CustomerPanel
|
|||||||
private void RefreshTrayMenu(bool ActivateFirstEntry)
|
private void RefreshTrayMenu(bool ActivateFirstEntry)
|
||||||
{
|
{
|
||||||
var TopMarginCount = 0;
|
var TopMarginCount = 0;
|
||||||
|
const int railTopOffset = 10;
|
||||||
foreach (var entry in MainFunctionButtons)
|
foreach (var entry in MainFunctionButtons)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -632,7 +633,7 @@ namespace C4IT_CustomerPanel
|
|||||||
if (isVisible)
|
if (isVisible)
|
||||||
{
|
{
|
||||||
Info.button.Visibility = Visibility.Visible;
|
Info.button.Visibility = Visibility.Visible;
|
||||||
Info.button.Margin = new Thickness(0, 70 * TopMarginCount, 0, 0);
|
Info.button.Margin = new Thickness(0, railTopOffset + (70 * TopMarginCount), 0, 0);
|
||||||
TopMarginCount++;
|
TopMarginCount++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user