Make nav buttons borderless and realign rail button offset

This commit is contained in:
Meik
2026-03-05 11:36:18 +01:00
parent 21081bbf4b
commit ee165ce0f6
2 changed files with 23 additions and 22 deletions

View File

@@ -216,9 +216,9 @@
<Setter Property="Foreground"
Value="{DynamicResource navForeground}" />
<Setter Property="BorderBrush"
Value="{DynamicResource navigationRailBorderColor}" />
Value="Transparent" />
<Setter Property="BorderThickness"
Value="1" />
Value="0" />
</Style>
<Style TargetType="ProgressBar"
x:Key="FlatProgressBar">
@@ -467,18 +467,18 @@
<Button Visibility="Hidden"
x:Name="BtnBack"
Tag="100"
Canvas.Top="6"
Canvas.Top="10"
Canvas.Left="4"
Width="62"
Height="62"
BorderThickness="1"
BorderThickness="0"
Style="{StaticResource FlatButtonStyle2}"
Panel.ZIndex="1000">
<Button.Template>
<ControlTemplate TargetType="{x:Type Button}">
<Border Background="{Binding Background, ElementName=BtnBack}"
BorderBrush="{DynamicResource navigationRailBorderColor}"
BorderThickness="1"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="14">
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center" />
@@ -509,7 +509,7 @@
Visibility="Visible"
Style="{StaticResource FlatButtonStyle2}"
ToolTip="{x:Static resx:Resources.mo_announcement}"
BorderThickness="1"
BorderThickness="0"
Panel.ZIndex="1000"
Width="62"
Height="62"
@@ -519,8 +519,8 @@
<ControlTemplate TargetType="{x:Type Button}">
<Grid ClipToBounds="False">
<Border Background="{Binding Background, ElementName=BtnAnnouncements}"
BorderBrush="{DynamicResource navigationRailBorderColor}"
BorderThickness="1"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="14" />
<Border Visibility="Hidden"
Tag="ActiveIndicator"
@@ -585,7 +585,7 @@
Visibility="Hidden"
Style="{StaticResource FlatButtonStyle2}"
ToolTip="{x:Static resx:Resources.mo_incidents }"
BorderThickness="1"
BorderThickness="0"
Canvas.Top="0"
Width="62"
Height="62"
@@ -594,8 +594,8 @@
<ControlTemplate TargetType="{x:Type Button}">
<Grid ClipToBounds="False">
<Border Background="{Binding Background, ElementName=BtnIncident}"
BorderBrush="{DynamicResource navigationRailBorderColor}"
BorderThickness="1"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="14" />
<Border Visibility="Hidden"
Tag="ActiveIndicator"
@@ -656,7 +656,7 @@
Visibility="Hidden"
Style="{StaticResource FlatButtonStyle2}"
ToolTip="{x:Static resx:Resources.mo_ssp}"
BorderThickness="1"
BorderThickness="0"
Canvas.Top="0"
Width="62"
Height="62"
@@ -665,8 +665,8 @@
<ControlTemplate TargetType="{x:Type Button}">
<Grid ClipToBounds="false">
<Border Background="{Binding Background, ElementName=BtnSsp}"
BorderBrush="{DynamicResource navigationRailBorderColor}"
BorderThickness="1"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="14" />
<Border Visibility="Hidden"
Tag="ActiveIndicator"
@@ -726,7 +726,7 @@
Visibility="Hidden"
Style="{StaticResource FlatButtonStyle2}"
ToolTip="{x:Static resx:Resources.CustomLink}"
BorderThickness="1"
BorderThickness="0"
Canvas.Top="0"
Width="62"
Height="62"
@@ -736,8 +736,8 @@
<ControlTemplate TargetType="{x:Type Button}">
<Grid ClipToBounds="False">
<Border Background="{Binding Background, ElementName=BtnCustomLink}"
BorderBrush="{DynamicResource navigationRailBorderColor}"
BorderThickness="1"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="14" />
<Border Visibility="Hidden"
Tag="ActiveIndicator"
@@ -797,7 +797,7 @@
Visibility="Hidden"
Style="{StaticResource FlatButtonStyle2}"
ToolTip="{x:Static resx:Resources.mo_information}"
BorderThickness="1"
BorderThickness="0"
Canvas.Top="0"
Width="62"
Height="62"
@@ -807,8 +807,8 @@
<ControlTemplate TargetType="{x:Type Button}">
<Grid ClipToBounds="False">
<Border Background="{Binding Background, ElementName=BtnInfo}"
BorderBrush="{DynamicResource navigationRailBorderColor}"
BorderThickness="1"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="14" />
<Border Visibility="Hidden"
Tag="ActiveIndicator"

View File

@@ -623,6 +623,7 @@ namespace C4IT_CustomerPanel
private void RefreshTrayMenu(bool ActivateFirstEntry)
{
var TopMarginCount = 0;
const int railTopOffset = 10;
foreach (var entry in MainFunctionButtons)
{
try
@@ -632,7 +633,7 @@ namespace C4IT_CustomerPanel
if (isVisible)
{
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++;
}
else