]> granicus.if.org Git - handbrake/commitdiff
WinGui: Fix a number of styles that were not obeying the Use System Colours option.
authorsr55 <sr55.hb@outlook.com>
Thu, 2 Jan 2014 21:48:00 +0000 (21:48 +0000)
committersr55 <sr55.hb@outlook.com>
Thu, 2 Jan 2014 21:48:00 +0000 (21:48 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5953 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/HandBrakeWPF/Views/AddPresetView.xaml
win/CS/HandBrakeWPF/Views/ErrorView.xaml
win/CS/HandBrakeWPF/Views/MainView.xaml
win/CS/HandBrakeWPF/Views/OptionsView.xaml
win/CS/HandBrakeWPF/Views/PreviewView.xaml
win/CS/HandBrakeWPF/Views/QueueView.xaml
win/CS/HandBrakeWPF/Views/ShellView.xaml
win/CS/HandBrakeWPF/Views/Styles/Styles.xaml

index 0c398eaaf55716cf57c33ea91375c4b02f8671f4..b71178bdc1d77e480329399c1b2442d5c8759b8a 100644 (file)
@@ -25,8 +25,7 @@
     </Window.Resources>\r
 \r
     <Grid HorizontalAlignment="Stretch"\r
-          VerticalAlignment="Stretch"\r
-          Background="#FFF1F0EF">\r
+          VerticalAlignment="Stretch">\r
         <Grid.RowDefinitions>\r
             <RowDefinition Height="Auto" />\r
             <RowDefinition Height="Auto" />\r
             <RowDefinition Height="Auto" />\r
         </Grid.RowDefinitions>\r
 \r
+        <Grid.Style>\r
+            <Style TargetType="Grid">\r
+                <Style.Triggers>\r
+                    <DataTrigger Binding="{Binding UseSystemColours}" Value="False">\r
+                        <Setter Property="Background" Value="#FFF1F0EF" />\r
+                    </DataTrigger>\r
+                </Style.Triggers>\r
+            </Style>\r
+        </Grid.Style>\r
+\r
+\r
         <!--  Header  -->\r
         <StackPanel Grid.Row="0"\r
                     Height="30"\r
                     Margin="0,0,0,10"\r
-                    Background="White"\r
                     Orientation="Horizontal">\r
+            <StackPanel.Style>\r
+                <Style TargetType="StackPanel">\r
+                    <Style.Triggers>\r
+                        <DataTrigger Binding="{Binding UseSystemColours}" Value="False">\r
+                            <Setter Property="Background" Value="White" />\r
+                        </DataTrigger>\r
+                    </Style.Triggers>\r
+                </Style>\r
+            </StackPanel.Style>\r
+            \r
             <Image Width="24"\r
                    Height="24"\r
                    Margin="10,0,5,0"\r
 \r
         <!--  Controls  -->\r
         <Grid Grid.Row="3"\r
-              Margin="0,20,0,0"\r
-              Background="LightGray">\r
+              Margin="0,20,0,0">\r
+\r
+            <Grid.Style>\r
+                <Style TargetType="Grid">\r
+                    <Style.Triggers>\r
+                        <DataTrigger Binding="{Binding UseSystemColours}" Value="False">\r
+                            <Setter Property="Background" Value="LightGray" />\r
+                        </DataTrigger>\r
+                    </Style.Triggers>\r
+                </Style>\r
+            </Grid.Style>\r
+            \r
             <Grid.ColumnDefinitions>\r
                 <ColumnDefinition Width="*" />\r
                 <ColumnDefinition Width="Auto" />\r
index e4e7ab8850a98485e73d6edec672423e7775ea90..95b6e85cb103f01657085f67d8bd6424e21a8296 100644 (file)
@@ -7,7 +7,7 @@
         Height="380"\r
         MinWidth="680"\r
         MinHeight="380"\r
-        Background="#FFF0F0F0"\r
+        Style="{StaticResource windowStyle}"\r
         FontSize="11"\r
         TextOptions.TextFormattingMode="Display"\r
         WindowStartupLocation="CenterScreen">\r
         <!--  Header  -->\r
         <StackPanel Grid.Row="0"\r
                     Margin="0,0,0,0"\r
-                    Background="White"\r
                     Orientation="Horizontal">\r
+\r
+            <StackPanel.Style>\r
+                <Style TargetType="StackPanel">\r
+                    <Style.Triggers>\r
+                        <DataTrigger Binding="{Binding UseSystemColours}" Value="False">\r
+                            <Setter Property="Background" Value="White" />\r
+                        </DataTrigger>\r
+                    </Style.Triggers>\r
+                </Style>\r
+            </StackPanel.Style>\r
+\r
             <Image Width="64"\r
                    Height="64"\r
                    Margin="10,0,0,0"\r
 \r
 \r
         <!--  Controls  -->\r
-        <Grid Grid.Row="2" Background="LightGray">\r
+        <Grid Grid.Row="2">\r
             <Grid.ColumnDefinitions>\r
                 <ColumnDefinition Width="*" />\r
                 <ColumnDefinition Width="Auto" />\r
                 <ColumnDefinition Width="Auto" />\r
             </Grid.ColumnDefinitions>\r
 \r
+            <Grid.Style>\r
+                <Style TargetType="Grid">\r
+                    <Style.Triggers>\r
+                        <DataTrigger Binding="{Binding UseSystemColours}" Value="False">\r
+                            <Setter Property="Background" Value="LightGray" />\r
+                        </DataTrigger>\r
+                    </Style.Triggers>\r
+                </Style>\r
+            </Grid.Style>\r
+\r
             <Button Grid.Column="1"\r
                     Margin="5"\r
                     cal:Message.Attach="[Event Click] = [Action Copy]"\r
index 1fcbd9daa924d9f490ada7548f6f6123e2e380e9..68b7d739efb210bfd15ad25d580ea226fc4adc0f 100644 (file)
                                   SelectedItem="{Binding Path=SelectedTitle}"\r
                                   />\r
                         <Label Margin="8,0,0,0" Content="Angle" />\r
+                        \r
                         <ComboBox Name="Angles"\r
                                   MinWidth="60"\r
                                   Margin="8,0,0,0"\r
index aa4ed6a646c0480c1348248a5bdfd394bac62855..ad1a20ca43f2127ab33a97d549869439adc9a66b 100644 (file)
             </StackPanel>\r
         </ScrollViewer>\r
 \r
-        <StackPanel HorizontalAlignment="Stretch" Background="LightGray" Grid.Row="1" Grid.ColumnSpan="2" >\r
+        <StackPanel HorizontalAlignment="Stretch" Grid.Row="1" Grid.ColumnSpan="2" >\r
+            <StackPanel.Style>\r
+                <Style TargetType="StackPanel">\r
+                    <Style.Triggers>\r
+                        <DataTrigger Binding="{Binding UseSystemColours}" Value="False">\r
+                            <Setter Property="Background" Value="LightGray" />\r
+                        </DataTrigger>\r
+                    </Style.Triggers>\r
+                </Style>\r
+            </StackPanel.Style>\r
+            \r
             <Button Content="Close" IsDefault="True" cal:Message.Attach="[Event Click] = [Action Close]"\r
                     HorizontalAlignment="Center" Padding="12,2" Margin="0,5,10,5" />\r
         </StackPanel>\r
index db6acfb9b1dba680001ed1d05c2bc51d2493215a..bb15e7ce477059016d6eaf733cff4d191681abd0 100644 (file)
@@ -6,7 +6,7 @@
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"\r
         Title="{Binding Title}"\r
         Width="380"\r
-        Background="#FFF1F0EF"\r
+        Style="{StaticResource windowStyle}"\r
         ResizeMode="NoResize"\r
         SizeToContent="Height"\r
         WindowStartupLocation="CenterScreen"\r
 \r
     <StackPanel Orientation="Vertical">\r
 \r
-        <StackPanel Grid.Row="0"\r
-                    Height="34"\r
+        <StackPanel Height="34"\r
                     Margin="0,0,0,10"\r
-                    Background="White"\r
                     Orientation="Horizontal">\r
+\r
+            <StackPanel.Style>\r
+                <Style TargetType="StackPanel">\r
+                    <Style.Triggers>\r
+                        <DataTrigger Binding="{Binding UseSystemColours}" Value="False">\r
+                            <Setter Property="Background" Value="White" />\r
+                        </DataTrigger>\r
+                    </Style.Triggers>\r
+                </Style>\r
+            </StackPanel.Style>\r
+\r
             <Image Width="32"\r
                    Height="32"\r
                    Margin="10,0,5,0"\r
index 77532e9249402ce91d64e9b19493f9c60e2c54fc..5ff075455f22795785d96a6c1984414cd6ad2549 100644 (file)
@@ -16,7 +16,7 @@
         Height="500"\r
         MinWidth="350"\r
         MinHeight="250"\r
-        Background="#FFF0F0F0"\r
+        Style="{StaticResource windowStyle}"\r
         WindowStartupLocation="CenterScreen"\r
         TextOptions.TextFormattingMode="Display"\r
         mc:Ignorable="d">\r
 \r
         <ListBox Grid.Row="2"\r
                  Margin="10,0,10,10"\r
-                 Background="LightGray"\r
                  dd:DragDrop.DropHandler="{Binding}"\r
                  dd:DragDrop.IsDragSource="True"\r
                  dd:DragDrop.IsDropTarget="True"\r
                  ItemsSource="{Binding QueueTasks, Mode=OneWay}"\r
                  SelectionMode="Extended">\r
+            \r
+            <ListBox.Style>\r
+                <Style TargetType="ListBox">\r
+                    <Style.Triggers>\r
+                        <DataTrigger Binding="{Binding UseSystemColours}" Value="False">\r
+                            <Setter Property="Background" Value="LightGray" />\r
+                        </DataTrigger>\r
+                    </Style.Triggers>\r
+                </Style>\r
+            </ListBox.Style>\r
 \r
             <ListBox.ContextMenu>\r
                 <ContextMenu>\r
             <ListBox.ItemContainerStyle>\r
                 <Style TargetType="{x:Type ListBoxItem}">\r
                     <Setter Property="HorizontalContentAlignment" Value="Stretch" />\r
-                    <Setter Property="Background" Value="WhiteSmoke" />\r
                     <Setter Property="Margin" Value="0,0,0,1" />\r
                     <Setter Property="ToolTip">\r
                         <Setter.Value>\r
 \r
                         </Setter.Value>\r
                     </Setter>\r
+                    <Style.Triggers>\r
+                        <DataTrigger Binding="{Binding DataContext.UseSystemColours, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="False">\r
+                            <Setter Property="Background" Value="WhiteSmoke" />\r
+                        </DataTrigger>\r
+                    </Style.Triggers>\r
+                    \r
                 </Style>\r
             </ListBox.ItemContainerStyle>\r
 \r
index 84411cdca08d5b2247d978789651c3db239a2266..c9702a7a73374fc960ca00801ee21a94bb00f29f 100644 (file)
@@ -14,7 +14,7 @@
         UseLayoutRounding="True"\r
         WindowStartupLocation="CenterScreen"\r
         TextOptions.TextFormattingMode="Display"\r
-        Style="{StaticResource mainWindowStyle}"\r
+        Style="{StaticResource windowStyle}"\r
         x:Name="shellView"\r
         >\r
     <Window.Resources>\r
index 1fd0b7e9474be4b8b82e30c34aba44a168b0d752..2472a6b28b5b659af9cbc089f1977560fc6e366f 100644 (file)
@@ -1,7 +1,7 @@
 <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"\r
                     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">\r
 \r
-    <Style x:Key="mainWindowStyle" TargetType="Window">\r
+    <Style x:Key="windowStyle" TargetType="Window">\r
         <Style.Triggers>\r
             <DataTrigger Binding="{Binding UseSystemColours}" Value="False">\r
                 <Setter Property="Background" Value="#FFF0F0F0" />\r