]> granicus.if.org Git - handbrake/commitdiff
WinGui: Allow the Title Dropdown to grow in width where it makes sense. #1499
authorsr55 <sr55.hb@outlook.com>
Wed, 25 Jul 2018 20:40:10 +0000 (21:40 +0100)
committersr55 <sr55.hb@outlook.com>
Wed, 25 Jul 2018 20:40:10 +0000 (21:40 +0100)
win/CS/HandBrakeWPF/Views/MainView.xaml

index 2bc3929cc07adf4d000d5628b955c0f864ca1af1..80951e8142fb16e92bc49cb7c2c56fb4f9d2ca5d 100644 (file)
                     <TextBlock Text="{Binding SourceInfo}" HorizontalAlignment="Right" VerticalAlignment="Center" Foreground="DimGray" Grid.Column="2" Margin="10,0,0,0" MaxWidth="360" />\r
                 </Grid>\r
 \r
-                <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0,5,0,0">\r
-                    <Label FontWeight="Bold" Content="{x:Static Properties:ResourcesUI.MainView_Title}" />\r
-                    <ComboBox Name="Titles"\r
-                             Width="100"\r
-                             Margin="17,0,0,0"\r
-                             ItemsSource="{Binding ScannedSource.Titles}"\r
-                             ToolTip="{x:Static Properties:ResourcesTooltips.MainView_Title}"\r
-                             SelectedItem="{Binding Path=SelectedTitle}" >\r
+                <Grid Grid.Row="1" Margin="0,5,5,0">\r
+                    <Grid.ColumnDefinitions>\r
+                        <ColumnDefinition Width="Auto" />\r
+                        <ColumnDefinition Width="*" MaxWidth="272" />\r
+                        <ColumnDefinition Width="Auto" />\r
+                    </Grid.ColumnDefinitions>\r
+\r
+                    <Label FontWeight="Bold" Content="{x:Static Properties:ResourcesUI.MainView_Title}"  Grid.Column="0"  />\r
+                    <ComboBox Name="Titles"  Grid.Column="1" \r
+                              MinWidth="100" Margin="17,0,0,0"\r
+                              ItemsSource="{Binding ScannedSource.Titles}"\r
+                              ToolTip="{x:Static Properties:ResourcesTooltips.MainView_Title}"\r
+                              SelectedItem="{Binding Path=SelectedTitle}" >\r
 \r
                         <ComboBox.Style>\r
                             <Style TargetType="{x:Type ComboBox}">\r
                             </Style>\r
                         </ComboBox.Style>\r
                     </ComboBox>\r
-                    <Label Margin="5,0,0,0" FontWeight="Bold" Content="{x:Static Properties:ResourcesUI.MainView_Angle}" />\r
+                    <StackPanel Orientation="Horizontal" Grid.Column="2" >\r
+                        <Label Margin="5,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="2,0,0,0"\r
                                   ItemsSource="{Binding Angles}"\r
                                   SelectedItem="{Binding SelectedAngle}"\r
                                   ToolTip="{x:Static Properties:ResourcesTooltips.MainView_Angle}" />\r
 \r
-                    <Label Margin="2,0,0,0" FontWeight="Bold" Content="{x:Static Properties:ResourcesUI.MainView_Range}" />\r
-                    <ComboBox Name="PointToPointMode"\r
+                        <Label Margin="2,0,0,0" FontWeight="Bold" Content="{x:Static Properties:ResourcesUI.MainView_Range}" />\r
+                        <ComboBox Name="PointToPointMode"\r
                                   MinWidth="80"\r
                                   Margin="5,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="5,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="72" Margin="5,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="72" Margin="5,0,0,0"  Visibility="{Binding ShowTextEntryForPointToPointMode,\r
                                                        Converter={StaticResource boolToVisConverter},\r
                                                        ConverterParameter=false}" />\r
 \r
-                    <Label Margin="2,0,0,0" Content="{x:Static Properties:ResourcesUI.MainView_Duration}" FontWeight="Bold" ToolTip="{x:Static Properties:ResourcesTooltips.MainView_Duration}" />\r
-                    <Label Margin="0,0,0,0" Content="{Binding Duration}" ToolTip="{x:Static Properties:ResourcesTooltips.MainView_Duration}" />\r
+                        <Label Margin="2,0,0,0" Content="{x:Static Properties:ResourcesUI.MainView_Duration}" FontWeight="Bold" ToolTip="{x:Static Properties:ResourcesTooltips.MainView_Duration}" />\r
+                        <Label Margin="0,0,0,0" Content="{Binding Duration}" ToolTip="{x:Static Properties:ResourcesTooltips.MainView_Duration}" />\r
 \r
-                </StackPanel>\r
+                    </StackPanel>\r
+                </Grid>\r
+\r
+              \r
             </Grid>\r
 \r
             <!--  Presets Options  -->\r