Commit 3405fdc0 authored by Francesco Carraro's avatar Francesco Carraro
Browse files

fixed template for circular buttons

parent e544061f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@
			<fix>When a processing step (alignment, etc) is saved on cloud, cloud icon appears on related panel</fix>
			<fix>Fixed issue in saving smoothed spectrum on cloud</fix>
			<fix>Fixed issue in saving smoothed spectrum locally</fix>
			<fix>Fixed template for circular buttons</fix>
		</fixes>
		<addings>
			<adding>Added warning message when saving on cloud overwrites data already saved on cloud</adding>
+60 −33
Original line number Diff line number Diff line
@@ -99,51 +99,78 @@

    <!-- CIRCLE BUTTON -->
    <Style x:Key="CircleButton" TargetType="Button">
        <Setter Property="BorderBrush" Value="{StaticResource myTextForeground}" />
        <Setter Property="BorderThickness" Value="10" />
        <Setter Property="Background" Value="{ThemeResource SystemControlBackgroundBaseLowBrush}"/>
        <Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}"/>
        <Setter Property="BorderBrush" Value="{ThemeResource SystemControlForegroundTransparentBrush}"/>
        <Setter Property="BorderThickness" Value="{ThemeResource ButtonBorderThemeThickness}"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="Margin" Value="0"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}"/>
        <Setter Property="FontWeight" Value="Normal"/>
        <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}"/>
        <Setter Property="UseSystemFocusVisuals" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid>
                    <Grid x:Name="RootGrid">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Disabled">
                                <VisualState x:Name="Normal">
                                    <Storyboard>
                                        <ColorAnimation Duration="0" To="{ThemeResource TelerikDisabledColor}" Storyboard.TargetProperty="(Ellipse.Fill).(SolidColorBrush.Color)"
                                                        Storyboard.TargetName="EllipseInner"/>
                                        <ColorAnimation Duration="0" To="{ThemeResource TelerikDisabledColor}" Storyboard.TargetProperty="(Ellipse.Fill).(SolidColorBrush.Color)"
                                                        Storyboard.TargetName="EllipseOuter"/>
                                        <PointerUpThemeAnimation Storyboard.TargetName="RootGrid"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="PointerOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="BorderCircle">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource myWhite}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="BorderCircle">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource myLightGray}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <PointerUpThemeAnimation Storyboard.TargetName="RootGrid"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver"/>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Inner" Storyboard.TargetProperty="(ScaleTransform.ScaleY)">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0.0" Value="1"/>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="BorderCircle">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource myWhite}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Outer" Storyboard.TargetProperty="(ScaleTransform.ScaleY)">
                                            <DiscreteObjectKeyFrame KeyTime="0:0:0.0" Value="-1"/>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="BorderCircle">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource myLightGray}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <PointerDownThemeAnimation Storyboard.TargetName="RootGrid"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Fill" Storyboard.TargetName="BorderCircle">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlBackgroundBaseLowBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlDisabledBaseMediumLowBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Stroke" Storyboard.TargetName="BorderCircle">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlDisabledTransparentBrush}"/>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused"/>
                                <VisualState x:Name="Unfocused"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Ellipse x:Name="EllipseInner" Margin="4" Fill="{ThemeResource SystemAccentColor}" RenderTransformOrigin="0.5,0.5">
                            <Ellipse.RenderTransform>
                                <ScaleTransform ScaleY="1" x:Name="Outer"/>
                            </Ellipse.RenderTransform>
                        </Ellipse>
                        <Ellipse x:Name="EllipseOuter" Margin="20" Fill="{ThemeResource SystemAccentColor}" RenderTransformOrigin="0.5,0.5">
                            <Ellipse.RenderTransform>
                                <ScaleTransform ScaleY="-1" x:Name="Inner"/>
                            </Ellipse.RenderTransform>
                        </Ellipse>
                        <ContentPresenter x:Name="content" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                        <Ellipse x:Name="BorderCircle"
                                 StrokeThickness="1"
                                 Fill="{StaticResource myBackground}"/>
                        <ContentPresenter x:Name="ContentPresenter"
                                          VerticalAlignment="Center"
                                          AutomationProperties.AccessibilityView="Raw"
                                          ContentTemplate="{TemplateBinding ContentTemplate}"
                                          ContentTransitions="{TemplateBinding ContentTransitions}"
                                          Content="{TemplateBinding Content}"
                                          HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          Padding="{TemplateBinding Padding}"
                                          VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
+10 −10
Original line number Diff line number Diff line
@@ -51,8 +51,8 @@
                        FontFamily="Segoe MDL2 Assets"
                        Content="&#xE8A3;"
                        HorizontalAlignment="Left"
                        Width="48"
                        Height="48"
                        Width="36"
                        Height="36"
                        Margin="8"
                        Style="{StaticResource CircleButton}"
                        Background="{ThemeResource SystemAccentColor}"
@@ -77,8 +77,8 @@
                        FontFamily="Segoe MDL2 Assets"
                        Content="&#xE8A0;"
                        HorizontalAlignment="Left"
                        Width="48"
                        Height="48"
                        Width="36"
                        Height="36"
                        Margin="8"
                        Style="{StaticResource CircleButton}"
                        Background="{ThemeResource SystemAccentColor}"
@@ -103,8 +103,8 @@
                        FontFamily="Segoe MDL2 Assets"
                        Content="&#xE71F;"
                        HorizontalAlignment="Left"
                        Width="48"
                        Height="48"
                        Width="36"
                        Height="36"
                        Margin="8"
                        IsEnabled="{x:Bind ViewModel.IsZoomActive, Mode=OneWay}"
                        Style="{StaticResource CircleButton}"
@@ -214,8 +214,8 @@
                        FontFamily="Segoe MDL2 Assets"
                        Content="&#xF13E;"
                        HorizontalAlignment="Left"
                        Width="48"
                        Height="48"
                        Width="36"
                        Height="36"
                        Margin="8"
                        Style="{StaticResource CircleButton}"
                        Background="{ThemeResource SystemAccentColor}"
@@ -240,8 +240,8 @@
                        FontFamily="Segoe MDL2 Assets"
                        Content="&#xE8A0;"
                        HorizontalAlignment="Left"
                        Width="48"
                        Height="48"
                        Width="36"
                        Height="36"
                        Margin="8"
                        Style="{StaticResource CircleButton}"
                        Background="{ThemeResource SystemAccentColor}"
+6 −6
Original line number Diff line number Diff line
@@ -57,8 +57,8 @@
            <Button x:Name="buttonHide"
                    FontFamily="Segoe MDL2 Assets"
                    HorizontalAlignment="Right"
                    Width="48"
                    Height="48"
                    Width="40"
                    Height="40"
                    Margin="8,8,16,8"
                    Style="{ThemeResource CircleButton}"
                    Grid.Row="0"
@@ -230,8 +230,8 @@
                        FontFamily="Segoe MDL2 Assets"
                        Content="&#xF13E;"
                        HorizontalAlignment="Left"
                        Width="48"
                        Height="48"
                        Width="40"
                        Height="40"
                        Margin="24,8,8,8"
                        Style="{ThemeResource CircleButton}"
                        Background="{ThemeResource SystemAccentColor}"
@@ -377,8 +377,8 @@
                        FontFamily="Segoe MDL2 Assets"
                        Content="&#xE74D;"
                        HorizontalAlignment="Left"
                        Width="48"
                        Height="48"
                        Width="40"
                        Height="40"
                        Margin="8"
                        IsEnabled="{x:Bind SpectraContainer.IsAnySpectrumLoadedOrRemoved, Converter={StaticResource IsAnySpectrumOfTypeConverter}, ConverterParameter='Aligned', Mode=OneWay}"
                        Style="{ThemeResource CircleButton}"
+8 −8
Original line number Diff line number Diff line
@@ -43,8 +43,8 @@
        <!-- BUTTON HIDE -->
        <Button x:Name="buttonHide"
                FontFamily="Segoe MDL2 Assets"
                Width="48"
                Height="48"
                Width="40"
                Height="40"
                Margin="0,8,16,8"
                HorizontalAlignment="Right"
                Style="{ThemeResource CircleButton}"
@@ -707,9 +707,9 @@
        <!-- BUTTON SAVE -->
        <Button x:Name="buttonSave"
                FontFamily="Segoe MDL2 Assets"
                Width="48"
                Height="48"
                Margin="4,16,4,0"
                Width="40"
                Height="40"
                Margin="4,16,4,8"
                Style="{ThemeResource CircleButton}"
                Background="{ThemeResource SystemAccentColor}"
                Grid.Row="2">
@@ -728,9 +728,9 @@
        <!-- BUTTON RELOAD -->
        <Button x:Name="buttonReload"
                FontFamily="Segoe MDL2 Assets"
                Width="48"
                Height="48"
                Margin="60,16,4,0"
                Width="40"
                Height="40"
                Margin="60,16,4,8"
                Style="{ThemeResource CircleButton}"
                Background="{ThemeResource SystemAccentColor}"
                Grid.Row="2">
Loading