diff options
author | sr55 <[email protected]> | 2015-05-03 17:11:39 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2015-05-03 17:11:39 +0000 |
commit | 6689ba81c2919ef34d85da357d4b56b90507824b (patch) | |
tree | f0398562066e432fe2c4ccc1ec090888259121b1 /win/CS | |
parent | 6d3692a9b72039a8d7390fe831a1a61ee4611cd5 (diff) |
WinGui:
Bug Fixes:
- Fix binding error on the audio tab.
- Fix the X of X Pass count event args.
UI Tweaks:
- System colours is now default.
- Removed the word "Source" from the Audio and Subtitles lists to make a bit more space for the track name.
- Right Aligned the configure default buttons on the audio and subtitle tabs.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7150 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS')
8 files changed, 75 insertions, 56 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/EventArgs/EncodeProgressEventArgs.cs b/win/CS/HandBrake.ApplicationServices/Interop/EventArgs/EncodeProgressEventArgs.cs index 4e8d15b06..bbb9a6d07 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/EventArgs/EncodeProgressEventArgs.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/EventArgs/EncodeProgressEventArgs.cs @@ -40,5 +40,10 @@ namespace HandBrake.ApplicationServices.Interop.EventArgs /// Gets or sets the current encoding pass. (-1: subtitle scan, 1: first pass, 2: second pass)
/// </summary>
public int Pass { get; set; }
+
+ /// <summary>
+ /// Gets or sets the pass count.
+ /// </summary>
+ public int PassCount { get; set; }
}
}
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs index a97185e19..9e89190cd 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs @@ -521,7 +521,8 @@ namespace HandBrake.ApplicationServices.Interop CurrentFrameRate = state.Working.Rate,
AverageFrameRate = state.Working.RateAvg,
EstimatedTimeLeft = new TimeSpan(state.Working.Hours, state.Working.Minutes, state.Working.Seconds),
- Pass = 1, // TODO
+ Pass = state.Working.Pass,
+ PassCount = state.Working.PassCount
};
this.EncodeProgress(this, progressEventArgs);
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/Json/State/Working.cs b/win/CS/HandBrake.ApplicationServices/Interop/Json/State/Working.cs index 9aaebf690..dfc301b10 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/Json/State/Working.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/Json/State/Working.cs @@ -22,12 +22,12 @@ namespace HandBrake.ApplicationServices.Interop.Json.State /// <summary>
/// Gets or sets the job.
/// </summary>
- public int Job { get; set; }
+ public int Pass { get; set; }
/// <summary>
/// Gets or sets the job count.
/// </summary>
- public int JobCount { get; set; }
+ public int PassCount { get; set; }
/// <summary>
/// Gets or sets the minutes.
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs index 8aac4fcf0..a0718262d 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs @@ -219,6 +219,7 @@ namespace HandBrake.ApplicationServices.Services.Encode EstimatedTimeLeft = e.EstimatedTimeLeft,
PercentComplete = e.FractionComplete * 100,
Task = e.Pass,
+ TaskCount = e.PassCount,
ElapsedTime = DateTime.Now - this.startTime,
};
diff --git a/win/CS/HandBrakeWPF/Views/AudioView.xaml b/win/CS/HandBrakeWPF/Views/AudioView.xaml index ce9ebd1e0..5dee3ee2d 100644 --- a/win/CS/HandBrakeWPF/Views/AudioView.xaml +++ b/win/CS/HandBrakeWPF/Views/AudioView.xaml @@ -57,13 +57,20 @@ <Grid Grid.Row="1" Margin="10,5,10,0" Grid.Column="0"
Visibility="{Binding ShowAudioDefaultsPanel, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}">
<Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
- <ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
- <StackPanel Orientation="Horizontal" Grid.Row="0">
- <splitButton:SplitMenuButton Content="Add Track" cal:Message.Attach="[Event Click] = [Action Add]" FontWeight="Bold" Margin="0,0,10,0">
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+
+
+ <splitButton:SplitMenuButton Content="Add Track" cal:Message.Attach="[Event Click] = [Action Add]" FontWeight="Bold" Margin="0,0,10,0" Grid.Column="0">
<splitButton:SplitMenuButton.ItemSource>
<MenuItem Header="Add New Track" cal:Message.Attach="[Event Click] = [Action Add]" />
<MenuItem Header="Add All Remaining Tracks" cal:Message.Attach="[Event Click] = [Action AddAllRemaining]" />
@@ -71,23 +78,22 @@ </splitButton:SplitMenuButton.ItemSource>
</splitButton:SplitMenuButton>
- <Button MinWidth="65"
+ <Button MinWidth="65" Grid.Column="1"
Margin="0,0,10,0"
cal:Message.Attach="[Event Click] = [Action Clear]"
Content="Clear" />
-
- <Button MinWidth="65"
+
+ <Button MinWidth="65" Grid.Column="3"
Margin="0,0,10,0"
cal:Message.Attach="[Event Click] = [Action ShowAudioDefaults]"
Content="{Binding SwitchDisplayTitle}" />
- <Button MinWidth="65"
- Margin="0,0,10,0"
+ <Button MinWidth="65" Grid.Column="4"
cal:Message.Attach="[Event Click] = [Action ReloadDefaults]"
Content="Reload Defaults" />
- </StackPanel>
+ </Grid>
</Grid>
<!-- Row 2 -->
@@ -176,8 +182,7 @@ </Grid.RowDefinitions>
<!-- Row 1 -->
- <TextBlock Grid.Column="0" VerticalAlignment="Center" FontWeight="Bold" Text="Source" />
- <ComboBox Grid.Column="1" Height="22" Width="100" Margin="5,0,5,0" HorizontalAlignment="Stretch"
+ <ComboBox Grid.Column="1" Height="22" Width="135" Margin="5,0,5,0" HorizontalAlignment="Stretch"
ItemsSource="{Binding DataContext.SourceTracks, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
SelectedItem="{Binding ScannedTrack}" />
@@ -282,7 +287,7 @@ </ListBox>
<StackPanel Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Margin="10,0,10,0"
- Visibility="{Binding ShowAudioDefaultsPanel, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}">
+ Visibility="{Binding ShowAudioDefaultsPanel, Converter={StaticResource boolToVisConverter}, ConverterParameter=false, FallbackValue=Collapsed}">
<Grid Margin="5,0,0,0" >
<Grid.RowDefinitions>
diff --git a/win/CS/HandBrakeWPF/Views/MainView.xaml b/win/CS/HandBrakeWPF/Views/MainView.xaml index 69505a83f..9eae091a8 100644 --- a/win/CS/HandBrakeWPF/Views/MainView.xaml +++ b/win/CS/HandBrakeWPF/Views/MainView.xaml @@ -36,32 +36,6 @@ </CollectionViewSource.GroupDescriptions>
</CollectionViewSource>
- <Style TargetType="ListBoxItem">
- <Setter Property="Padding" Value="0,2,0,2" />
- <Style.Triggers>
- <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" />
- </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"/>
- </Trigger>
- <DataTrigger Binding="{Binding IsDefault}" Value="True" >
- <Setter Property="FontStyle" Value="Italic" />
- </DataTrigger>
- <DataTrigger Binding="{Binding IsDefault}" Value="False" >
- <Setter Property="FontStyle" Value="Normal" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
-
<Style x:Key="ContainerStyle" TargetType="{x:Type GroupItem}">
<Setter Property="Template">
<Setter.Value>
@@ -554,7 +528,35 @@ SelectedItem="{Binding SelectedPreset, Mode=TwoWay}" BorderThickness="0,0,0,1"
BorderBrush="LightGray"
>
+ <ListBox.Resources>
+ <Style TargetType="ListBoxItem">
+ <Setter Property="Padding" Value="0,2,0,2" />
+ <Style.Triggers>
+ <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" />
+ </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"/>
+ </Trigger>
+ <DataTrigger Binding="{Binding IsDefault}" Value="True" >
+ <Setter Property="FontStyle" Value="Italic" />
+ </DataTrigger>
+ <DataTrigger Binding="{Binding IsDefault}" Value="False" >
+ <Setter Property="FontStyle" Value="Normal" />
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </ListBox.Resources>
+
<i:Interaction.Triggers>
<commands:InputBindingTrigger>
<commands:InputBindingTrigger.InputBinding>
diff --git a/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml index cccbaf790..77f4fc2d6 100644 --- a/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml +++ b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml @@ -57,9 +57,19 @@ />
<!-- Row 1 -->
- <StackPanel Grid.Row="1" Margin="10,5,10,0" Orientation="Horizontal"
+ <Grid Grid.Row="1" Margin="10,5,10,0"
Visibility="{Binding ShowDefaultsPanel, Converter={StaticResource booleanToVisConverter}, ConverterParameter=true}" >
- <splitButton:SplitMenuButton Content="Add Track" cal:Message.Attach="[Event Click] = [Action Add]" FontWeight="Bold" Margin="0,0,10,0">
+
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="Auto" />
+ </Grid.ColumnDefinitions>
+
+ <splitButton:SplitMenuButton Content="Add Track" cal:Message.Attach="[Event Click] = [Action Add]" FontWeight="Bold" Margin="0,0,10,0" Grid.Column="0">
<splitButton:SplitMenuButton.ItemSource>
<MenuItem Header="Add New Track" cal:Message.Attach="[Event Click] = [Action Add]" />
<MenuItem Header="Add All Remaining Tracks" cal:Message.Attach="[Event Click] = [Action AddAllRemaining]" />
@@ -68,27 +78,24 @@ </splitButton:SplitMenuButton.ItemSource>
</splitButton:SplitMenuButton>
- <Button MinWidth="75"
+ <Button MinWidth="75" Grid.Column="1"
cal:Message.Attach="[Event Click] = [Action Import]"
Content="Import SRT"
Margin="0,0,10,0"/>
- <Button MinWidth="65"
+ <Button MinWidth="65" Grid.Column="2"
Margin="0,0,10,0"
cal:Message.Attach="[Event Click] = [Action Clear]"
Content="Clear" />
- <Button MinWidth="65"
+ <Button MinWidth="65" Grid.Column="4"
Margin="0,0,10,0"
cal:Message.Attach="[Event Click] = [Action ShowSubtitleDefaultsPanel]"
Content="{Binding SwitchDisplayTitle}" />
- <Button MinWidth="65"
- Margin="0,0,10,0"
+ <Button MinWidth="65" Grid.Column="5"
cal:Message.Attach="[Event Click] = [Action ReloadDefaults]"
Content="Reload Defaults" />
-
-
- </StackPanel>
+ </Grid>
<!-- Row 2 -->
@@ -173,9 +180,7 @@ <RowDefinition Height="Auto" />
</Grid.RowDefinitions>
-
- <TextBlock Grid.Column="0" VerticalAlignment="Center" FontWeight="Bold" Text="Source" />
- <ComboBox Grid.Column="1" Height="22" Width="200" Margin="5,0,5,0" HorizontalAlignment="Stretch"
+ <ComboBox Grid.Column="1" Height="22" Width="235" Margin="5,0,5,0" HorizontalAlignment="Stretch"
ItemsSource="{Binding DataContext.SourceTracks, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
SelectedItem="{Binding SourceTrack}" />
diff --git a/win/CS/HandBrakeWPF/defaultsettings.xml b/win/CS/HandBrakeWPF/defaultsettings.xml index 10424ed87..5c677bcef 100644 --- a/win/CS/HandBrakeWPF/defaultsettings.xml +++ b/win/CS/HandBrakeWPF/defaultsettings.xml @@ -421,7 +421,7 @@ <string>UseSystemColours</string>
</key>
<value>
- <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">false</anyType>
+ <anyType xmlns:q1="http://www.w3.org/2001/XMLSchema" d4p1:type="q1:boolean" xmlns:d4p1="http://www.w3.org/2001/XMLSchema-instance">true</anyType>
</value>
</item>
|