]> granicus.if.org Git - handbrake/commitdiff
WinGui: Some further UI design tweaks.
authorsr55 <sr55.hb@outlook.com>
Sat, 18 Apr 2015 14:45:33 +0000 (14:45 +0000)
committersr55 <sr55.hb@outlook.com>
Sat, 18 Apr 2015 14:45:33 +0000 (14:45 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7095 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/HandBrakeWPF/Controls/SourceSelection.xaml
win/CS/HandBrakeWPF/Controls/StatusPanel.xaml
win/CS/HandBrakeWPF/Views/MainView.xaml

index 44d600c4ed69a3e4b2b917c7886ff22e9ffde9bc..4c03075758786a6abe5aed361599ce9446376642 100644 (file)
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"\r
         xmlns:cal="http://www.caliburnproject.org"\r
         xmlns:controls="clr-namespace:HandBrakeWPF.Controls"\r
-        Background="{Binding Path=Background, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}">\r
-\r
-    <Grid VerticalAlignment="Top" HorizontalAlignment="Center">\r
-        <Grid.RowDefinitions>\r
-            <RowDefinition Height="Auto" />\r
-            <RowDefinition Height="Auto" />\r
-            <RowDefinition Height="*" />\r
-            <RowDefinition Height="Auto" />\r
-        </Grid.RowDefinitions>\r
-        \r
-        \r
-        <StackPanel Orientation="Horizontal" Grid.Row="0" Margin="5,8,0,0">\r
-            <TextBlock Text="Source Selection" FontSize="26" FontFamily="Segoe UI Light" /> \r
-        </StackPanel>\r
-\r
-        <!-- Title Specific Scan -->\r
-        <StackPanel Grid.Row="1" Orientation="Vertical" HorizontalAlignment="Left"  Margin="5,15,0,0">\r
-            <StackPanel Orientation="Horizontal">\r
-                <TextBlock Text="Optionally choose a specific title: " />\r
-\r
-                <controls:NumberBox Width="60" Height="24" Margin="10,0,0,0"\r
-                                Minimum="0" Maximum="1000" Number="{Binding TitleSpecificScan, Mode=TwoWay}" />\r
-            </StackPanel>\r
+        >\r
 \r
-            <TextBlock Text="Then choose the video(s) you'd like to encode: " Margin="0,10,0,0" />\r
-        </StackPanel>\r
+    <Grid VerticalAlignment="Stretch">\r
+        \r
+        <Grid.ColumnDefinitions>\r
+            <ColumnDefinition Width="Auto" />\r
+            <ColumnDefinition Width="*" />\r
+        </Grid.ColumnDefinitions>\r
 \r
-        <!-- Source Type -->\r
-        <Grid Grid.Row="2" HorizontalAlignment="Left" Margin="5,5,0,0">\r
-            \r
+        <Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Grid.Column="0" Width="300" Background="{Binding Path=Background, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}">\r
             <Grid.RowDefinitions>\r
+                <RowDefinition Height="Auto" />\r
+                <RowDefinition Height="Auto" />\r
                 <RowDefinition Height="Auto" />\r
                 <RowDefinition Height="Auto" />\r
                 <RowDefinition Height="*" />\r
             </Grid.RowDefinitions>\r
+            \r
+            <Grid.ColumnDefinitions>\r
+                <ColumnDefinition Width="*" />\r
+                <ColumnDefinition Width="30" />\r
+            </Grid.ColumnDefinitions>\r
 \r
-            <!-- Ctrl + R -->\r
-            <Button Grid.Row="0"  AutomationProperties.Name="Choose Folder to Scan" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" cal:Message.Attach="[Event Click] = [Action FolderScan]"\r
-                    Margin="0,0,0,7" Padding="8" HorizontalAlignment="Left">\r
-               \r
-                <StackPanel Orientation="Horizontal" MinWidth="100">\r
-                    <Image Source="../Views/Images/folder32.png" Width="32" />\r
-                    <StackPanel Orientation="Vertical">\r
-                        <TextBlock Text="Folder (Batch Scan)" VerticalAlignment="Center" Margin="5,0,0,0" />\r
-                        <TextBlock Text="Open a folder with one or more files." VerticalAlignment="Center" Margin="5,0,0,0" />\r
-                    </StackPanel>                   \r
+\r
+            <StackPanel Orientation="Horizontal" Grid.Row="0" Margin="20,8,0,0">\r
+                <TextBlock Text="Source Selection" FontSize="26" FontFamily="Segoe UI Light" />\r
+            </StackPanel>\r
+\r
+            <!-- Title Specific Scan -->\r
+            <StackPanel Grid.Row="1" Orientation="Vertical" HorizontalAlignment="Left"  Margin="20,15,0,0">\r
+                <StackPanel Orientation="Horizontal">\r
+                    <TextBlock Text="Optionally choose a specific title: " />\r
+\r
+                    <controls:NumberBox Width="60" Height="24" Margin="10,0,0,0"\r
+                                Minimum="0" Maximum="5000" Number="{Binding TitleSpecificScan, Mode=TwoWay}" />\r
                 </StackPanel>\r
-            </Button>\r
 \r
-            <!--Ctrl + F-->\r
-            <Button Grid.Row="1"  AutomationProperties.Name="Choose File to Scan" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" cal:Message.Attach="[Event Click] = [Action FileScan]"\r
+                <TextBlock Text="Then choose the video(s) you'd like to encode: " Margin="0,10,0,0" />\r
+            </StackPanel>\r
+\r
+            <!-- Source Type -->\r
+            <Grid Grid.Row="2" HorizontalAlignment="Left" Margin="20,5,0,0">\r
+\r
+                <Grid.RowDefinitions>\r
+                    <RowDefinition Height="Auto" />\r
+                    <RowDefinition Height="Auto" />\r
+                    <RowDefinition Height="*" />\r
+                </Grid.RowDefinitions>\r
+\r
+                <!-- Ctrl + R -->\r
+                <Button Grid.Row="0"  AutomationProperties.Name="Choose Folder to Scan" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" cal:Message.Attach="[Event Click] = [Action FolderScan]"\r
                     Margin="0,0,0,7" Padding="8" HorizontalAlignment="Left">\r
-                <StackPanel Orientation="Horizontal" MinWidth="100">\r
-                    <Image Source="../Views/Images/File32.png" Width="32" />\r
-                    <StackPanel Orientation="Vertical">\r
-                        <TextBlock Text="File" VerticalAlignment="Center" Margin="5,0,0,0" />\r
-                        <TextBlock Text="Open a single video file." VerticalAlignment="Center" Margin="5,0,0,0" />\r
+\r
+                    <StackPanel Orientation="Horizontal" MinWidth="100">\r
+                        <Image Source="../Views/Images/folder32.png" Width="32" />\r
+                        <StackPanel Orientation="Vertical">\r
+                            <TextBlock Text="Folder (Batch Scan)" VerticalAlignment="Center" Margin="5,0,0,0" />\r
+                            <TextBlock Text="Open a folder with one or more files." VerticalAlignment="Center" Margin="5,0,0,0" />\r
+                        </StackPanel>\r
                     </StackPanel>\r
-                </StackPanel>\r
-            </Button>\r
+                </Button>\r
 \r
-            <ListBox Grid.Row="2" ItemsSource="{Binding Drives}" Background="Transparent"  BorderThickness="0">\r
-                <ListBox.ItemTemplate>\r
-                    <DataTemplate>\r
-                        <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" \r
+                <!--Ctrl + F-->\r
+                <Button Grid.Row="1"  AutomationProperties.Name="Choose File to Scan" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" cal:Message.Attach="[Event Click] = [Action FileScan]"\r
+                    Margin="0,0,0,7" Padding="8" HorizontalAlignment="Left">\r
+                    <StackPanel Orientation="Horizontal" MinWidth="100">\r
+                        <Image Source="../Views/Images/File32.png" Width="32" />\r
+                        <StackPanel Orientation="Vertical">\r
+                            <TextBlock Text="File" VerticalAlignment="Center" Margin="5,0,0,0" />\r
+                            <TextBlock Text="Open a single video file." VerticalAlignment="Center" Margin="5,0,0,0" />\r
+                        </StackPanel>\r
+                    </StackPanel>\r
+                </Button>\r
+\r
+                <ListBox Grid.Row="2" ItemsSource="{Binding Drives}" Background="Transparent"  BorderThickness="0">\r
+                    <ListBox.ItemTemplate>\r
+                        <DataTemplate>\r
+                            <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" \r
                                 cal:Message.Attach="[Event Click] = [Action ProcessDrive($this.Tag)]"\r
                                 Margin="0,0,0,10" Padding="8" HorizontalAlignment="Left" \r
                                 Tag="{Binding}" AutomationProperties.Name="Choose Disc to Scan">\r
-                            <StackPanel Orientation="Horizontal" MinWidth="100">\r
-                                <Image Source="../Views/Images/Disc.png" Width="32" />\r
-                                <StackPanel Orientation="Vertical">\r
-                                    <TextBlock Text="{Binding Text}" VerticalAlignment="Center" Margin="5,0,0,0" />\r
-                                    <TextBlock Text="Open this DVD or Bluray Drive" VerticalAlignment="Center" Margin="5,0,0,0" />\r
+                                <StackPanel Orientation="Horizontal" MinWidth="100">\r
+                                    <Image Source="../Views/Images/Disc.png" Width="32" />\r
+                                    <StackPanel Orientation="Vertical">\r
+                                        <TextBlock Text="{Binding Text}" VerticalAlignment="Center" Margin="5,0,0,0" />\r
+                                        <TextBlock Text="Open this DVD or Bluray Drive" VerticalAlignment="Center" Margin="5,0,0,0" />\r
+                                    </StackPanel>\r
                                 </StackPanel>\r
-                            </StackPanel>\r
-                        </Button>\r
-                    </DataTemplate>\r
-                </ListBox.ItemTemplate>\r
-                \r
-            </ListBox>\r
-        </Grid>\r
+                            </Button>\r
+                        </DataTemplate>\r
+                    </ListBox.ItemTemplate>\r
 \r
-        <!-- Cancel Window -->\r
-        <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,10,2,10">\r
-            <Button cal:Message.Attach="[Event Click] = [Action CloseSourceSelection]" Content="Cancel" Padding="8,2" />\r
-        </StackPanel>\r
+                </ListBox>\r
+            </Grid>\r
+\r
+            <!-- Cancel Window -->\r
+            <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,10,2,10">\r
+                <Button cal:Message.Attach="[Event Click] = [Action CloseSourceSelection]" Content="Cancel" Padding="8,2" />\r
+            </StackPanel>\r
+\r
+        </Grid>\r
+            \r
 \r
+        <StackPanel Grid.Column="1" Background="Black" Opacity="0.45" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>\r
     </Grid>\r
 </UserControl>\r
index 4c4fbe20d8549ce86d58988daccee10918087169..62d09fa8e9ae0ba21a657de4c430f0c28e380957 100644 (file)
@@ -2,7 +2,6 @@
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"\r
              xmlns:ctr="clr-namespace:HandBrakeWPF.Controls"\r
              x:Class="HandBrakeWPF.Controls.StatusPanel"\r
-             FontFamily="S"\r
              >\r
 \r
     <UserControl.Resources>\r
index 8e365891a4a28ece65dd268e12886c15283069ae..ba311ae593945e316f241b70706d3fed01106d25 100644 (file)
         </Grid>\r
 \r
         <!-- Source Selection-->\r
-        <Controls:SourceSelection Grid.Row="1" MinWidth="300" HorizontalAlignment="Left" VerticalAlignment="Stretch" BorderThickness="1" BorderBrush="DarkGray"\r
-                                  Visibility="{Binding ShowSourceSelection, Converter={StaticResource boolToVisConverter}, TargetNullValue=Collapsed, FallbackValue=Collapsed}" Panel.ZIndex="1"\r
-                                  />\r
-\r
-\r
-        <!--<DockPanel Background="Black" Opacity="0.40" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Panel.ZIndex="0"\r
-                   Grid.Row="1"\r
-                   Visibility="{Binding ShowSourceSelection, Converter={StaticResource boolToVisConverter}, ConverterParameter=false}" />-->\r
-\r
-        <!--  StatusPanel   Height="70" -->\r
+        <Controls:SourceSelection x:Name="sourceSelection"\r
+                                  Grid.Row="0" Grid.RowSpan="3"\r
+                                  Visibility="{Binding ShowSourceSelection, Converter={StaticResource boolToVisConverter}, ConverterParameter=false, TargetNullValue=Collapsed, FallbackValue=Collapsed}"\r
+                                  VerticalAlignment="Stretch" HorizontalAlignment="Stretch"\r
+                                  Panel.ZIndex="10" />\r
+        \r
         <Controls:StatusPanel x:Name="loadingPanel"\r
                               Grid.Row="0"\r
                               Grid.RowSpan="3"\r