Adapt reply buttons style OUT-587
authorThomas
Fri, 09 Aug 2019 13:42:26 +0200
branchOUT-587
changeset 26981c6a41e15b8b
parent 2696 428b91e45c69
child 2699 48ccff541ad6
Adapt reply buttons style
Resources/Dictionary.xaml
UI/FormControlPreviewMessage.xaml
     1.1 --- a/Resources/Dictionary.xaml	Thu Aug 08 12:31:10 2019 +0200
     1.2 +++ b/Resources/Dictionary.xaml	Fri Aug 09 13:42:26 2019 +0200
     1.3 @@ -351,4 +351,62 @@
     1.4          </Setter>
     1.5      </Style>
     1.6  
     1.7 +    <!-- Style for the Unencrypted preview reply/forward buttons -->
     1.8 +    <Style x:Key="StyleReplyButton"
     1.9 +           TargetType="Button"
    1.10 +           BasedOn="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
    1.11 +        <Setter Property="Padding"
    1.12 +                Value="10,7" />
    1.13 +        <Setter Property="BorderBrush"
    1.14 +                Value="DarkGray" />
    1.15 +        <Setter Property="Margin"
    1.16 +                Value="0,0,0,0" />
    1.17 +        <Setter Property="BorderThickness"
    1.18 +                Value="1" />
    1.19 +        <Setter Property="MinHeight"
    1.20 +                Value="28" />
    1.21 +        <Setter Property="MinWidth"
    1.22 +                Value="80" />
    1.23 +        <Setter Property="HorizontalContentAlignment"
    1.24 +                Value="Center" />
    1.25 +        <Setter Property="VerticalContentAlignment"
    1.26 +                Value="Center" />
    1.27 +        <Setter Property="Template">
    1.28 +            <Setter.Value>
    1.29 +                <ControlTemplate TargetType="ButtonBase">
    1.30 +                    <Border BorderThickness="{TemplateBinding Border.BorderThickness}"
    1.31 +                            BorderBrush="{TemplateBinding Border.BorderBrush}"
    1.32 +                            Background="{TemplateBinding Panel.Background}"
    1.33 +                            Name="border"
    1.34 +                            SnapsToDevicePixels="True">
    1.35 +                        <ContentPresenter RecognizesAccessKey="True"
    1.36 +                                          Content="{TemplateBinding ContentControl.Content}"
    1.37 +                                          ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
    1.38 +                                          ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}"
    1.39 +                                          Name="contentPresenter"
    1.40 +                                          Margin="{TemplateBinding Control.Padding}"
    1.41 +                                          HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
    1.42 +                                          VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
    1.43 +                                          SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"
    1.44 +                                          Focusable="False" />
    1.45 +                    </Border>
    1.46 +                    <ControlTemplate.Triggers>
    1.47 +                        <Trigger Property="UIElement.IsMouseOver"
    1.48 +                                 Value="True">
    1.49 +                            <Setter Property="Panel.Background"
    1.50 +                                    TargetName="border"
    1.51 +                                    Value="AliceBlue" />
    1.52 +                        </Trigger>
    1.53 +                        <Trigger Property="ButtonBase.IsPressed"
    1.54 +                                 Value="True">
    1.55 +                            <Setter Property="Panel.Background"
    1.56 +                                    TargetName="border"
    1.57 +                                    Value="LightSteelBlue" />
    1.58 +                        </Trigger>
    1.59 +                    </ControlTemplate.Triggers>
    1.60 +                </ControlTemplate>
    1.61 +            </Setter.Value>
    1.62 +        </Setter>
    1.63 +    </Style>
    1.64 +
    1.65  </ResourceDictionary>
    1.66 \ No newline at end of file
     2.1 --- a/UI/FormControlPreviewMessage.xaml	Thu Aug 08 12:31:10 2019 +0200
     2.2 +++ b/UI/FormControlPreviewMessage.xaml	Fri Aug 09 13:42:26 2019 +0200
     2.3 @@ -119,13 +119,7 @@
     2.4                      HorizontalAlignment="Right"
     2.5                      VerticalAlignment="Stretch">
     2.6                  <Button Name="ButtonReply"
     2.7 -                    Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
     2.8 -                    Padding="10,7"
     2.9 -                    Margin="0"
    2.10 -                    BorderBrush="DarkGray"
    2.11 -                    BorderThickness="1"
    2.12 -                    HorizontalContentAlignment="Center"
    2.13 -                    VerticalContentAlignment="Center"
    2.14 +                    Style="{StaticResource StyleReplyButton}"                    
    2.15                      Click="ButtonReply_Click">
    2.16                      <StackPanel Orientation="Horizontal">
    2.17                          <Image Stretch="Uniform"
    2.18 @@ -138,13 +132,7 @@
    2.19                      </StackPanel>
    2.20                  </Button>
    2.21                  <Button Name="ButtonReplyAll"
    2.22 -                    Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
    2.23 -                    Padding="10,7"
    2.24 -                    Margin="0"
    2.25 -                    BorderBrush="DarkGray"
    2.26 -                    BorderThickness="1"
    2.27 -                    HorizontalContentAlignment="Center"
    2.28 -                    VerticalContentAlignment="Center"
    2.29 +                    Style="{StaticResource StyleReplyButton}"
    2.30                      Click="ButtonReplyAll_Click">
    2.31                      <StackPanel Orientation="Horizontal">
    2.32                          <Image Stretch="Uniform"
    2.33 @@ -157,13 +145,7 @@
    2.34                      </StackPanel>
    2.35                  </Button>
    2.36                  <Button Name="ButtonForward"
    2.37 -                    Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
    2.38 -                    Padding="10,7"
    2.39 -                    Margin="0"
    2.40 -                    BorderBrush="DarkGray"
    2.41 -                    BorderThickness="1"
    2.42 -                    HorizontalContentAlignment="Center"
    2.43 -                    VerticalContentAlignment="Center"
    2.44 +                    Style="{StaticResource StyleReplyButton}" 
    2.45                      Click="ButtonForward_Click">
    2.46                      <StackPanel Orientation="Horizontal">
    2.47                          <Image Stretch="Uniform"