TizenRefApp-8939 Add dim style for Flat Button 01/142601/5
authorRuslan Zakharov <r.zakharov@samsung.com>
Fri, 4 Aug 2017 11:37:54 +0000 (14:37 +0300)
committerRuslan Zakharov <r.zakharov@samsung.com>
Mon, 14 Aug 2017 12:05:21 +0000 (15:05 +0300)
Added dim style for Flat Button

Change-Id: Iaf908a4381a53d5292aaf0aae1e53987804c7b6d

CallApp.Tizen/Call/Controls/FlatButton.xaml
CallApp.Tizen/Call/Controls/FlatCheckbox.xaml
CallApp.Tizen/Call/Themes/FlatControlTheme.xaml

index f31ebfc..e11eae2 100644 (file)
                             </Grid.RowDefinitions>
 
                             <commonControls:CustomImage Grid.Column="1" Grid.Row="1" HorizontalOptions="Center" VerticalOptions="Center"
-                                                        Source="{TemplateBinding Image}" BlendingColor="{TemplateBinding ImageColor}" />
+                                                        Source="{TemplateBinding Image}" BlendingColor="{TemplateBinding ImageColor}">
+                                <commonControls:CustomImage.Triggers>
+                                    <DataTrigger TargetType="commonControls:CustomImage" Binding="{TemplateBinding IsEnabled}" Value="False">
+                                        <Setter Property="BlendingColor" Value="{StaticResource FlatControlDimColor}" />
+                                    </DataTrigger>
+                                </commonControls:CustomImage.Triggers>
+                            </commonControls:CustomImage>
 
                             <Label Grid.Column="1" Grid.Row="3" HorizontalOptions="Center" VerticalOptions="Center" FontSize="19"
-                                   Text="{TemplateBinding Text}" TextColor="{TemplateBinding TextColor}" />
+                                   Text="{TemplateBinding Text}" TextColor="{TemplateBinding TextColor}">
+                                <Label.Triggers>
+                                    <DataTrigger TargetType="Label" Binding="{TemplateBinding IsEnabled}" Value="False">
+                                        <Setter Property="TextColor" Value="{StaticResource FlatControlDimColor}" />
+                                    </DataTrigger>
+                                </Label.Triggers>
+                            </Label>
 
                             <ContentPresenter Grid.Column="1" Grid.Row="4" />
                         </commonControls:CustomGrid>
index 649a789..d248248 100644 (file)
                 <DataTrigger TargetType="commonControls:CustomGrid" Binding="{Binding IsChecked, Source={x:Reference This}}" Value="True">
                     <Setter Property="BackgroundColor" Value="{StaticResource FlatControlCheckOnColor}" />
                 </DataTrigger>
+
+                <DataTrigger TargetType="commonControls:CustomGrid" Binding="{Binding IsEnabled, Source={x:Reference This}}" Value="False">
+                    <Setter Property="BackgroundColor" Value="{StaticResource FlatControlDimColor}" />
+                </DataTrigger>
             </commonControls:CustomGrid.Triggers>
         </commonControls:CustomGrid>
     </commonControls:CustomGrid>
index 3854ff1..76d13df 100644 (file)
@@ -8,6 +8,7 @@
     <Color x:Key="FlatControlBorderColor">#FFD9D9D9</Color>
     <Color x:Key="FlatControlCheckOffColor">#4C666666</Color>
     <Color x:Key="FlatControlCheckOnColor">#FF2EB4C8</Color>
+    <Color x:Key="FlatControlDimColor">#4D4D4D4D</Color>
     <Color x:Key="FlatControlImageDimColor">#4C808080</Color>
     <Color x:Key="FlatControlImageNormalColor">#FF808080</Color>
     <Color x:Key="FlatControlImageOnColor">#FF2EB4C8</Color>