]> granicus.if.org Git - handbrake/commitdiff
WinGui: Few small bug fixes. AutoName All Caps, Layout on the main window.
authorsr55 <sr55.hb@outlook.com>
Wed, 20 Dec 2017 21:26:38 +0000 (21:26 +0000)
committersr55 <sr55.hb@outlook.com>
Wed, 20 Dec 2017 21:27:01 +0000 (21:27 +0000)
win/CS/HandBrakeWPF/Extensions/StringExtensions.cs
win/CS/HandBrakeWPF/Views/MainView.xaml
win/CS/HandBrakeWPF/Views/ShellView.xaml
win/CS/HandBrakeWPF/Views/X264View.xaml

index d09c99e20c4a71403cb7af962869ed350e7438c1..d3324a91324ec2da63bc4cac7099f91cd6c8dca3 100644 (file)
@@ -24,7 +24,8 @@ namespace HandBrakeWPF.Extensions
         public static string ToTitleCase(this string input)\r
         {\r
             TextInfo textInfo = new CultureInfo(CultureInfo.CurrentCulture.Name, false).TextInfo;\r
-            return textInfo.ToTitleCase(input);\r
+            return textInfo.ToTitleCase(input.ToLower());\r
+          \r
         }\r
     }\r
 }\r
index 4d2f58719ff85e3d85df57b8b2be4d61b79adcf7..e34aa2a2f340d3f186911fc95246129e0273b28f 100644 (file)
             <Setter Property="Padding" Value="5,5" />\r
         </Style>\r
 \r
+        <Style TargetType="ToolTip">\r
+            <Style.Resources>\r
+                <Style TargetType="ContentPresenter">\r
+                    <Style.Resources>\r
+                        <Style TargetType="TextBlock">\r
+                            <Setter Property="TextWrapping" Value="Wrap" />\r
+                        </Style>\r
+                    </Style.Resources>\r
+                </Style>\r
+            </Style.Resources>\r
+            <Setter Property="MaxWidth" Value="500" />\r
+        </Style>\r
+\r
     </UserControl.Resources>\r
 \r
     <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">\r
         <!--  Main Body  -->\r
         <Grid Grid.Row="1">\r
             <Grid.ColumnDefinitions>\r
-                <ColumnDefinition Width="*" MinWidth="725"/>\r
+                <ColumnDefinition Width="*" />\r
                 <ColumnDefinition Width="Auto" />\r
             </Grid.ColumnDefinitions>\r
             <Grid.RowDefinitions>\r
             </Grid.RowDefinitions>\r
 \r
             <!--  Main Controls  -->\r
-            <StackPanel Orientation="Vertical" IsEnabled="{Binding HasSource, Converter={StaticResource booleanConverter}, ConverterParameter=false}">\r
-                <!--  Source  -->\r
-                <StackPanel Margin="10,5,5,5"\r
+            <!--  Source  -->\r
+            <Grid Margin="10,5,5,5" IsEnabled="{Binding HasSource, Converter={StaticResource booleanConverter}, ConverterParameter=false}"\r
                             HorizontalAlignment="Stretch"\r
                             VerticalAlignment="Stretch">\r
-                    <Grid HorizontalAlignment="Stretch" Margin="0,0,10,0">\r
-                        <Grid.ColumnDefinitions>\r
-                            <ColumnDefinition Width="Auto" />\r
-                            <ColumnDefinition Width="Auto" />\r
-                            <ColumnDefinition Width="Auto" />\r
-                        </Grid.ColumnDefinitions>\r
-\r
-                        <Label Content="{x:Static Properties:ResourcesUI.MainView_Source}" FontWeight="Bold" Grid.Column="0" />\r
-                        <TextBlock Text="{Binding Path=SourceLabel}" TextTrimming="CharacterEllipsis" Grid.Column="1" MaxWidth="400"  />\r
-                        <TextBlock Text="{Binding SourceInfo}" HorizontalAlignment="Right" VerticalAlignment="Center" Foreground="DimGray" Grid.Column="2" Margin="15,0,0,0" MaxWidth="400" />\r
-                    </Grid>\r
+                <Grid.RowDefinitions>\r
+                    <RowDefinition Height="Auto" />\r
+                    <RowDefinition Height="Auto" />\r
+                </Grid.RowDefinitions>\r
 \r
-                    <StackPanel Orientation="Horizontal">\r
-                        <Label Margin="8,0,0,0" FontWeight="Bold" Content="{x:Static Properties:ResourcesUI.MainView_Title}" />\r
-                        <ComboBox Name="Titles"\r
+                <Grid HorizontalAlignment="Stretch" Margin="0,0,10,0">\r
+                    <Grid.ColumnDefinitions>\r
+                        <ColumnDefinition Width="Auto" />\r
+                        <ColumnDefinition Width="Auto" />\r
+                        <ColumnDefinition Width="Auto" />\r
+                        <ColumnDefinition Width="*" />\r
+                    </Grid.ColumnDefinitions>\r
+\r
+                    <Label Content="{x:Static Properties:ResourcesUI.MainView_Source}" FontWeight="Bold" Grid.Column="0" />\r
+                    <TextBlock Text="{Binding Path=SourceLabel}" ToolTip="{Binding Path=SourceLabel}" TextTrimming="CharacterEllipsis" MaxWidth="595" Grid.Column="1" />\r
+                    <TextBlock Text="{Binding SourceInfo}" HorizontalAlignment="Right" VerticalAlignment="Center" Foreground="DimGray" Grid.Column="2" Margin="15,0,0,0" MaxWidth="360" />\r
+                </Grid>\r
+\r
+                <StackPanel Orientation="Horizontal" Grid.Row="1">\r
+                    <Label Margin="8,0,0,0" FontWeight="Bold" Content="{x:Static Properties:ResourcesUI.MainView_Title}" />\r
+                    <ComboBox Name="Titles"\r
                                   MinWidth="100"\r
                                   Margin="8,0,0,0"\r
                                   ItemsSource="{Binding ScannedSource.Titles}"\r
                                   ToolTip="{x:Static Properties:ResourcesTooltips.MainView_Title}"\r
                                   SelectedItem="{Binding Path=SelectedTitle}" />\r
-                        <Label Margin="8,0,0,0" FontWeight="Bold" Content="{x:Static Properties:ResourcesUI.MainView_Angle}" />\r
+                    <Label Margin="8,0,0,0" FontWeight="Bold" Content="{x:Static Properties:ResourcesUI.MainView_Angle}" />\r
 \r
-                        <ComboBox Name="Angles"\r
+                    <ComboBox Name="Angles"\r
                                   MinWidth="60"\r
                                   Margin="8,0,0,0"\r
                                   ItemsSource="{Binding Angles}"\r
                                   SelectedItem="{Binding SelectedAngle}"\r
                                   ToolTip="{x:Static Properties:ResourcesTooltips.MainView_Angle}" />\r
 \r
-                        <Label Margin="8,0,0,0" FontWeight="Bold" Content="{x:Static Properties:ResourcesUI.MainView_Range}" />\r
-                        <ComboBox Name="PointToPointMode"\r
+                    <Label Margin="8,0,0,0" FontWeight="Bold" Content="{x:Static Properties:ResourcesUI.MainView_Range}" />\r
+                    <ComboBox Name="PointToPointMode"\r
                                   MinWidth="80"\r
                                   Margin="8,0,0,0"\r
                                   ItemsSource="{Binding RangeMode}" ToolTip="{x:Static Properties:ResourcesTooltips.MainView_Range}"\r
                                   SelectedItem="{Binding SelectedPointToPoint}" />\r
-                        <ComboBox Name="StartPoint"\r
+                    <ComboBox Name="StartPoint"\r
                                   MinWidth="60"\r
                                   Margin="8,0,0,0"\r
                                   ItemsSource="{Binding StartEndRangeItems}"\r
                                   Visibility="{Binding ShowTextEntryForPointToPointMode,\r
                                                        Converter={StaticResource boolToVisConverter},\r
                                                        ConverterParameter=true}" />\r
-                        <Controls:TimeSpanBox  Number="{Binding SelectedStartPoint, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"\r
+                    <Controls:TimeSpanBox  Number="{Binding SelectedStartPoint, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"\r
                                                Minimum="0" AllowEmpty="False" ShowTimeSpan="{Binding IsTimespanRange}"\r
                                                ToolTip="{x:Static Properties:ResourcesTooltips.MainView_StartPoint}"\r
                                                MinWidth="80" Margin="8,0,0,0"  Visibility="{Binding ShowTextEntryForPointToPointMode,\r
                                                        Converter={StaticResource boolToVisConverter},\r
                                                        ConverterParameter=false}" />\r
 \r
-                        <Label Margin="4,0,0,0" Content="{x:Static Properties:ResourcesUI.MainView_through}" />\r
-                        <ComboBox Name="EndPoint"\r
+                    <Label Margin="4,0,0,0" Content="{x:Static Properties:ResourcesUI.MainView_through}" />\r
+                    <ComboBox Name="EndPoint"\r
                                   MinWidth="60"\r
                                   Margin="4,0,0,0"\r
                                   ItemsSource="{Binding StartEndRangeItems}"\r
                                   Visibility="{Binding ShowTextEntryForPointToPointMode,\r
                                                        Converter={StaticResource boolToVisConverter},\r
                                                        ConverterParameter=true}" />\r
-                        <Controls:TimeSpanBox  Number="{Binding SelectedEndPoint, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"\r
+                    <Controls:TimeSpanBox  Number="{Binding SelectedEndPoint, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"\r
                                                Minimum="0" AllowEmpty="False" ShowTimeSpan="{Binding IsTimespanRange}"\r
                                                ToolTip="{x:Static Properties:ResourcesTooltips.MainView_EndPoint}"\r
                                                MinWidth="80" Margin="8,0,0,0"  Visibility="{Binding ShowTextEntryForPointToPointMode,\r
                                                        Converter={StaticResource boolToVisConverter},\r
                                                        ConverterParameter=false}" />\r
 \r
-                        <Label Margin="4,0,0,0" Content="{x:Static Properties:ResourcesUI.MainView_Duration}" FontWeight="Bold" ToolTip="{x:Static Properties:ResourcesTooltips.MainView_Duration}" />\r
-                        <Label Margin="4,0,0,0" Content="{Binding Duration}" ToolTip="{x:Static Properties:ResourcesTooltips.MainView_Duration}" />\r
+                    <Label Margin="4,0,0,0" Content="{x:Static Properties:ResourcesUI.MainView_Duration}" FontWeight="Bold" ToolTip="{x:Static Properties:ResourcesTooltips.MainView_Duration}" />\r
+                    <Label Margin="4,0,0,0" Content="{Binding Duration}" ToolTip="{x:Static Properties:ResourcesTooltips.MainView_Duration}" />\r
 \r
-                    </StackPanel>\r
                 </StackPanel>\r
-            </StackPanel>\r
+            </Grid>\r
 \r
             <!--  Presets Options  -->\r
-            <StackPanel Grid.Row="1" Orientation="Vertical"  Margin="10,5,10,5">\r
+            <StackPanel Grid.Row="1" Orientation="Vertical"  Margin="10,5,10,5" IsEnabled="{Binding HasSource, Converter={StaticResource booleanConverter}, ConverterParameter=false}">\r
                 <Label Content="Presets" FontWeight="Bold" VerticalAlignment="Center" />\r
                 <StackPanel Orientation="Horizontal" Margin="8,0,0,0" Visibility="{Binding IsPresetPanelShowing, Converter={StaticResource boolToVisConverter}, ConverterParameter=true}">\r
 \r
                     <TextBlock Text="{Binding SelectedPreset.Name}" Margin="5,0,0,0" />\r
                     <TextBlock Text="{x:Static Properties:ResourcesUI.MainView_ModifiedPreset}" FontStyle="Italic" Visibility="{Binding IsModifiedPreset, Converter={StaticResource boolToVisConverter}}" Margin="5,0,0,0" />\r
                 </StackPanel>\r
-                \r
-\r
             </StackPanel>\r
 \r
             <!--  Tab Control  -->\r
index e0455b3d30e52d8607f70f5fa57c85beff46780e..409d4be6bcc43587d4dbedb22bdd255970ed82b2 100644 (file)
@@ -6,10 +6,10 @@
         xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"\r
         xmlns:cal="http://www.caliburnproject.org"\r
         Title="{Data:Binding Path=MainViewModel.WindowTitle}"\r
-        Width="1015"\r
-        Height="675"\r
-        MinWidth="1015"\r
-        MinHeight="675"\r
+        Width="1018"\r
+        Height="680"\r
+        MinWidth="1018"\r
+        MinHeight="680"\r
         AllowDrop="True"\r
         SnapsToDevicePixels="True"\r
         UseLayoutRounding="True"\r
index b1c97e592eba23ed3f4fa810218b193bbf952c5b..504bca3db4281a65a0961a6d20866a2dd36b4d60 100644 (file)
         \r
         <TextBox Grid.Row="3"\r
                  Margin="10,2,10, 2"\r
-                 MinHeight="50"\r
+                 MinHeight="42"\r
                  HorizontalAlignment="Stretch"\r
                  VerticalAlignment="Stretch"\r
                  Style="{StaticResource LongToolTipHolder}"\r