From 8a1e450ed0024507e43726c1f0f722549f3ccd39 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sun, 7 Nov 2010 18:46:56 +0000 Subject: [PATCH] WinGui: - Collaspe the preview window if QT is not installed. Hide the QuickTime playback options. git-svn-id: svn://localhost/HandBrake/trunk@3659 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/C#/frmPreview.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/win/C#/frmPreview.cs b/win/C#/frmPreview.cs index bbf8c78e..3a8a2207 100644 --- a/win/C#/frmPreview.cs +++ b/win/C#/frmPreview.cs @@ -10,6 +10,7 @@ namespace Handbrake using System.IO; using System.Runtime.InteropServices; using System.Threading; + using System.Windows; using System.Windows.Forms; using Functions; @@ -19,6 +20,8 @@ namespace Handbrake using QTOControlLib; using QTOLibrary; + using MessageBox = System.Windows.Forms.MessageBox; + /// /// The Preview Window /// @@ -73,6 +76,13 @@ namespace Handbrake catch (Exception) { this.noQt = true; + + int borderWidth = (this.Width - this.ClientSize.Width) / 2; + int titlebarAndBorder = this.Height - this.ClientSize.Height; + + this.Height = toolBar.Height + titlebarAndBorder + 1; + btn_playQT.Enabled = false; + btn_playQT.Visible = false; } this.mainWindow = mw; @@ -400,7 +410,7 @@ namespace Handbrake QTControl.Show(); this.ClientSize = QTControl.Size; - this.Height += 25; + this.Height += toolBar.Height; } catch (COMException ex) { -- 2.11.0