summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Views
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrakeWPF/Views')
-rw-r--r--win/CS/HandBrakeWPF/Views/AudioView.xaml17
-rw-r--r--win/CS/HandBrakeWPF/Views/MainView.xaml20
-rw-r--r--win/CS/HandBrakeWPF/Views/OptionsView.xaml15
-rw-r--r--win/CS/HandBrakeWPF/Views/ShellView.xaml5
-rw-r--r--win/CS/HandBrakeWPF/Views/Styles/Styles.xaml35
-rw-r--r--win/CS/HandBrakeWPF/Views/SubtitlesView.xaml17
6 files changed, 93 insertions, 16 deletions
diff --git a/win/CS/HandBrakeWPF/Views/AudioView.xaml b/win/CS/HandBrakeWPF/Views/AudioView.xaml
index 28d17d776..99e0da02c 100644
--- a/win/CS/HandBrakeWPF/Views/AudioView.xaml
+++ b/win/CS/HandBrakeWPF/Views/AudioView.xaml
@@ -105,17 +105,30 @@
<ListBox Grid.Row="2"
Margin="10,10,10,10"
- Background="LightGray"
dd:DragDrop.DropHandler="{Binding}"
dd:DragDrop.IsDragSource="True"
dd:DragDrop.IsDropTarget="True"
ItemsSource="{Binding Task.AudioTracks}"
SelectionMode="Extended">
+ <ListBox.Style>
+ <Style TargetType="ListBox">
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding UseSystemColours}" Value="False">
+ <Setter Property="Background" Value="LightGray" />
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </ListBox.Style>
+
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
- <Setter Property="Background" Value="WhiteSmoke" />
<Setter Property="Margin" Value="0,0,0,1" />
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding UseSystemColours}" Value="False">
+ <Setter Property="Background" Value="WhiteSmoke" />
+ </DataTrigger>
+ </Style.Triggers>
</Style>
</ListBox.ItemContainerStyle>
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml
index efefca5cd..d5f211174 100644
--- a/win/CS/HandBrakeWPF/Views/MainView.xaml
+++ b/win/CS/HandBrakeWPF/Views/MainView.xaml
@@ -7,7 +7,6 @@
xmlns:Micro="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
xmlns:attachedProperties="clr-namespace:HandBrakeWPF.AttachedProperties"
AllowDrop="True"
- Background="#FFF0F0F0"
FontSize="11"
Micro:Message.Attach="[Event Loaded] = [Action Load]"
SnapsToDevicePixels="True"
@@ -22,8 +21,7 @@
</i:EventTrigger>
</i:Interaction.Triggers>
- <UserControl.Resources>
-
+ <UserControl.Resources>
<Style TargetType="Button">
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Padding" Value="5,1" />
@@ -46,9 +44,16 @@
<Style TargetType="ListBoxItem">
<Setter Property="Padding" Value="0,2,0,2" />
<Style.Triggers>
- <DataTrigger Binding="{Binding IsBuildIn}" Value="True">
+ <MultiDataTrigger>
+ <MultiDataTrigger.Conditions>
+ <Condition Binding="{Binding IsBuildIn}" Value="True" />
+ <Condition Binding="{Binding DataContext.UseSystemColours, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" Value="False" />
+ </MultiDataTrigger.Conditions>
<Setter Property="Foreground" Value="DarkBlue" />
- </DataTrigger>
+ </MultiDataTrigger>
+ <!--<DataTrigger Binding="{Binding IsBuildIn}" Value="True">
+ <Setter Property="Foreground" Value="DarkBlue" />
+ </DataTrigger>-->
<Trigger Property="IsSelected" Value="True">
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="Background" Value="Transparent"/>
@@ -554,9 +559,8 @@
VerticalAlignment="Stretch"
Header="Presets"
Margin="0,0,0,5"
- Background="White"
- Visibility="{Binding IsPresetPanelShowing, Converter={StaticResource boolToVisConverter}}"
- >
+ Visibility="{Binding IsPresetPanelShowing, Converter={StaticResource boolToVisConverter}}">
+
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml
index dcf9994c8..64d7389ad 100644
--- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml
+++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml
@@ -4,7 +4,7 @@
xmlns:Options="clr-namespace:HandBrakeWPF.Converters.Options"
xmlns:dd="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop"
xmlns:Converters="clr-namespace:HandBrakeWPF.Converters" xmlns:local="clr-namespace:HandBrakeWPF.Model"
- Background="White">
+ Style="{StaticResource whiteUserControlStyle}">
<UserControl.Resources>
<Style TargetType="Button">
@@ -133,6 +133,19 @@
</StackPanel>
</StackPanel>
+
+
+ <StackPanel Orientation="Vertical" Margin="0,0,0,20">
+
+ <TextBlock Text="User Interface" Grid.Column="0" FontSize="14" Margin="0,0,0,10"/>
+
+ <StackPanel Orientation="Vertical" Grid.Column="1" Margin="20,0,0,0">
+
+ <CheckBox Content="Always use System Colours (Requires Restart)"
+ ToolTip="Note: This option will always be on for systems with a High Contrast Theme selected." IsChecked="{Binding UseSystemColoursForStylesForStyles}" />
+
+ </StackPanel>
+ </StackPanel>
</StackPanel>
<StackPanel Name="Output" Orientation="Vertical" Margin="10,10,0,0"
diff --git a/win/CS/HandBrakeWPF/Views/ShellView.xaml b/win/CS/HandBrakeWPF/Views/ShellView.xaml
index d719b16fd..ae8d26747 100644
--- a/win/CS/HandBrakeWPF/Views/ShellView.xaml
+++ b/win/CS/HandBrakeWPF/Views/ShellView.xaml
@@ -2,17 +2,18 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Data="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
- xmlns:Converters="clr-namespace:HandBrakeWPF.Converters" Title="{Data:Binding Path=WindowTitle}"
+ xmlns:Converters="clr-namespace:HandBrakeWPF.Converters"
+ Title="{Data:Binding Path=WindowTitle}"
Width="1015"
Height="670"
MinWidth="750"
MinHeight="670"
AllowDrop="True"
- Background="#FFF0F0F0"
SnapsToDevicePixels="True"
UseLayoutRounding="True"
WindowStartupLocation="CenterScreen"
TextOptions.TextFormattingMode="Display"
+ Style="{StaticResource mainWindowStyle}"
>
<Window.Resources>
<Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
diff --git a/win/CS/HandBrakeWPF/Views/Styles/Styles.xaml b/win/CS/HandBrakeWPF/Views/Styles/Styles.xaml
index 88624c5df..1fd0b7e94 100644
--- a/win/CS/HandBrakeWPF/Views/Styles/Styles.xaml
+++ b/win/CS/HandBrakeWPF/Views/Styles/Styles.xaml
@@ -1,12 +1,37 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+ <Style x:Key="mainWindowStyle" TargetType="Window">
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding UseSystemColours}" Value="False">
+ <Setter Property="Background" Value="#FFF0F0F0" />
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+
+ <Style x:Key="whiteUserControlStyle" TargetType="UserControl">
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding UseSystemColours}" Value="False">
+ <Setter Property="Background" Value="White" />
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+
<Style x:Key="{x:Type StatusBar}" TargetType="{x:Type StatusBar}">
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type StatusBar}">
- <Border Background="#FAFAFA" Padding="1">
+ <Border Padding="1">
+ <Border.Style>
+ <Style TargetType="Border">
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding UseSystemColours}" Value="False">
+ <Setter Property="Background" Value="#FAFAFA" />
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Border.Style>
<ItemsPresenter Margin="0" />
</Border>
</ControlTemplate>
@@ -14,6 +39,14 @@
</Setter>
</Style>
+ <Style TargetType="{x:Type GroupBox}">
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding UseSystemColours}" Value="False">
+ <Setter Property="Background" Value="White" />
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+
<Style TargetType="{x:Type ComboBox}">
<Setter Property="MinHeight" Value="22"/>
<Setter Property="Margin" Value="0,2,0,2" />
diff --git a/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml
index 2eeb5dfdf..2d6dc502a 100644
--- a/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml
+++ b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml
@@ -54,17 +54,30 @@
<ListBox Grid.Row="2"
Margin="10,10,10,10"
- Background="LightGray"
dd:DragDrop.DropHandler="{Binding}"
dd:DragDrop.IsDragSource="True"
dd:DragDrop.IsDropTarget="True"
ItemsSource="{Binding Task.SubtitleTracks}"
SelectionMode="Extended">
+ <ListBox.Style>
+ <Style TargetType="ListBox">
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding UseSystemColours}" Value="False">
+ <Setter Property="Background" Value="LightGray" />
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </ListBox.Style>
+
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
- <Setter Property="Background" Value="WhiteSmoke" />
<Setter Property="Margin" Value="0,0,0,1" />
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding UseSystemColours}" Value="False">
+ <Setter Property="Background" Value="WhiteSmoke" />
+ </DataTrigger>
+ </Style.Triggers>
</Style>
</ListBox.ItemContainerStyle>