Polish header controls and fix information tab layout issues

This commit is contained in:
Meik
2026-03-05 11:04:53 +01:00
parent 03fc189639
commit c29ca72b2b
5 changed files with 304 additions and 216 deletions

View File

@@ -233,6 +233,67 @@
</Style>
<Style TargetType="Image"
x:Key="ImageStyle" />
<Style TargetType="Image"
x:Key="SignalMarkerStyle"
BasedOn="{StaticResource ImageStyle}">
<Setter Property="RenderTransformOrigin"
Value="0.5,0.5" />
<Setter Property="RenderTransform">
<Setter.Value>
<ScaleTransform ScaleX="0.8"
ScaleY="0.8" />
</Setter.Value>
</Setter>
<Setter Property="SnapsToDevicePixels"
Value="False" />
</Style>
<Style TargetType="Button"
x:Key="HeaderIconButtonStyle">
<Setter Property="Foreground"
Value="{DynamicResource navForeground}" />
<Setter Property="Background"
Value="{DynamicResource headerControlBackgroundColor}" />
<Setter Property="BorderBrush"
Value="{DynamicResource panelBorderColor}" />
<Setter Property="BorderThickness"
Value="1" />
<Setter Property="Cursor"
Value="Hand" />
<Setter Property="Width"
Value="32" />
<Setter Property="Height"
Value="32" />
<Setter Property="Padding"
Value="0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="HeaderButtonBorder"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="10">
<ContentPresenter HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver"
Value="True">
<Setter TargetName="HeaderButtonBorder"
Property="Background"
Value="{DynamicResource inactiveButtonColor}" />
</Trigger>
<Trigger Property="IsPressed"
Value="True">
<Setter TargetName="HeaderButtonBorder"
Property="Opacity"
Value="0.9" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<DrawingImage x:Key="OverlayOffline">
<DrawingImage.Drawing>
@@ -280,33 +341,34 @@
HorizontalAlignment="Left"
Margin="14,14,0,0"
x:Name="Logo" />
<TextBlock x:Name="Close_Text"
MouseDown="OnMinimizeClicked"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Width="28"
Height="28"
FontSize="16"
TextAlignment="Center"
Padding="0,2,0,0"
Background="{DynamicResource headerControlBackgroundColor}"
Foreground="{DynamicResource navForeground}"
FontWeight="Bold"
Margin="0,12,12,0"
Cursor="Hand"
ToolTip="{x:Static resx:Resources.close}"
Panel.ZIndex="500"><Run Text="X" /></TextBlock>
<Image x:Name="RefreshIcon"
Source="{DynamicResource nav_appbar_refresh}"
Tag="ICO"
Panel.ZIndex="500"
HorizontalAlignment="Right"
Width="20"
Height="20"
VerticalAlignment="Top"
Margin="0,16,88,0"
MouseDown="OnRefreshClicked"
Cursor="Hand" />
<Button x:Name="Close_Text"
Style="{StaticResource HeaderIconButtonStyle}"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Margin="0,12,12,0"
Panel.ZIndex="500"
ToolTip="{x:Static resx:Resources.close}"
PreviewMouseDown="OnMinimizeClicked">
<TextBlock Text="X"
FontSize="15"
FontWeight="Bold"
TextAlignment="Center"
VerticalAlignment="Center"
HorizontalAlignment="Center" />
</Button>
<Button x:Name="RefreshIcon"
Style="{StaticResource HeaderIconButtonStyle}"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Margin="0,12,88,0"
Panel.ZIndex="500"
ToolTip="Refresh"
PreviewMouseDown="OnRefreshClicked">
<Image Source="{DynamicResource nav_appbar_refresh}"
Tag="ICO"
Width="16"
Height="16" />
</Button>
<!--<TextBlock MouseDown="OnCloseClicked" HorizontalAlignment="Right" FontSize="20" FontWeight="Bold" Margin="0,-5,5,0" Cursor="Hand" Panel.ZIndex="500" >X</TextBlock>-->
<Image Source="{DynamicResource nav_appbar_network_server_disconnect}"
Tag="ICO"
@@ -472,10 +534,8 @@
<Image Source="Resources/StateOverlays/OverlayNewContentButton.png"
Visibility="Collapsed"
Panel.ZIndex="18"
Style="{StaticResource ImageStyle}"
Style="{StaticResource SignalMarkerStyle}"
Tag="Signal"
Width="12"
Height="12"
Stretch="None"
HorizontalAlignment="Center"
VerticalAlignment="Center"
@@ -530,10 +590,8 @@
<Image Source="Resources/StateOverlays/OverlayNewContentButton.png"
Visibility="Collapsed"
Panel.ZIndex="18"
Style="{StaticResource ImageStyle}"
Style="{StaticResource SignalMarkerStyle}"
Tag="Signal"
Width="12"
Height="12"
Stretch="None"
HorizontalAlignment="Center"
VerticalAlignment="Center"
@@ -587,10 +645,8 @@
<Image Source="Resources/StateOverlays/OverlayNewContentButton.png"
Visibility="Collapsed"
Panel.ZIndex="18"
Style="{StaticResource ImageStyle}"
Style="{StaticResource SignalMarkerStyle}"
Tag="Signal"
Width="12"
Height="12"
Stretch="None"
HorizontalAlignment="Center"
VerticalAlignment="Center"
@@ -645,10 +701,8 @@
<Image Source="Resources/StateOverlays/OverlayNewContentButton.png"
Visibility="Collapsed"
Panel.ZIndex="18"
Style="{StaticResource ImageStyle}"
Style="{StaticResource SignalMarkerStyle}"
Tag="Signal"
Width="12"
Height="12"
Stretch="None"
HorizontalAlignment="Center"
VerticalAlignment="Center"
@@ -703,10 +757,8 @@
<Image Source="Resources/StateOverlays/OverlayNewContentButton.png"
Visibility="Collapsed"
Panel.ZIndex="18"
Style="{StaticResource ImageStyle}"
Style="{StaticResource SignalMarkerStyle}"
Tag="Signal"
Width="12"
Height="12"
Stretch="None"
HorizontalAlignment="Center"
VerticalAlignment="Center"