Changeset 2420371


Ignore:
Timestamp:
05/17/14 21:27:20 (2 years ago)
Author:
sr55 <sr55.hb@…>
Branches:
master
Children:
ec522a7
Parents:
921c659
Message:

WinGui: Give the preview window a presence on the picture settings tab. Added some initial code to manage the window size. (Note, this is not complete or DPI aware yet)

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6197 b64f7644-9d1e-0410-96f1-a4d463321fa5

Location:
win/CS
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj

    rd4327b0 r2420371  
    4444    <DebugType>pdbonly</DebugType>
    4545    <DebugSymbols>true</DebugSymbols>
     46  </PropertyGroup>
     47  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug32|x86' ">
     48    <DebugSymbols>true</DebugSymbols>
     49    <OutputPath>bin\x86\Debug31\</OutputPath>
     50    <DefineConstants>DEBUG;TRACE</DefineConstants>
     51    <PlatformTarget>x86</PlatformTarget>
     52    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
     53  </PropertyGroup>
     54  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug32|x64' ">
     55    <DebugSymbols>true</DebugSymbols>
     56    <OutputPath>bin\x64\Debug31\</OutputPath>
     57    <DefineConstants>TRACE;DEBUG</DefineConstants>
     58    <PlatformTarget>x64</PlatformTarget>
     59    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
    4660  </PropertyGroup>
    4761  <ItemGroup>
  • win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInterop.csproj

    re9cbd4a r2420371  
    100100    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
    101101    <CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
     102  </PropertyGroup>
     103  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug32|x64' ">
     104    <DebugSymbols>true</DebugSymbols>
     105    <OutputPath>bin\x64\Debug31\</OutputPath>
     106    <DefineConstants>TRACE;DEBUG;X64</DefineConstants>
     107    <DebugType>full</DebugType>
     108    <PlatformTarget>x64</PlatformTarget>
     109    <ErrorReport>prompt</ErrorReport>
     110    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
     111    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
     112    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
     113  </PropertyGroup>
     114  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug32|x86' ">
     115    <DebugSymbols>true</DebugSymbols>
     116    <OutputPath>bin\x86\Debug31\</OutputPath>
     117    <DefineConstants>DEBUG;TRACE</DefineConstants>
     118    <DebugType>full</DebugType>
     119    <PlatformTarget>x86</PlatformTarget>
     120    <ErrorReport>prompt</ErrorReport>
     121    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
     122    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
     123    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
    102124  </PropertyGroup>
    103125  <ItemGroup>
  • win/CS/HandBrake.Server/HandBrake.Server.csproj

    r7ffb1d6 r2420371  
    4242    <OutputPath>bin\Release\</OutputPath>
    4343  </PropertyGroup>
     44  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug32|x86' ">
     45    <DebugSymbols>true</DebugSymbols>
     46    <OutputPath>bin\x86\Debug31\</OutputPath>
     47    <DefineConstants>DEBUG;TRACE</DefineConstants>
     48    <DebugType>full</DebugType>
     49    <PlatformTarget>x86</PlatformTarget>
     50    <ErrorReport>prompt</ErrorReport>
     51    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
     52  </PropertyGroup>
     53  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug32|x64' ">
     54    <DebugSymbols>true</DebugSymbols>
     55    <OutputPath>bin\x64\Debug31\</OutputPath>
     56    <PlatformTarget>x64</PlatformTarget>
     57    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
     58  </PropertyGroup>
    4459  <ItemGroup>
    4560    <Reference Include="System" />
  • win/CS/HandBrake10.sln

    r83af0dc r2420371  
    11
    2 Microsoft Visual Studio Solution File, Format Version 11.00
    3 # Visual Studio 2010
     2Microsoft Visual Studio Solution File, Format Version 12.00
     3# Visual Studio 2013
     4VisualStudioVersion = 12.0.30110.0
     5MinimumVisualStudioVersion = 10.0.40219.1
    46Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HandBrake.ApplicationServices", "HandBrake.ApplicationServices\HandBrake.ApplicationServices.csproj", "{087A2BA8-BAC2-4577-A46F-07FF9D420016}"
    57EndProject
     
    2123                Debug|x64 = Debug|x64
    2224                Debug|x86 = Debug|x86
     25                Debug32|Any CPU = Debug32|Any CPU
     26                Debug32|Mixed Platforms = Debug32|Mixed Platforms
     27                Debug32|x64 = Debug32|x64
     28                Debug32|x86 = Debug32|x86
    2329                Release|Any CPU = Release|Any CPU
    2430                Release|Mixed Platforms = Release|Mixed Platforms
     
    3440                {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Debug|x86.ActiveCfg = Debug|x86
    3541                {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Debug|x86.Build.0 = Debug|x86
     42                {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Debug32|Any CPU.ActiveCfg = Debug32|x86
     43                {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Debug32|Mixed Platforms.ActiveCfg = Debug32|x86
     44                {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Debug32|Mixed Platforms.Build.0 = Debug32|x86
     45                {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Debug32|x64.ActiveCfg = Debug32|x86
     46                {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Debug32|x64.Build.0 = Debug32|x86
     47                {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Debug32|x86.ActiveCfg = Debug32|x86
     48                {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Debug32|x86.Build.0 = Debug32|x86
    3649                {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Release|Any CPU.ActiveCfg = Release|x86
    3750                {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Release|Mixed Platforms.ActiveCfg = Release|x86
     
    4861                {DADE66CB-0E12-4959-ADE5-0ACD31D27C59}.Debug|x86.ActiveCfg = Debug|x86
    4962                {DADE66CB-0E12-4959-ADE5-0ACD31D27C59}.Debug|x86.Build.0 = Debug|x86
     63                {DADE66CB-0E12-4959-ADE5-0ACD31D27C59}.Debug32|Any CPU.ActiveCfg = Debug32|x86
     64                {DADE66CB-0E12-4959-ADE5-0ACD31D27C59}.Debug32|Mixed Platforms.ActiveCfg = Debug32|x86
     65                {DADE66CB-0E12-4959-ADE5-0ACD31D27C59}.Debug32|Mixed Platforms.Build.0 = Debug32|x86
     66                {DADE66CB-0E12-4959-ADE5-0ACD31D27C59}.Debug32|x64.ActiveCfg = Debug32|x86
     67                {DADE66CB-0E12-4959-ADE5-0ACD31D27C59}.Debug32|x64.Build.0 = Debug32|x86
     68                {DADE66CB-0E12-4959-ADE5-0ACD31D27C59}.Debug32|x86.ActiveCfg = Debug32|x86
     69                {DADE66CB-0E12-4959-ADE5-0ACD31D27C59}.Debug32|x86.Build.0 = Debug32|x86
    5070                {DADE66CB-0E12-4959-ADE5-0ACD31D27C59}.Release|Any CPU.ActiveCfg = Release|x86
    5171                {DADE66CB-0E12-4959-ADE5-0ACD31D27C59}.Release|Mixed Platforms.ActiveCfg = Release|x86
     
    6282                {F0A61F62-2C3B-4A87-AFF4-0C4256253DA1}.Debug|x86.ActiveCfg = Debug|x86
    6383                {F0A61F62-2C3B-4A87-AFF4-0C4256253DA1}.Debug|x86.Build.0 = Debug|x86
     84                {F0A61F62-2C3B-4A87-AFF4-0C4256253DA1}.Debug32|Any CPU.ActiveCfg = Debug32|x86
     85                {F0A61F62-2C3B-4A87-AFF4-0C4256253DA1}.Debug32|Mixed Platforms.ActiveCfg = Debug32|x86
     86                {F0A61F62-2C3B-4A87-AFF4-0C4256253DA1}.Debug32|Mixed Platforms.Build.0 = Debug32|x86
     87                {F0A61F62-2C3B-4A87-AFF4-0C4256253DA1}.Debug32|x64.ActiveCfg = Debug32|x86
     88                {F0A61F62-2C3B-4A87-AFF4-0C4256253DA1}.Debug32|x64.Build.0 = Debug32|x86
     89                {F0A61F62-2C3B-4A87-AFF4-0C4256253DA1}.Debug32|x86.ActiveCfg = Debug32|x86
     90                {F0A61F62-2C3B-4A87-AFF4-0C4256253DA1}.Debug32|x86.Build.0 = Debug32|x86
    6491                {F0A61F62-2C3B-4A87-AFF4-0C4256253DA1}.Release|Any CPU.ActiveCfg = Release|x86
    6592                {F0A61F62-2C3B-4A87-AFF4-0C4256253DA1}.Release|Mixed Platforms.ActiveCfg = Release|x86
     
    76103                {36847BA0-6814-41E1-B1C3-1D9D874418E9}.Debug|x86.ActiveCfg = Debug|x86
    77104                {36847BA0-6814-41E1-B1C3-1D9D874418E9}.Debug|x86.Build.0 = Debug|x86
     105                {36847BA0-6814-41E1-B1C3-1D9D874418E9}.Debug32|Any CPU.ActiveCfg = Debug32|x86
     106                {36847BA0-6814-41E1-B1C3-1D9D874418E9}.Debug32|Mixed Platforms.ActiveCfg = Debug32|x86
     107                {36847BA0-6814-41E1-B1C3-1D9D874418E9}.Debug32|Mixed Platforms.Build.0 = Debug32|x86
     108                {36847BA0-6814-41E1-B1C3-1D9D874418E9}.Debug32|x64.ActiveCfg = Debug32|x86
     109                {36847BA0-6814-41E1-B1C3-1D9D874418E9}.Debug32|x64.Build.0 = Debug32|x86
     110                {36847BA0-6814-41E1-B1C3-1D9D874418E9}.Debug32|x86.ActiveCfg = Debug32|x86
     111                {36847BA0-6814-41E1-B1C3-1D9D874418E9}.Debug32|x86.Build.0 = Debug32|x86
    78112                {36847BA0-6814-41E1-B1C3-1D9D874418E9}.Release|Any CPU.ActiveCfg = Release|x86
    79113                {36847BA0-6814-41E1-B1C3-1D9D874418E9}.Release|Mixed Platforms.ActiveCfg = Release|x86
  • win/CS/HandBrakeWPF/HandBrakeWPF.csproj

    r844c185 r2420371  
    7171    <PlatformTarget>x64</PlatformTarget>
    7272    <ErrorReport>prompt</ErrorReport>
     73  </PropertyGroup>
     74  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug32|x86' ">
     75    <DebugSymbols>true</DebugSymbols>
     76    <OutputPath>bin\x86\Debug31\</OutputPath>
     77    <DefineConstants>DEBUG;TRACE</DefineConstants>
     78    <DebugType>full</DebugType>
     79    <PlatformTarget>x86</PlatformTarget>
     80    <ErrorReport>prompt</ErrorReport>
     81    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
     82  </PropertyGroup>
     83  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug32|x64' ">
     84    <DebugSymbols>true</DebugSymbols>
     85    <OutputPath>bin\x64\Debug31\</OutputPath>
     86    <DefineConstants>DEBUG;TRACE</DefineConstants>
     87    <DebugType>full</DebugType>
     88    <PlatformTarget>x64</PlatformTarget>
     89    <ErrorReport>prompt</ErrorReport>
     90    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
    7391  </PropertyGroup>
    7492  <ItemGroup>
  • win/CS/HandBrakeWPF/Properties/Resources.Designer.cs

    r844c185 r2420371  
    692692       
    693693        /// <summary>
     694        ///   Looks up a localized string similar to Output: {0}.
     695        /// </summary>
     696        public static string PictureSettings_OutputResolution {
     697            get {
     698                return ResourceManager.GetString("PictureSettings_OutputResolution", resourceCulture);
     699            }
     700        }
     701       
     702        /// <summary>
    694703        ///   Looks up a localized string similar to Preset Version.
    695704        /// </summary>
     
    745754            get {
    746755                return ResourceManager.GetString("Presets_ResetHeader", resourceCulture);
     756            }
     757        }
     758       
     759        /// <summary>
     760        ///   Looks up a localized string similar to Still Preview.
     761        /// </summary>
     762        public static string Preview {
     763            get {
     764                return ResourceManager.GetString("Preview", resourceCulture);
     765            }
     766        }
     767       
     768        /// <summary>
     769        ///   Looks up a localized string similar to Still Preview (Scaled).
     770        /// </summary>
     771        public static string Preview_Scaled {
     772            get {
     773                return ResourceManager.GetString("Preview_Scaled", resourceCulture);
    747774            }
    748775        }
  • win/CS/HandBrakeWPF/Properties/Resources.resx

    r844c185 r2420371  
    508508    <value>The entered destination contained illegal characters. You must fix the path and filename before continuing.</value>
    509509  </data>
     510  <data name="Preview" xml:space="preserve">
     511    <value>Still Preview</value>
     512  </data>
     513  <data name="Preview_Scaled" xml:space="preserve">
     514    <value>Still Preview (Scaled)</value>
     515  </data>
     516  <data name="PictureSettings_OutputResolution" xml:space="preserve">
     517    <value>Output: {0}</value>
     518  </data>
    510519</root>
  • win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs

    rc70a9eb r2420371  
    10501050
    10511051                this.DisplaySize = this.sourceResolution.IsEmpty
    1052                                      ? string.Empty
     1052                                     ? string.Format(Properties.Resources.PictureSettings_OutputResolution, "None")
    10531053                                     : string.Format("Output: {0}x{1}, Anamorphic: {2}x{3}", result.OutputWidth, result.OutputHeight, dispWidth, result.OutputHeight);
    10541054            }
  • win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs

    rc70a9eb r2420371  
    1111{
    1212    using System;
     13    using System.Windows;
    1314    using System.Windows.Media.Imaging;
    1415
     
    2324    public class StaticPreviewViewModel : ViewModelBase, IStaticPreviewViewModel
    2425    {
     26        /*
     27         * TODO
     28         * - Screen needs to be made DPI Aware
     29         * - Integrate Video Preview panel.
     30         */
     31
    2532        #region Fields
    2633
     
    6471            this.scanService = scanService;
    6572            this.selectedPreviewImage = 1;
     73            this.Title = Properties.Resources.Preview;
    6674        }
    6775
     
    173181        #region Public Methods and Operators
    174182
     183        /// <summary>
     184        /// The update preview frame.
     185        /// </summary>
     186        /// <param name="task">
     187        /// The task.
     188        /// </param>
    175189        public void UpdatePreviewFrame(EncodeTask task)
    176190        {
     
    178192            this.UpdatePreviewFrame();
    179193            this.DisplayName = "Picture Preview";
     194            this.Title = Properties.Resources.Preview;
    180195        }
    181196
     
    194209            }
    195210        }
     211
     212        /// <summary>
     213        /// The preview size changed.
     214        /// </summary>
     215        /// <param name="ea">
     216        /// The ea.
     217        /// </param>
     218        public void PreviewSizeChanged(SizeChangedEventArgs ea)
     219        {
     220            Rect workArea = SystemParameters.WorkArea;
     221            if (ea.NewSize.Width > workArea.Width)
     222            {
     223                this.Width = (int)Math.Round(workArea.Width, 0) - 20;
     224                this.Title = Properties.Resources.Preview_Scaled;
     225            }
     226
     227            if (ea.NewSize.Height > workArea.Height)
     228            {
     229                this.Height = (int)Math.Round(workArea.Height, 0) - 20;
     230                this.Title = Properties.Resources.Preview_Scaled;
     231            }
     232        }
    196233        #endregion
    197234    }
  • win/CS/HandBrakeWPF/Views/PictureSettingsView.xaml

    rc70a9eb r2420371  
    3030            </Grid.ColumnDefinitions>
    3131
     32            <Grid.RowDefinitions>
     33                <RowDefinition Height="Auto" />
     34                <RowDefinition Height="*" />
     35            </Grid.RowDefinitions>
     36
    3237            <!-- Size Panel-->
    33             <StackPanel Name="SizePanel" Orientation="Vertical" VerticalAlignment="Top" Grid.Column="0" >
     38            <StackPanel Name="SizePanel" Orientation="Vertical" VerticalAlignment="Top" Grid.Column="0" Grid.Row="0" Grid.RowSpan="1" >
    3439                <Label Content="Size" FontWeight="Bold" />
    3540
     
    100105                </Grid>
    101106
    102                 <!-- Row 5-->
    103                 <Grid Margin="5,15,5,0">
    104                     <Grid.RowDefinitions>
    105                         <RowDefinition Height="Auto" />
    106                     </Grid.RowDefinitions>
    107 
    108                     <Grid.ColumnDefinitions>
    109                         <ColumnDefinition Width="Auto" />
    110                     </Grid.ColumnDefinitions>
    111 
    112 
    113                     <Label Content="{Binding DisplaySize}" Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" Margin="0,0,0,5"
    114                        Visibility="{Binding ShowDisplaySize, Converter={StaticResource boolToVisConverter}}" />
    115                 </Grid>
    116107            </StackPanel>
    117108
    118109            <!-- Crop Panel -->
    119             <StackPanel Name="CropPanel" Margin="50,0,0,0" VerticalAlignment="Top" HorizontalAlignment="Stretch" Grid.Column="1">
     110            <StackPanel Name="CropPanel" Margin="15,0,0,0" VerticalAlignment="Top" HorizontalAlignment="Stretch" Grid.Row="0" Grid.RowSpan="2" Grid.Column="1">
    120111                <Label Content="Cropping" FontWeight="Bold" />
    121112                <RadioButton Content="Automatic" IsChecked="{Binding IsCustomCrop, Converter={StaticResource boolConverter}, ConverterParameter=true}" Margin="10,0,0,0"/>
     
    159150
    160151            </StackPanel>
     152
     153            <!-- Preview Panel -->
     154            <StackPanel Name="PreviewPanel" Margin="0,5,0,0" VerticalAlignment="Top" HorizontalAlignment="Stretch" Grid.Row="1"  Grid.Column="0">
     155                <Label Content="Output" FontWeight="Bold" />
     156
     157                <Grid Margin="5,0,0,0">
     158                    <Grid.RowDefinitions>
     159                        <RowDefinition Height="Auto" />
     160                        <RowDefinition Height="Auto" />
     161                    </Grid.RowDefinitions>
     162
     163                    <Grid.ColumnDefinitions>
     164                        <ColumnDefinition Width="Auto" />
     165                    </Grid.ColumnDefinitions>
     166
     167                    <Label Content="{Binding DisplaySize}" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Left" Margin="0,0,0,5"
     168                       Visibility="{Binding ShowDisplaySize, Converter={StaticResource boolToVisConverter}}" />
     169
     170                    <Button Content="Preview" Grid.Row="1" Margin="5,0,0,0"
     171                            cal:Message.Attach="[Event Click] = [Action PreviewImage]" HorizontalAlignment="Left" />
     172                </Grid>
     173               
     174            </StackPanel>
    161175        </Grid>
    162176    </Border>
  • win/CS/HandBrakeWPF/Views/StaticPreviewView.xaml

    r6d1a0aa r2420371  
    33             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    44             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    5              xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
     5             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
     6             xmlns:cal="http://www.caliburnproject.org"
    67             mc:Ignorable="d" SizeToContent="WidthAndHeight"
    78             TextOptions.TextFormattingMode="Display"
    8              Title="Still Preview">
     9             WindowStartupLocation="CenterScreen"
     10             cal:Message.Attach="[Event SizeChanged] = [Action PreviewSizeChanged($eventArgs)]"       
     11             Title="{Binding Title}">
    912    <Grid>
    10        
     13
    1114        <Image Source="{Binding PreviewImage}" MaxWidth="{Binding Width}" MaxHeight="{Binding Height}" />
    1215        <Slider Maximum="{Binding TotalPreviews}" Minimum="0"
     
    1619                Margin="0,0,0,20" Width="150"
    1720                Background="Transparent"
    18                 /> 
     21                />
    1922    </Grid>
    2023</Window>
Note: See TracChangeset for help on using the changeset viewer.