diff options
author | sr55 <[email protected]> | 2021-02-14 14:55:34 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2021-02-14 14:55:34 +0000 |
commit | bc74648ccab7f8fd78e27d004fef244e4d9182a6 (patch) | |
tree | a9000e92db3a4adb22576037af08a41afb603cfb /win/CS/HandBrakeWPF | |
parent | 678b423b632a842763b7ca10d6eee03efc898674 (diff) |
WinGui: Minor UI/UX tweaks.
- Tab Section titles removed from single purpose tabs (Chapters, Subtitle, Audio, Filters). Was unnecessary and frees up some space.
- A number of labels updated for consistency with the mac UI
- Added "Open preview" button to the Dimensions tab.
- Added "Source Preview" label to the Summary tab to try avoid confusion as to what this is for.
- Better job status display (HB Error codes with text description) on queue summary.
Diffstat (limited to 'win/CS/HandBrakeWPF')
-rw-r--r-- | win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs | 6 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Properties/Resources.Designer.cs | 121 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Properties/Resources.resx | 55 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Services/Queue/ActiveJob.cs | 2 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Services/Queue/Model/QueueProgressStatus.cs | 123 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Services/Queue/Model/QueueTask.cs | 15 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs | 27 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs | 48 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/AudioView.xaml | 16 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/ChaptersView.xaml | 9 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/FiltersView.xaml | 5 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml | 40 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/QueueView.xaml | 48 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/SubtitlesView.xaml | 14 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/SummaryView.xaml | 11 |
15 files changed, 350 insertions, 190 deletions
diff --git a/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs b/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs index 6df7ea48c..0152b9a17 100644 --- a/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs @@ -14,15 +14,13 @@ namespace HandBrakeWPF.Converters using System.Globalization;
using System.Windows.Data;
- using HandBrake.Interop.Interop.Interfaces.Model.Picture;
-
using HandBrakeWPF.Model.Filters;
using HandBrakeWPF.Model.Options;
using HandBrakeWPF.Model.Video;
using HandBrakeWPF.Services.Queue.Model;
using HandBrakeWPF.Utilities;
- using OutputFormat = HandBrakeWPF.Services.Encode.Model.Models.OutputFormat;
- using VideoEncoder = HandBrakeWPF.Model.Video.VideoEncoder;
+ using OutputFormat = Services.Encode.Model.Models.OutputFormat;
+ using VideoEncoder = Model.Video.VideoEncoder;
/// <summary>
/// Enum Combo Converter
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs index 312331ae7..e902f2796 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs +++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs @@ -998,7 +998,7 @@ namespace HandBrakeWPF.Properties { } /// <summary> - /// Looks up a localized string similar to Deblock. + /// Looks up a localized string similar to Deblock:. /// </summary> public static string FiltersView_Deblock { get { @@ -1133,7 +1133,7 @@ namespace HandBrakeWPF.Properties { } /// <summary> - /// Looks up a localized string similar to Sharpen. + /// Looks up a localized string similar to Sharpen:. /// </summary> public static string FiltersView_Sharpen { get { @@ -4251,7 +4251,7 @@ namespace HandBrakeWPF.Properties { } /// <summary> - /// Looks up a localized string similar to Output. + /// Looks up a localized string similar to Output:. /// </summary> public static string PictureSettingsView_Output { get { @@ -4287,7 +4287,7 @@ namespace HandBrakeWPF.Properties { } /// <summary> - /// Looks up a localized string similar to Resolution and Scaling. + /// Looks up a localized string similar to Resolution and Scaling:. /// </summary> public static string PictureSettingsView_ResAndScaling { get { @@ -4314,7 +4314,7 @@ namespace HandBrakeWPF.Properties { } /// <summary> - /// Looks up a localized string similar to Rotate and Crop. + /// Looks up a localized string similar to Rotate and Crop:. /// </summary> public static string PictureSettingsView_RotateAndCrop { get { @@ -4323,6 +4323,15 @@ namespace HandBrakeWPF.Properties { } /// <summary> + /// Looks up a localized string similar to Open Preview. + /// </summary> + public static string PictureSettingsView_SeePreview { + get { + return ResourceManager.GetString("PictureSettingsView_SeePreview", resourceCulture); + } + } + + /// <summary> /// Looks up a localized string similar to Size. /// </summary> public static string PictureSettingsView_Size { @@ -4898,7 +4907,7 @@ namespace HandBrakeWPF.Properties { } /// <summary> - /// Looks up a localized string similar to Advanced:. + /// Looks up a localized string similar to Video Options:. /// </summary> public static string QueueView_Advanced { get { @@ -5069,6 +5078,87 @@ namespace HandBrakeWPF.Properties { } /// <summary> + /// Looks up a localized string similar to Job Status:. + /// </summary> + public static string QueueView_JobStatus { + get { + return ResourceManager.GetString("QueueView_JobStatus", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Cancelled. + /// </summary> + public static string QueueView_JobStatus_Cancelled { + get { + return ResourceManager.GetString("QueueView_JobStatus_Cancelled", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Complete. + /// </summary> + public static string QueueView_JobStatus_Complete { + get { + return ResourceManager.GetString("QueueView_JobStatus_Complete", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Invalid Settings. Check log for details.. + /// </summary> + public static string QueueView_JobStatus_InitFailed { + get { + return ResourceManager.GetString("QueueView_JobStatus_InitFailed", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Invalid Input. Check log for details.. + /// </summary> + public static string QueueView_JobStatus_InvalidInput { + get { + return ResourceManager.GetString("QueueView_JobStatus_InvalidInput", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Status Unknown. Check log for details.. + /// </summary> + public static string QueueView_JobStatus_NoErrorCode { + get { + return ResourceManager.GetString("QueueView_JobStatus_NoErrorCode", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Errors detected whist trying to read source.. + /// </summary> + public static string QueueView_JobStatus_ReadError { + get { + return ResourceManager.GetString("QueueView_JobStatus_ReadError", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Unknown failure. Check log for details.. + /// </summary> + public static string QueueView_JobStatus_Unknown { + get { + return ResourceManager.GetString("QueueView_JobStatus_Unknown", resourceCulture); + } + } + + /// <summary> + /// Looks up a localized string similar to Worker Crashed. Check log for details.. + /// </summary> + public static string QueueView_JobStatus_WorkerCrash { + get { + return ResourceManager.GetString("QueueView_JobStatus_WorkerCrash", resourceCulture); + } + } + + /// <summary> /// Looks up a localized string similar to The log will be available after the encode completes.. /// </summary> public static string QueueView_LogNotAvailableYet { @@ -5484,7 +5574,7 @@ namespace HandBrakeWPF.Properties { } /// <summary> - /// Looks up a localized string similar to Add Track. + /// Looks up a localized string similar to Tracks. /// </summary> public static string Shared_AddTrack { get { @@ -6293,6 +6383,15 @@ namespace HandBrakeWPF.Properties { } /// <summary> + /// Looks up a localized string similar to Source Preview:. + /// </summary> + public static string SummaryView_SourcePreview { + get { + return ResourceManager.GetString("SummaryView_SourcePreview", resourceCulture); + } + } + + /// <summary> /// Looks up a localized string similar to storage. /// </summary> public static string SummaryView_storage { @@ -6536,7 +6635,7 @@ namespace HandBrakeWPF.Properties { } /// <summary> - /// Looks up a localized string similar to Video Codec:. + /// Looks up a localized string similar to Video Encoder:. /// </summary> public static string VideoView_Codec { get { @@ -6626,7 +6725,7 @@ namespace HandBrakeWPF.Properties { } /// <summary> - /// Looks up a localized string similar to Optimise Video:. + /// Looks up a localized string similar to Encoder Options: . /// </summary> public static string VideoView_OptimiseVideo { get { @@ -6644,7 +6743,7 @@ namespace HandBrakeWPF.Properties { } /// <summary> - /// Looks up a localized string similar to Quality. + /// Looks up a localized string similar to Quality: . /// </summary> public static string VideoView_Quality { get { @@ -6671,7 +6770,7 @@ namespace HandBrakeWPF.Properties { } /// <summary> - /// Looks up a localized string similar to Video. + /// Looks up a localized string similar to Video: . /// </summary> public static string VideoView_Video { get { diff --git a/win/CS/HandBrakeWPF/Properties/Resources.resx b/win/CS/HandBrakeWPF/Properties/Resources.resx index 3b8f1877a..918b94e07 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.resx +++ b/win/CS/HandBrakeWPF/Properties/Resources.resx @@ -852,7 +852,7 @@ Would you like to overwrite it?</value> <value>Custom:</value>
</data>
<data name="FiltersView_Deblock" xml:space="preserve">
- <value>Deblock</value>
+ <value>Deblock:</value>
</data>
<data name="FiltersView_Decomb" xml:space="preserve">
<value>Decomb</value>
@@ -897,7 +897,7 @@ Would you like to overwrite it?</value> <value>Rotate:</value>
</data>
<data name="FiltersView_Sharpen" xml:space="preserve">
- <value>Sharpen</value>
+ <value>Sharpen:</value>
</data>
<data name="FiltersView_SharpenPresetAuto" xml:space="preserve">
<value>Sharpen Preset</value>
@@ -1339,7 +1339,7 @@ VLC and MPC-HC are supported. Other players may also work but are not validated. <value>Modulus:</value>
</data>
<data name="PictureSettingsView_Output" xml:space="preserve">
- <value>Output</value>
+ <value>Output:</value>
</data>
<data name="PictureSettingsView_PAR" xml:space="preserve">
<value>PAR:</value>
@@ -1381,7 +1381,7 @@ VLC and MPC-HC are supported. Other players may also work but are not validated. <value>The selected titles will be added using the "{0}" preset.</value>
</data>
<data name="QueueView_Advanced" xml:space="preserve">
- <value>Advanced:</value>
+ <value>Video Options:</value>
</data>
<data name="QueueView_Audio" xml:space="preserve">
<value>Audio:</value>
@@ -1510,7 +1510,7 @@ VLC and MPC-HC are supported. Other players may also work but are not validated. <value>Add New Track</value>
</data>
<data name="Shared_AddTrack" xml:space="preserve">
- <value>Add Track</value>
+ <value>Tracks</value>
</data>
<data name="Shared_AvailableLanguages" xml:space="preserve">
<value>Available Languages:</value>
@@ -1657,7 +1657,7 @@ VLC and MPC-HC are supported. Other players may also work but are not validated. <value>Avg Bitrate (kbps):</value>
</data>
<data name="VideoView_Codec" xml:space="preserve">
- <value>Video Codec:</value>
+ <value>Video Encoder:</value>
</data>
<data name="VideoView_ConstantFramerate" xml:space="preserve">
<value>Constant Framerate</value>
@@ -1687,13 +1687,13 @@ VLC and MPC-HC are supported. Other players may also work but are not validated. <value>Framerate (FPS):</value>
</data>
<data name="VideoView_OptimiseVideo" xml:space="preserve">
- <value>Optimise Video:</value>
+ <value>Encoder Options: </value>
</data>
<data name="VideoView_PeakFramerate" xml:space="preserve">
<value>Peak Framerate</value>
</data>
<data name="VideoView_Quality" xml:space="preserve">
- <value>Quality</value>
+ <value>Quality: </value>
</data>
<data name="VideoView_TurboFirstPass" xml:space="preserve">
<value>Turbo first pass</value>
@@ -1702,7 +1702,7 @@ VLC and MPC-HC are supported. Other players may also work but are not validated. <value>Variable Framerate</value>
</data>
<data name="VideoView_Video" xml:space="preserve">
- <value>Video</value>
+ <value>Video: </value>
</data>
<data name="OptionsView_Language" xml:space="preserve">
<value>Language:</value>
@@ -2255,10 +2255,10 @@ Please choose a different preset.</value> <value>Borders</value>
</data>
<data name="PictureSettingsView_ResAndScaling" xml:space="preserve">
- <value>Resolution and Scaling</value>
+ <value>Resolution and Scaling:</value>
</data>
<data name="PictureSettingsView_RotateAndCrop" xml:space="preserve">
- <value>Rotate and Crop</value>
+ <value>Rotate and Crop:</value>
</data>
<data name="OptionsView_Win10Only" xml:space="preserve">
<value>( Windows 10 Only! )</value>
@@ -2421,4 +2421,37 @@ Fields are limited to: <data name="SummaryView_Colourspace" xml:space="preserve">
<value>Colourspace</value>
</data>
+ <data name="PictureSettingsView_SeePreview" xml:space="preserve">
+ <value>Open Preview</value>
+ </data>
+ <data name="SummaryView_SourcePreview" xml:space="preserve">
+ <value>Source Preview:</value>
+ </data>
+ <data name="QueueView_JobStatus" xml:space="preserve">
+ <value>Job Status:</value>
+ </data>
+ <data name="QueueView_JobStatus_Cancelled" xml:space="preserve">
+ <value>Cancelled</value>
+ </data>
+ <data name="QueueView_JobStatus_Complete" xml:space="preserve">
+ <value>Complete</value>
+ </data>
+ <data name="QueueView_JobStatus_InitFailed" xml:space="preserve">
+ <value>Invalid Settings. Check log for details.</value>
+ </data>
+ <data name="QueueView_JobStatus_InvalidInput" xml:space="preserve">
+ <value>Invalid Input. Check log for details.</value>
+ </data>
+ <data name="QueueView_JobStatus_NoErrorCode" xml:space="preserve">
+ <value>Status Unknown. Check log for details.</value>
+ </data>
+ <data name="QueueView_JobStatus_ReadError" xml:space="preserve">
+ <value>Errors detected whist trying to read source.</value>
+ </data>
+ <data name="QueueView_JobStatus_Unknown" xml:space="preserve">
+ <value>Unknown failure. Check log for details.</value>
+ </data>
+ <data name="QueueView_JobStatus_WorkerCrash" xml:space="preserve">
+ <value>Worker Crashed. Check log for details.</value>
+ </data>
</root>
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/Services/Queue/ActiveJob.cs b/win/CS/HandBrakeWPF/Services/Queue/ActiveJob.cs index 3658a4120..8d79a8a0c 100644 --- a/win/CS/HandBrakeWPF/Services/Queue/ActiveJob.cs +++ b/win/CS/HandBrakeWPF/Services/Queue/ActiveJob.cs @@ -102,10 +102,12 @@ namespace HandBrakeWPF.Services.Queue this.IsPaused = false; this.job.Status = !e.Successful ? QueueItemStatus.Error : QueueItemStatus.Completed; + this.job?.JobProgress.Update(e); this.job.Statistics.EndTime = DateTime.Now; this.job.Statistics.CompletedActivityLogPath = e.ActivityLogPath; this.job.Statistics.FinalFileSize = e.FinalFilesizeInBytes; + this.job.JobProgress.ClearStatusDisplay(); this.encodeService.EncodeStatusChanged -= this.EncodeStatusChanged; diff --git a/win/CS/HandBrakeWPF/Services/Queue/Model/QueueProgressStatus.cs b/win/CS/HandBrakeWPF/Services/Queue/Model/QueueProgressStatus.cs index 5ed36d5b9..e3dbba559 100644 --- a/win/CS/HandBrakeWPF/Services/Queue/Model/QueueProgressStatus.cs +++ b/win/CS/HandBrakeWPF/Services/Queue/Model/QueueProgressStatus.cs @@ -18,6 +18,8 @@ namespace HandBrakeWPF.Services.Queue.Model public class QueueProgressStatus : PropertyChangedBase { + private readonly object lockObj = new object(); + private string jobStatus; private bool intermediateProgress; private double progressValue; @@ -26,6 +28,7 @@ namespace HandBrakeWPF.Services.Queue.Model public QueueProgressStatus() { + this.JobStatus = "Waiting"; } public string JobStatus @@ -47,7 +50,11 @@ namespace HandBrakeWPF.Services.Queue.Model get => this.intermediateProgress; set { - if (value == this.intermediateProgress) return; + if (value == this.intermediateProgress) + { + return; + } + this.intermediateProgress = value; this.NotifyOfPropertyChange(() => this.IntermediateProgress); } @@ -58,7 +65,11 @@ namespace HandBrakeWPF.Services.Queue.Model get => this.progressValue; set { - if (value == this.progressValue) return; + if (value == this.progressValue) + { + return; + } + this.progressValue = value; this.NotifyOfPropertyChange(() => this.ProgressValue); } @@ -72,50 +83,91 @@ namespace HandBrakeWPF.Services.Queue.Model public void Update(EncodeProgressEventArgs e) { - progressEventArgs = e; - this.IntermediateProgress = false; + lock (lockObj) + { + progressEventArgs = e; + this.IntermediateProgress = false; - string totalHrsLeft = e.EstimatedTimeLeft.Days >= 1 ? string.Format(@"{0:d\:hh\:mm\:ss}", e.EstimatedTimeLeft) : string.Format(@"{0:hh\:mm\:ss}", e.EstimatedTimeLeft); - string elapsedTimeHrs = e.ElapsedTime.Days >= 1 ? string.Format(@"{0:d\:hh\:mm\:ss}", e.ElapsedTime) : string.Format(@"{0:hh\:mm\:ss}", e.ElapsedTime); + string totalHrsLeft = e.EstimatedTimeLeft.Days >= 1 ? string.Format(@"{0:d\:hh\:mm\:ss}", e.EstimatedTimeLeft) : string.Format(@"{0:hh\:mm\:ss}", e.EstimatedTimeLeft); + string elapsedTimeHrs = e.ElapsedTime.Days >= 1 ? string.Format(@"{0:d\:hh\:mm\:ss}", e.ElapsedTime) : string.Format(@"{0:hh\:mm\:ss}", e.ElapsedTime); - if (e.IsSubtitleScan) - { - this.JobStatus = string.Format(Resources.MainViewModel_EncodeStatusChanged_SubScan_StatusLabel, - e.Task, - e.TaskCount, - e.PercentComplete, - totalHrsLeft, - elapsedTimeHrs, - null); - - this.ProgressValue = e.PercentComplete; - } - else if (e.IsMuxing) - { - this.JobStatus = Resources.MainView_Muxing; - this.IntermediateProgress = true; - } - else if (e.IsSearching) - { - this.JobStatus = string.Format(Resources.MainView_ProgressStatusWithTask, Resources.MainView_Searching, e.PercentComplete, e.EstimatedTimeLeft, null); - this.ProgressValue = e.PercentComplete; - } - else - { - this.JobStatus = - string.Format(Resources.QueueViewModel_EncodeStatusChanged_StatusLabel, + if (e.IsSubtitleScan) + { + this.JobStatus = string.Format(Resources.MainViewModel_EncodeStatusChanged_SubScan_StatusLabel, e.Task, e.TaskCount, e.PercentComplete, - e.CurrentFrameRate, - e.AverageFrameRate, totalHrsLeft, elapsedTimeHrs, null); - this.ProgressValue = e.PercentComplete; + + this.ProgressValue = e.PercentComplete; + } + else if (e.IsMuxing) + { + this.JobStatus = Resources.MainView_Muxing; + this.IntermediateProgress = true; + } + else if (e.IsSearching) + { + this.JobStatus = string.Format(Resources.MainView_ProgressStatusWithTask, Resources.MainView_Searching, e.PercentComplete, e.EstimatedTimeLeft, null); + this.ProgressValue = e.PercentComplete; + } + else + { + this.JobStatus = + string.Format(Resources.QueueViewModel_EncodeStatusChanged_StatusLabel, + e.Task, + e.TaskCount, + e.PercentComplete, + e.CurrentFrameRate, + e.AverageFrameRate, + totalHrsLeft, + elapsedTimeHrs, + null); + this.ProgressValue = e.PercentComplete; + } } } + public void Update(EncodeCompletedEventArgs e) + { + lock (lockObj) + { + if (e.Successful) + { + this.JobStatus = Resources.QueueView_JobStatus_Complete; + } + else + { + switch (e.ErrorInformation) + { + case "1": // HB_ERROR_CANCELED + this.JobStatus = Resources.QueueView_JobStatus_Cancelled; + break; + case "2": // HB_ERROR_WRONG_INPUT + this.JobStatus = Resources.QueueView_JobStatus_InvalidInput; + break; + case "3": // HB_ERROR_INIT + this.JobStatus = Resources.QueueView_JobStatus_InitFailed; + break; + case "4": // HB_ERROR_UNKNOWN + this.JobStatus = Resources.QueueView_JobStatus_Unknown; + break; + case "5": // HB_ERROR_READ + this.JobStatus = Resources.QueueView_JobStatus_ReadError; + break; + case "-11": // Worker Crash + this.JobStatus = Resources.QueueView_JobStatus_WorkerCrash; + break; + default: + this.JobStatus = Resources.QueueView_JobStatus_NoErrorCode; + break; + } + } + } + } + public void SetPaused() { this.ClearStatusDisplay(); @@ -124,7 +176,6 @@ namespace HandBrakeWPF.Services.Queue.Model public void ClearStatusDisplay() { - this.JobStatus = string.Empty; this.ProgressValue = 0; this.IntermediateProgress = false; } diff --git a/win/CS/HandBrakeWPF/Services/Queue/Model/QueueTask.cs b/win/CS/HandBrakeWPF/Services/Queue/Model/QueueTask.cs index 0ed2a33a9..ee98535fd 100644 --- a/win/CS/HandBrakeWPF/Services/Queue/Model/QueueTask.cs +++ b/win/CS/HandBrakeWPF/Services/Queue/Model/QueueTask.cs @@ -19,7 +19,7 @@ namespace HandBrakeWPF.Services.Queue.Model using HandBrakeWPF.Services.Presets.Model;
using HandBrakeWPF.Utilities;
- using EncodeTask = HandBrakeWPF.Services.Encode.Model.EncodeTask;
+ using EncodeTask = Encode.Model.EncodeTask;
public class QueueTask : PropertyChangedBase
{
@@ -71,10 +71,7 @@ namespace HandBrakeWPF.Services.Queue.Model public QueueItemStatus Status
{
- get
- {
- return this.status;
- }
+ get => this.status;
set
{
@@ -98,13 +95,7 @@ namespace HandBrakeWPF.Services.Queue.Model public bool IsJobStatusVisible => this.Status == QueueItemStatus.InProgress;
[JsonIgnore]
- public string SelectedPresetKey
- {
- get
- {
- return this.presetKey;
- }
- }
+ public string SelectedPresetKey => this.presetKey;
[JsonIgnore]
public bool ShowEncodeProgress => this.Status == QueueItemStatus.InProgress && SystemInfo.IsWindows10();
diff --git a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs index 8ad8ab6cf..2d28fc9a5 100644 --- a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs @@ -13,6 +13,10 @@ namespace HandBrakeWPF.ViewModels using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
+ using System.Linq;
+ using System.Windows;
+
+ using Caliburn.Micro;
using HandBrake.Interop.Interop;
using HandBrake.Interop.Interop.Interfaces.Model.Picture;
@@ -25,12 +29,15 @@ namespace HandBrakeWPF.ViewModels using HandBrakeWPF.Utilities;
using HandBrakeWPF.ViewModelItems.Filters;
using HandBrakeWPF.ViewModels.Interfaces;
+ using HandBrakeWPF.Views;
using EncodeTask = Services.Encode.Model.EncodeTask;
using Size = Model.Picture.Size;
public class PictureSettingsViewModel : ViewModelBase, IPictureSettingsViewModel
{
+ private readonly IWindowManager windowManager;
+
private string displaySize;
private bool heightControlEnabled = true;
private bool showCustomAnamorphicControls;
@@ -48,8 +55,9 @@ namespace HandBrakeWPF.ViewModels private PictureSettingsResLimitModes selectedPictureSettingsResLimitMode;
- public PictureSettingsViewModel(IStaticPreviewViewModel staticPreviewViewModel)
+ public PictureSettingsViewModel(IStaticPreviewViewModel staticPreviewViewModel, IWindowManager windowManager)
{
+ this.windowManager = windowManager;
this.StaticPreviewViewModel = staticPreviewViewModel;
this.StaticPreviewViewModel.SetPictureSettingsInstance(this);
this.sourceResolution = new Size(0, 0);
@@ -660,7 +668,22 @@ namespace HandBrakeWPF.ViewModels return true;
}
- /* Protected and Private Methods */
+ /* Protected and Private Methods */
+
+ public void OpenPreviewWindow()
+ {
+ if (!string.IsNullOrEmpty(this.Task.Source) && !this.StaticPreviewViewModel.IsOpen)
+ {
+ this.StaticPreviewViewModel.IsOpen = true;
+ this.StaticPreviewViewModel.UpdatePreviewFrame(this.Task, this.scannedSource);
+ this.windowManager.ShowWindow(this.StaticPreviewViewModel);
+ }
+ else if (this.StaticPreviewViewModel.IsOpen)
+ {
+ Window window = Application.Current.Windows.Cast<Window>().FirstOrDefault(x => x.GetType() == typeof(StaticPreviewView));
+ window?.Focus();
+ }
+ }
protected virtual void OnTabStatusChanged(TabStatusEventArgs e)
{
diff --git a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs index 8292a6d43..549b23304 100644 --- a/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/QueueViewModel.cs @@ -60,14 +60,15 @@ namespace HandBrakeWPF.ViewModels public bool IsQueueRunning
{
- get
- {
- return this.isQueueRunning;
- }
+ get => this.isQueueRunning;
set
{
- if (value == this.isQueueRunning) return;
+ if (value == this.isQueueRunning)
+ {
+ return;
+ }
+
this.isQueueRunning = value;
this.NotifyOfPropertyChange(() => this.IsQueueRunning);
}
@@ -75,10 +76,7 @@ namespace HandBrakeWPF.ViewModels public string JobsPending
{
- get
- {
- return this.jobsPending;
- }
+ get => this.jobsPending;
set
{
@@ -89,10 +87,7 @@ namespace HandBrakeWPF.ViewModels public WhenDone WhenDoneAction
{
- get
- {
- return this.whenDoneAction;
- }
+ get => this.whenDoneAction;
set
{
@@ -101,26 +96,21 @@ namespace HandBrakeWPF.ViewModels }
}
- public ObservableCollection<QueueTask> QueueTasks
- {
- get
- {
- return this.queueProcessor.Queue;
- }
- }
+ public ObservableCollection<QueueTask> QueueTasks => this.queueProcessor.Queue;
public BindingList<QueueTask> SelectedItems { get; }
public QueueTask SelectedTask
{
- get
- {
- return this.selectedTask;
- }
+ get => this.selectedTask;
set
{
- if (Equals(value, this.selectedTask)) return;
+ if (Equals(value, this.selectedTask))
+ {
+ return;
+ }
+
this.selectedTask = value;
this.NotifyOfPropertyChange(() => this.SelectedTask);
this.HandleLogData();
@@ -135,13 +125,7 @@ namespace HandBrakeWPF.ViewModels }
}
- public bool JobInfoVisible
- {
- get
- {
- return SelectedItems.Count == 1;
- }
- }
+ public bool JobInfoVisible => SelectedItems.Count == 1;
public int SelectedTabIndex { get; set; }
diff --git a/win/CS/HandBrakeWPF/Views/AudioView.xaml b/win/CS/HandBrakeWPF/Views/AudioView.xaml index 6b3794dc8..d0e317073 100644 --- a/win/CS/HandBrakeWPF/Views/AudioView.xaml +++ b/win/CS/HandBrakeWPF/Views/AudioView.xaml @@ -29,8 +29,6 @@ <Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
@@ -39,16 +37,8 @@ <ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
-
<!-- Row 0 -->
- <TextBlock Grid.Row="0"
- Margin="10,5,0,0"
- FontSize="12" FontWeight="Bold"
- VerticalAlignment="Top"
- Text="{Binding PanelTitle}" />
-
- <!-- Row 1 -->
- <Grid Grid.Row="1" Margin="10,5,10,0" Grid.Column="0" >
+ <Grid Grid.Row="0" Margin="10,5,10,0" Grid.Column="0" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
@@ -104,8 +94,8 @@ </Grid>
</Grid>
- <!-- Row 2 -->
- <ListBox Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Stretch"
+ <!-- Row 1 -->
+ <ListBox Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Stretch"
Margin="10,10,10,10"
dd:DragDrop.DropHandler="{Binding}"
dd:DragDrop.IsDragSource="True"
diff --git a/win/CS/HandBrakeWPF/Views/ChaptersView.xaml b/win/CS/HandBrakeWPF/Views/ChaptersView.xaml index 7a14542a0..b18b15bd7 100644 --- a/win/CS/HandBrakeWPF/Views/ChaptersView.xaml +++ b/win/CS/HandBrakeWPF/Views/ChaptersView.xaml @@ -10,25 +10,22 @@ <Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
- <TextBlock Text="{x:Static Properties:Resources.ChaptersView_ChapterMarkers}" FontSize="12" FontWeight="Bold" Margin="10,5,0,0" Grid.Row="0" ></TextBlock>
-
- <Grid Grid.Row="1" Margin="10,5,10,0">
+ <Grid Grid.Row="0" Margin="10,5,10,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
- <CheckBox Content="{x:Static Properties:Resources.ChaptersView_CreateChapterMarkers}" IsChecked="{Binding IncludeChapterMarkers}" Grid.Column="0" VerticalAlignment="Center" />
+ <CheckBox Content="{x:Static Properties:Resources.ChaptersView_CreateChapterMarkers}" IsChecked="{Binding IncludeChapterMarkers}" Grid.Column="0" VerticalAlignment="Center" VerticalContentAlignment="Center" />
<Button Content="{x:Static Properties:Resources.ChaptersView_Import}" Name="import" Grid.Column="2" Width="75" Margin="0,0,10,0" cal:Message.Attach="[Event Click] = [Action Import]" />
<Button Content="{x:Static Properties:Resources.ChaptersView_Export}" Name="export" Grid.Column="3" Width="75" cal:Message.Attach="[Event Click] = [Action Export]" />
</Grid>
- <DataGrid Grid.Row="2" Margin="10" ItemsSource="{Binding Chapters}"
+ <DataGrid Grid.Row="1" Margin="10" ItemsSource="{Binding Chapters}"
VerticalAlignment="Stretch" AutoGenerateColumns="False"
CanUserSortColumns="False" CanUserReorderColumns="False" CanUserResizeColumns="False" CanUserResizeRows="False"
CanUserAddRows="False" CanUserDeleteRows="False" HeadersVisibility="Column"
diff --git a/win/CS/HandBrakeWPF/Views/FiltersView.xaml b/win/CS/HandBrakeWPF/Views/FiltersView.xaml index 38291fef9..36a1c8a33 100644 --- a/win/CS/HandBrakeWPF/Views/FiltersView.xaml +++ b/win/CS/HandBrakeWPF/Views/FiltersView.xaml @@ -19,7 +19,6 @@ <Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
@@ -27,9 +26,7 @@ <ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
- <TextBlock Text="{x:Static Properties:Resources.FiltersView_Filters}" FontSize="12" FontWeight="Bold" Margin="10,5,0,0" Grid.Row="0" />
-
- <StackPanel Orientation="Vertical" Grid.Row="1" Grid.Column="0" Margin="10,10,0,0">
+ <StackPanel Orientation="Vertical" Grid.Row="0" Grid.Column="0" Margin="10,10,0,0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
diff --git a/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml b/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml index 6bd9dace6..8fba7bbdc 100644 --- a/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml +++ b/win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml @@ -4,7 +4,8 @@ xmlns:Converters="clr-namespace:HandBrakeWPF.Converters"
xmlns:controls="clr-namespace:HandBrakeWPF.Controls"
xmlns:Properties="clr-namespace:HandBrakeWPF.Properties"
- xmlns:picture="clr-namespace:HandBrakeWPF.Converters.Picture">
+ xmlns:picture="clr-namespace:HandBrakeWPF.Converters.Picture"
+ xmlns:cal="http://www.caliburnproject.org">
<UserControl.Resources>
<Converters:BooleanConverter x:Key="boolConverter" />
@@ -21,7 +22,6 @@ <Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
@@ -33,7 +33,6 @@ <ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
-
<!-- Size Panel-->
<TextBlock Text="{x:Static Properties:Resources.PictureSettingsView_ResAndScaling}" FontSize="12" FontWeight="Bold" Grid.Row="0" Grid.Column="0" Margin="10,5,0,15" />
<StackPanel Name="SizePanel" Orientation="Vertical" VerticalAlignment="Top" Margin="5,0,0,0" Grid.Row="1" Grid.Column="0">
@@ -132,8 +131,8 @@ </Grid>
</StackPanel>
-
- <!-- Crop Panel -->
+
+ <!-- Crop Panel -->
<TextBlock Text="{x:Static Properties:Resources.PictureSettingsView_RotateAndCrop}" FontSize="12" FontWeight="Bold" Grid.Row="0" Grid.Column="1" Margin="50,5,0,15" />
<Grid Name="CropPanel" Margin="50,0,0,0" VerticalAlignment="Top" HorizontalAlignment="Stretch" Grid.Row="1" Grid.Column="1">
<Grid.ColumnDefinitions>
@@ -281,25 +280,30 @@ <TextBlock Text="{x:Static Properties:Resources.PictureSettingsView_PaddingColour}" Grid.Row="2" Grid.Column="0" />
<ComboBox ItemsSource="{Binding PaddingFilter.PaddingColours}" SelectedItem="{Binding PaddingFilter.Colour}" Grid.Row="2" Grid.Column="1" />
- </Grid>-->
+ </Grid> -->
+
+ <!-- Preview Control -->
+ <Grid Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="3">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+
+ </Grid>
+
<!-- Output Panel -->
- <StackPanel Name="PreviewPanel" Margin="5,5,0,0" VerticalAlignment="Top" HorizontalAlignment="Stretch" Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="4">
+ <StackPanel Name="PreviewPanel" Margin="5,5,0,0" VerticalAlignment="Top" HorizontalAlignment="Stretch" Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="3">
<Label Content="{x:Static Properties:Resources.PictureSettingsView_Output}" FontSize="12" FontWeight="Bold" />
- <Grid >
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
+ <StackPanel Orientation="Horizontal" Margin="0,0,0,5">
+ <Label Content="{Binding DisplaySize}" HorizontalAlignment="Left" VerticalContentAlignment="Center" VerticalAlignment="Center"
+ Visibility="{Binding ShowDisplaySize, Converter={StaticResource boolToVisConverter}}" />
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
+ <Button Content="{x:Static Properties:Resources.PictureSettingsView_SeePreview}" cal:Message.Attach="[Event Click] = [Action OpenPreviewWindow]"
+ VerticalAlignment="Center" VerticalContentAlignment="Center" Margin="20,0,0,0" FontWeight="Bold" />
+ </StackPanel>
- <Label Content="{Binding DisplaySize}" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Left" Margin="0,0,0,5"
- Visibility="{Binding ShowDisplaySize, Converter={StaticResource boolToVisConverter}}" />
- </Grid>
</StackPanel>
</Grid>
diff --git a/win/CS/HandBrakeWPF/Views/QueueView.xaml b/win/CS/HandBrakeWPF/Views/QueueView.xaml index b227a3d63..53039bd1f 100644 --- a/win/CS/HandBrakeWPF/Views/QueueView.xaml +++ b/win/CS/HandBrakeWPF/Views/QueueView.xaml @@ -407,11 +407,7 @@ </Button>
</StackPanel>
-
- <TextBlock FontWeight="Bold" Text="Status:" VerticalAlignment="Top" Grid.Row="0" Grid.Column="0" Margin="0,15,10,5" Visibility="{Binding SelectedTask.IsJobStatusVisible, Converter={StaticResource boolToVisConverter}}" />
- <TextBlock Text="{Binding SelectedTask.JobProgress.JobStatus}" Visibility="{Binding SelectedTask.IsJobStatusVisible, Converter={StaticResource boolToVisConverter}}"
- TextWrapping="WrapWithOverflow" TextTrimming="CharacterEllipsis" Margin="0,0,0,5" />
-
+ <!-- Job Summary -->
<Grid Style="{StaticResource LongToolTipHolder}" Margin="0,10,0,0" >
<Grid.Resources>
<Style TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
@@ -429,6 +425,7 @@ <RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
@@ -436,12 +433,14 @@ <ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
- <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Source}" VerticalAlignment="Top" Grid.Row="0" Grid.Column="0" />
- <TextBlock Text="{Binding SelectedTask.Task.Source}" TextWrapping="Wrap" Grid.Row="0" Grid.Column="1" />
+ <TextBlock FontWeight="Bold" Text="Status:" VerticalAlignment="Top" Grid.Row="0" />
+ <TextBlock Text="{Binding SelectedTask.JobProgress.JobStatus}" TextWrapping="WrapWithOverflow" VerticalAlignment="Top" TextTrimming="CharacterEllipsis" Grid.Row="0" Grid.Column="1" />
- <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.MainView_Title}" VerticalAlignment="Top" Grid.Row="1" Grid.Column="0" />
+ <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Source}" VerticalAlignment="Top" Grid.Row="1" Grid.Column="0" />
+ <TextBlock Text="{Binding SelectedTask.Task.Source}" TextWrapping="Wrap" Grid.Row="1" Grid.Column="1" />
- <StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="1" Margin="0,0,0,0" >
+ <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.MainView_Title}" VerticalAlignment="Top" Grid.Row="2" Grid.Column="0" />
+ <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="1" Margin="0,0,0,0" >
<TextBlock Text="{Binding SelectedTask.Task.Title}" TextWrapping="Wrap"/>
<TextBlock Text="{Binding SelectedTask.Task.PointToPointMode, Converter={StaticResource PointToPointConverter}}" TextWrapping="Wrap" Margin="10,0,0,0" FontWeight="Bold"/>
<TextBlock Text=":" FontWeight="Bold" />
@@ -450,30 +449,27 @@ <TextBlock Text="{Binding SelectedTask.Task.EndPoint}" TextWrapping="Wrap"/>
</StackPanel>
+ <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Destination}" VerticalAlignment="Top" Grid.Row="3" Grid.Column="0" />
+ <TextBlock Text="{Binding SelectedTask.Task.Destination}" TextWrapping="Wrap" Grid.Row="3" Grid.Column="1" />
+ <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_PictureSettings}" VerticalAlignment="Top" Grid.Row="4" Grid.Column="0" />
+ <TextBlock Text="{Binding SelectedTask.Task, Converter={StaticResource pictureSettingsDescConverter}}" TextWrapping="Wrap" Grid.Row="4" Grid.Column="1" />
- <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Destination}" VerticalAlignment="Top" Grid.Row="2" Grid.Column="0" />
- <TextBlock Text="{Binding SelectedTask.Task.Destination}" TextWrapping="Wrap" Grid.Row="2" Grid.Column="1" />
-
- <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_PictureSettings}" VerticalAlignment="Top" Grid.Row="3" Grid.Column="0" />
- <TextBlock Text="{Binding SelectedTask.Task, Converter={StaticResource pictureSettingsDescConverter}}" TextWrapping="Wrap" Grid.Row="3" Grid.Column="1" />
+ <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_FilterSettings}" VerticalAlignment="Top" Grid.Row="5" Grid.Column="0" />
+ <TextBlock Text="{Binding SelectedTask.Task, Converter={StaticResource filterSettingsDescConverter}}" TextWrapping="Wrap" Grid.Row="5" Grid.Column="1" />
- <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_FilterSettings}" VerticalAlignment="Top" Grid.Row="4" Grid.Column="0" />
- <TextBlock Text="{Binding SelectedTask.Task, Converter={StaticResource filterSettingsDescConverter}}" TextWrapping="Wrap" Grid.Row="4" Grid.Column="1" />
+ <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Video}" Grid.Row="6" Grid.Column="0" />
+ <TextBlock Text="{Binding SelectedTask.Task, Converter={StaticResource videoOptionsTooltipConverter}}" Grid.Row="6" Grid.Column="1" TextWrapping="Wrap" />
- <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Video}" Grid.Row="5" Grid.Column="0" />
- <TextBlock Text="{Binding SelectedTask.Task, Converter={StaticResource videoOptionsTooltipConverter}}" Grid.Row="5" Grid.Column="1" TextWrapping="Wrap" />
+ <TextBlock FontWeight="Bold" VerticalAlignment="Top" Grid.Row="7" Grid.Column="0" Text="{x:Static Properties:Resources.QueueView_Advanced}" />
+ <TextBlock Text="{Binding SelectedTask.Task, Converter={StaticResource encoderOptionsTooltipConverter}}" Grid.Row="7" Grid.Column="1" TextWrapping="Wrap" />
- <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Audio}" Grid.Row="6" Grid.Column="0" VerticalAlignment="Top"/>
- <TextBlock Text="{Binding SelectedTask.Task.AudioTracks, Converter={StaticResource audioTrackDisplayConverter}}"
- Grid.Row="6" Grid.Column="1" />
+ <TextBlock FontWeight="Bold" Text="{x:Static Properties:Resources.QueueView_Audio}" Grid.Row="8" Grid.Column="0" VerticalAlignment="Top"/>
+ <TextBlock Text="{Binding SelectedTask.Task.AudioTracks, Converter={StaticResource audioTrackDisplayConverter}}" Grid.Row="8" Grid.Column="1" />
- <TextBlock FontWeight="Bold" VerticalAlignment="Top" Text="{x:Static Properties:Resources.QueueView_Subtitles}" Grid.Row="7" Grid.Column="0" />
- <TextBlock Text="{Binding SelectedTask.Task.SubtitleTracks, Converter={StaticResource subtitleTrackDisplayConverter}}"
- Grid.Row="7" Grid.Column="1" />
+ <TextBlock FontWeight="Bold" VerticalAlignment="Top" Text="{x:Static Properties:Resources.QueueView_Subtitles}" Grid.Row="9" Grid.Column="0" />
+ <TextBlock Text="{Binding SelectedTask.Task.SubtitleTracks, Converter={StaticResource subtitleTrackDisplayConverter}}" Grid.Row="9" Grid.Column="1" />
- <TextBlock FontWeight="Bold" VerticalAlignment="Top" Grid.Row="8" Grid.Column="0" Text="{x:Static Properties:Resources.QueueView_Advanced}" />
- <TextBlock Text="{Binding SelectedTask.Task, Converter={StaticResource encoderOptionsTooltipConverter}}" Grid.Row="8" Grid.Column="1" TextWrapping="Wrap" />
</Grid>
</StackPanel>
diff --git a/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml index 51600df14..cbd67bb6f 100644 --- a/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml +++ b/win/CS/HandBrakeWPF/Views/SubtitlesView.xaml @@ -34,7 +34,6 @@ <Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
@@ -44,14 +43,7 @@ </Grid.ColumnDefinitions>
<!-- Row 0 -->
- <TextBlock Grid.Row="0" Grid.Column="0"
- Margin="10,5,0,0"
- FontSize="12" FontWeight="Bold"
- VerticalAlignment="Top"
- Text="{Binding PanelTitle}" />
-
- <!-- Row 1 -->
- <Grid Grid.Row="1" Margin="10,5,10,0">
+ <Grid Grid.Row="0" Margin="10,5,10,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@@ -104,8 +96,8 @@ </Grid>
- <!-- Row 2 -->
- <ListBox Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2"
+ <!-- Row 0 -->
+ <ListBox Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"
Margin="10,10,10,10" x:Name="subtitleListBox"
dd:DragDrop.DropHandler="{Binding}"
dd:DragDrop.IsDragSource="True"
diff --git a/win/CS/HandBrakeWPF/Views/SummaryView.xaml b/win/CS/HandBrakeWPF/Views/SummaryView.xaml index 494f37971..ac6baffda 100644 --- a/win/CS/HandBrakeWPF/Views/SummaryView.xaml +++ b/win/CS/HandBrakeWPF/Views/SummaryView.xaml @@ -110,7 +110,8 @@ <Grid Grid.Row="0" Grid.ColumnSpan="2" HorizontalAlignment="Left" VerticalAlignment="Top" Background="Transparent"> <Grid.RowDefinitions> - <RowDefinition Height="*" /> + <RowDefinition Height="Auto" /> + <RowDefinition Height="*"/> <RowDefinition Height="Auto"/> <RowDefinition Height="32"/> </Grid.RowDefinitions> @@ -120,14 +121,16 @@ <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> - <Image Source="{Binding PreviewImage}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0,5,10,0" x:Name="previewImage" Panel.ZIndex="0" Grid.ColumnSpan="2" + <TextBlock Text="{x:Static Properties:Resources.SummaryView_SourcePreview}" FontSize="12" FontWeight="Bold" Grid.Row="0" Grid.ColumnSpan="2" VerticalAlignment="Center" /> + + <Image Source="{Binding PreviewImage}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0,5,10,0" x:Name="previewImage" Grid.Row="1" Panel.ZIndex="0" Grid.ColumnSpan="2" MaxWidth="{Binding MaxWidth}" MaxHeight="{Binding MaxHeight}" MouseWheel="PreviewImage_OnMouseWheel" /> - <Border Grid.Row="1" Grid.ColumnSpan="2" VerticalAlignment="Bottom" HorizontalAlignment="Center" Background="Transparent" Margin="0,5,0,5"> + <Border Grid.Row="2" Grid.ColumnSpan="2" VerticalAlignment="Bottom" HorizontalAlignment="Center" Background="Transparent" Margin="0,5,0,5"> <TextBlock Text="{Binding PreviewInfo}" TextAlignment="Center" Visibility="{Binding IsPreviewInfoVisible, Converter={StaticResource boolToVisConverter}}" /> </Border> - <Grid Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="2" HorizontalAlignment="Center" Width="84" Visibility="{Binding IsPreviewInfoVisible, Converter={StaticResource boolToVisConverter}}"> + <Grid Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="3" HorizontalAlignment="Center" Width="84" Visibility="{Binding IsPreviewInfoVisible, Converter={StaticResource boolToVisConverter}}"> <Grid.ColumnDefinitions> <ColumnDefinition Width="42" /> <ColumnDefinition Width="42" /> |