|
4 | 4 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
5 | 5 | xmlns:vm="using:OpenUtau.App.ViewModels" |
6 | 6 | x:Class="OpenUtau.App.Controls.SearchBar" Focusable="False"> |
7 | | - <Grid RowDefinitions="Auto,Auto" ColumnDefinitions="114,54,28,28,28,28" Width="280" Background="{DynamicResource SystemControlBackgroundAltHighBrush}"> |
8 | | - <!--Row 1--> |
9 | | - <TextBox Name="box" Grid.Row="0" Padding="4,3" Margin="0" Height="24" VerticalAlignment="Center" HorizontalAlignment="Stretch" |
10 | | - Background="{DynamicResource SystemControlBackgroundAltHighBrush}" |
11 | | - Text="{Binding SearchWord}" Focusable="True" Watermark="{DynamicResource pianoroll.menu.searchnote}" |
12 | | - GotFocus="Box_GotFocus" KeyDown="Box_KeyDown"/> |
13 | | - <TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding ResultCount}" Width="54" VerticalAlignment="Center" TextAlignment="Center"/> |
14 | | - <Button Grid.Row="0" Grid.Column="2" Command="{Binding SelectCommand}" CommandParameter="prev" |
15 | | - ToolTip.Tip="{DynamicResource pianoroll.menu.searchnote.prev}" |
16 | | - Width="24" Height="24" Margin="2,2,2,2" |
17 | | - Background="Transparent" BorderThickness="0"> |
18 | | - <!-- icon source: https://github.com/microsoft/vscode-icons/blob/main/icons/light/arrow-left.svg --> |
19 | | - <Path Classes="clear" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" |
20 | | - Data="M7.00024 3.0929L2.00024 8.09288L2.00024 8.79999L7.00024 13.8L7.70734 13.0929L3.56091 8.94644L14.0002 8.94644L14.0002 7.94644L3.56091 7.94644L7.70734 3.8L7.00024 3.0929Z" |
21 | | - Fill="{StaticResource NeutralAccentBrush}"> |
22 | | - <Path.RenderTransform> |
23 | | - <TransformGroup> |
24 | | - <ScaleTransform ScaleX=".75" ScaleY=".75"/> |
25 | | - <TranslateTransform X="0" Y="1"/> |
26 | | - </TransformGroup> |
27 | | - </Path.RenderTransform> |
28 | | - </Path> |
29 | | - </Button> |
30 | | - <Button Grid.Row="0" Grid.Column="3" Command="{Binding SelectCommand}" CommandParameter="next" |
31 | | - ToolTip.Tip="{DynamicResource pianoroll.menu.searchnote.next}" |
32 | | - Width="24" Height="24" Margin="2,2,2,2" |
33 | | - Background="Transparent" BorderThickness="0"> |
34 | | - <!-- icon source: https://github.com/microsoft/vscode-icons/blob/main/icons/light/arrow-right.svg --> |
35 | | - <Path Classes="clear" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" |
36 | | - Data="M9.00025 13.8871L14.0002 8.8871L14.0002 8.17999L9.00025 3.17999L8.29314 3.8871L12.4396 8.03354L2.00024 8.03354L2.00024 9.03354L12.4396 9.03354L8.29314 13.18L9.00025 13.8871Z" |
37 | | - Fill="{StaticResource NeutralAccentBrush}"> |
38 | | - <Path.RenderTransform> |
39 | | - <TransformGroup> |
40 | | - <ScaleTransform ScaleX=".75" ScaleY=".75"/> |
41 | | - <TranslateTransform X="0" Y="1"/> |
42 | | - </TransformGroup> |
43 | | - </Path.RenderTransform> |
44 | | - </Path> |
45 | | - </Button> |
46 | | - <Button Grid.Row="0" Grid.Column="4" Command="{Binding SelectCommand}" CommandParameter="all" |
47 | | - ToolTip.Tip="{DynamicResource pianoroll.menu.searchnote.all}" |
48 | | - Width="24" Height="24" Margin="2,2,2,2" |
49 | | - Background="Transparent" BorderThickness="0"> |
50 | | - <!-- icon source: https://github.com/microsoft/vscode-icons/blob/main/icons/light/new-folder.svg --> |
51 | | - <Path Classes="clear" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" |
52 | | - Data="M7.00024 3H4.00024V0H3.00024V3H0.000244141V4H3.00024V7H4.00024V4H7.00024V3ZM5.50024 7H5.00024V6H5.30024L6.10024 5.1L6.50024 5H14.0002V4H8.00024V3H14.5002L15.0002 3.5V13.5L14.5002 14H1.50024L1.00024 13.5V6.5V6V5H2.00024V6V6.5V13H14.0002V7V6H6.70024L5.90024 6.9L5.50024 7Z" |
53 | | - Fill="{StaticResource NeutralAccentBrush}"> |
54 | | - <Path.RenderTransform> |
55 | | - <TransformGroup> |
56 | | - <ScaleTransform ScaleX=".75" ScaleY=".75"/> |
57 | | - <TranslateTransform X="0" Y="1"/> |
58 | | - </TransformGroup> |
59 | | - </Path.RenderTransform> |
60 | | - </Path> |
61 | | - </Button> |
62 | | - <Button Grid.Row="0" Grid.Column="5" Click="OnClose" |
63 | | - ToolTip.Tip="{DynamicResource pianoroll.menu.searchnote.close}" |
64 | | - Width="24" Height="24" Margin="2,2,2,2" |
65 | | - Background="Transparent" BorderThickness="0"> |
66 | | - <!-- icon source: https://github.com/microsoft/vscode-icons/blob/main/icons/light/close.svg --> |
67 | | - <Path Classes="clear" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" |
68 | | - Data="M8.00028 8.70711L11.6467 12.3536L12.3538 11.6465L8.70739 8.00001L12.3538 4.35356L11.6467 3.64645L8.00028 7.2929L4.35384 3.64645L3.64673 4.35356L7.29317 8.00001L3.64673 11.6465L4.35384 12.3536L8.00028 8.70711Z" |
69 | | - Fill="{StaticResource NeutralAccentBrush}"> |
70 | | - <Path.RenderTransform> |
71 | | - <TransformGroup> |
72 | | - <ScaleTransform ScaleX=".75" ScaleY=".75"/> |
73 | | - <TranslateTransform X="0" Y="1"/> |
74 | | - </TransformGroup> |
75 | | - </Path.RenderTransform> |
76 | | - </Path> |
77 | | - </Button> |
78 | | - </Grid> |
| 7 | + <Grid RowDefinitions="Auto" ColumnDefinitions="114,28,28,54,28,28,28,28" Width="336" Background="{DynamicResource SystemControlBackgroundAltHighBrush}"> |
| 8 | + <TextBox Name="box" Padding="4,3" Margin="0" Height="24" VerticalAlignment="Center" HorizontalAlignment="Stretch" |
| 9 | + Background="{DynamicResource SystemControlBackgroundAltHighBrush}" |
| 10 | + Text="{Binding SearchWord}" Focusable="True" Watermark="{DynamicResource pianoroll.menu.searchnote}" |
| 11 | + GotFocus="Box_GotFocus" KeyDown="Box_KeyDown"/> |
| 12 | + <ToggleButton Grid.Column="1" IsChecked="{Binding CaseSensitive}" Classes="toolbar" |
| 13 | + Command="{Binding Search}" |
| 14 | + Width="24" Height="24" Margin="2,2,2,2" |
| 15 | + Background="Transparent" BorderThickness="0"> |
| 16 | + <!-- icon source: https://github.com/microsoft/vscode-icons/blob/main/icons/light/case-sensitive.svg --> |
| 17 | + <Path Classes="filled" Data="M7.49524 9.052L8.38624 11.402H9.47724L6.23724 3H5.21724L2.00024 11.402H3.09524L3.93324 9.052H7.49524ZM5.81124 4.453L5.85524 4.588L7.17324 8.162H4.25524L5.56224 4.588L5.60624 4.453L5.64424 4.297L5.67624 4.145L5.69724 4.019H5.72024L5.74424 4.145L5.77324 4.297L5.81124 4.453ZM13.7952 10.464V11.4H14.7552V7.498C14.7552 6.779 14.5752 6.226 14.2162 5.837C13.8572 5.448 13.3272 5.254 12.6282 5.254C12.4292 5.254 12.2272 5.273 12.0222 5.31C11.8172 5.347 11.6222 5.394 11.4392 5.451C11.2562 5.508 11.0912 5.569 10.9442 5.636C10.7972 5.703 10.6832 5.765 10.6012 5.824V6.808C10.8672 6.578 11.1672 6.397 11.5052 6.268C11.8432 6.139 12.1942 6.075 12.5572 6.075C12.7452 6.075 12.9152 6.103 13.0702 6.16C13.2252 6.217 13.3572 6.306 13.4662 6.427C13.5752 6.548 13.6592 6.706 13.7182 6.899C13.7772 7.092 13.8062 7.326 13.8062 7.599L11.9952 7.851C11.6512 7.898 11.3552 7.977 11.1072 8.088C10.8592 8.199 10.6542 8.339 10.4922 8.507C10.3302 8.675 10.2102 8.868 10.1322 9.087C10.0542 9.306 10.0152 9.546 10.0152 9.808C10.0152 10.054 10.0572 10.283 10.1392 10.496C10.2212 10.709 10.3422 10.893 10.5022 11.047C10.6622 11.201 10.8622 11.323 11.1002 11.413C11.3382 11.503 11.6132 11.548 11.9262 11.548C12.3282 11.548 12.6862 11.456 13.0012 11.27C13.3162 11.084 13.5732 10.816 13.7722 10.464H13.7952ZM11.6672 8.721C11.8432 8.657 12.0682 8.607 12.3412 8.572L13.8062 8.367V8.976C13.8062 9.222 13.7652 9.451 13.6832 9.664C13.6012 9.877 13.4862 10.063 13.3402 10.221C13.1942 10.379 13.0192 10.503 12.8162 10.593C12.6132 10.683 12.3902 10.728 12.1482 10.728C11.9612 10.728 11.7952 10.703 11.6532 10.652C11.5112 10.601 11.3922 10.53 11.2962 10.441C11.2002 10.352 11.1272 10.247 11.0762 10.125C11.0252 10.003 11.0002 9.873 11.0002 9.732C11.0002 9.568 11.0182 9.421 11.0552 9.292C11.0922 9.163 11.1602 9.051 11.2572 8.958C11.3542 8.865 11.4912 8.785 11.6672 8.721Z" > |
| 18 | + <Path.RenderTransform> |
| 19 | + <TransformGroup> |
| 20 | + <ScaleTransform ScaleX=".75" ScaleY=".75" /> |
| 21 | + <TranslateTransform X="0" Y="1"/> |
| 22 | + </TransformGroup> |
| 23 | + </Path.RenderTransform> |
| 24 | + </Path> |
| 25 | + </ToggleButton> |
| 26 | + <ToggleButton Grid.Column="2" IsChecked="{Binding WholeWord}" Classes="toolbar" |
| 27 | + Command="{Binding Search}" |
| 28 | + Width="24" Height="24" Margin="2,2,2,2" |
| 29 | + Background="Transparent" BorderThickness="0"> |
| 30 | + <!-- icon source: https://github.com/microsoft/vscode-icons/blob/main/icons/light/whole-word.svg --> |
| 31 | + <Path Classes="filled" Data="M1.00024 2H15.0002V3H1.00024V2ZM14.0002 4H13.0002V12H14.0002V4ZM11.2722 8.387C11.1942 8.088 11.0732 7.825 10.9122 7.601C10.7512 7.377 10.5472 7.2 10.3032 7.071C10.0592 6.942 9.76924 6.878 9.43724 6.878C9.23924 6.878 9.05724 6.902 8.89024 6.951C8.72524 7 8.57424 7.068 8.43724 7.156C8.30124 7.244 8.18024 7.35 8.07224 7.474L7.89324 7.732V4.578H7.00024V12H7.89324V11.425L8.01924 11.6C8.10624 11.702 8.20824 11.79 8.32324 11.869C8.44024 11.947 8.57224 12.009 8.72124 12.055C8.87024 12.101 9.03524 12.123 9.21924 12.123C9.57224 12.123 9.88524 12.052 10.1562 11.911C10.4282 11.768 10.6552 11.573 10.8382 11.325C11.0212 11.075 11.1592 10.782 11.2522 10.446C11.3452 10.108 11.3922 9.743 11.3922 9.349C11.3912 9.007 11.3522 8.686 11.2722 8.387ZM9.79324 7.78C9.94424 7.851 10.0752 7.956 10.1832 8.094C10.2922 8.234 10.3772 8.407 10.4382 8.611C10.4892 8.785 10.5202 8.982 10.5272 9.198L10.5202 9.323C10.5202 9.65 10.4872 9.943 10.4202 10.192C10.3532 10.438 10.2592 10.645 10.1422 10.806C10.0252 10.968 9.88224 11.091 9.72124 11.172C9.39924 11.334 8.96124 11.338 8.65224 11.187C8.49924 11.112 8.36624 11.012 8.25924 10.891C8.17424 10.795 8.10324 10.675 8.04124 10.524C8.04124 10.524 7.86224 10.077 7.86224 9.577C7.86224 9.077 8.04124 8.575 8.04124 8.575C8.10324 8.398 8.17724 8.257 8.26524 8.145C8.37924 8.002 8.52124 7.886 8.68924 7.8C8.85724 7.714 9.05424 7.671 9.27624 7.671C9.46624 7.671 9.64024 7.708 9.79324 7.78ZM15.0002 13H1.00024V14H15.0002V13ZM2.81324 10L2.08524 12.031H1.00024L1.02524 11.959L3.46624 4.87305H4.40724L6.89224 12.031H5.81024L5.03224 10H2.81324ZM3.93424 6.42205H3.91224L3.00724 9.17505H4.84824L3.93424 6.42205Z" > |
| 32 | + <Path.RenderTransform> |
| 33 | + <TransformGroup> |
| 34 | + <ScaleTransform ScaleX=".75" ScaleY=".75" /> |
| 35 | + <TranslateTransform X="0" Y="1"/> |
| 36 | + </TransformGroup> |
| 37 | + </Path.RenderTransform> |
| 38 | + </Path> |
| 39 | + </ToggleButton> |
| 40 | + <TextBlock Grid.Column="3" Text="{Binding ResultCount}" Width="54" VerticalAlignment="Center" TextAlignment="Center"/> |
| 41 | + <Button Grid.Column="4" Command="{Binding SelectCommand}" CommandParameter="prev" |
| 42 | + ToolTip.Tip="{DynamicResource pianoroll.menu.searchnote.prev}" |
| 43 | + Width="24" Height="24" Margin="2,2,2,2" |
| 44 | + Background="Transparent" BorderThickness="0"> |
| 45 | + <!-- icon source: https://github.com/microsoft/vscode-icons/blob/main/icons/light/arrow-left.svg --> |
| 46 | + <Path Classes="clear" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" |
| 47 | + Data="M7.00024 3.0929L2.00024 8.09288L2.00024 8.79999L7.00024 13.8L7.70734 13.0929L3.56091 8.94644L14.0002 8.94644L14.0002 7.94644L3.56091 7.94644L7.70734 3.8L7.00024 3.0929Z" |
| 48 | + Fill="{StaticResource NeutralAccentBrush}"> |
| 49 | + <Path.RenderTransform> |
| 50 | + <TransformGroup> |
| 51 | + <ScaleTransform ScaleX=".75" ScaleY=".75"/> |
| 52 | + <TranslateTransform X="0" Y="1"/> |
| 53 | + </TransformGroup> |
| 54 | + </Path.RenderTransform> |
| 55 | + </Path> |
| 56 | + </Button> |
| 57 | + <Button Grid.Column="5" Command="{Binding SelectCommand}" CommandParameter="next" |
| 58 | + ToolTip.Tip="{DynamicResource pianoroll.menu.searchnote.next}" |
| 59 | + Width="24" Height="24" Margin="2,2,2,2" |
| 60 | + Background="Transparent" BorderThickness="0"> |
| 61 | + <!-- icon source: https://github.com/microsoft/vscode-icons/blob/main/icons/light/arrow-right.svg --> |
| 62 | + <Path Classes="clear" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" |
| 63 | + Data="M9.00025 13.8871L14.0002 8.8871L14.0002 8.17999L9.00025 3.17999L8.29314 3.8871L12.4396 8.03354L2.00024 8.03354L2.00024 9.03354L12.4396 9.03354L8.29314 13.18L9.00025 13.8871Z" |
| 64 | + Fill="{StaticResource NeutralAccentBrush}"> |
| 65 | + <Path.RenderTransform> |
| 66 | + <TransformGroup> |
| 67 | + <ScaleTransform ScaleX=".75" ScaleY=".75"/> |
| 68 | + <TranslateTransform X="0" Y="1"/> |
| 69 | + </TransformGroup> |
| 70 | + </Path.RenderTransform> |
| 71 | + </Path> |
| 72 | + </Button> |
| 73 | + <Button Grid.Column="6" Command="{Binding SelectCommand}" CommandParameter="all" |
| 74 | + ToolTip.Tip="{DynamicResource pianoroll.menu.searchnote.all}" |
| 75 | + Width="24" Height="24" Margin="2,2,2,2" |
| 76 | + Background="Transparent" BorderThickness="0"> |
| 77 | + <!-- icon source: https://github.com/microsoft/vscode-icons/blob/main/icons/light/new-folder.svg --> |
| 78 | + <Path Classes="clear" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" |
| 79 | + Data="M7.00024 3H4.00024V0H3.00024V3H0.000244141V4H3.00024V7H4.00024V4H7.00024V3ZM5.50024 7H5.00024V6H5.30024L6.10024 5.1L6.50024 5H14.0002V4H8.00024V3H14.5002L15.0002 3.5V13.5L14.5002 14H1.50024L1.00024 13.5V6.5V6V5H2.00024V6V6.5V13H14.0002V7V6H6.70024L5.90024 6.9L5.50024 7Z" |
| 80 | + Fill="{StaticResource NeutralAccentBrush}"> |
| 81 | + <Path.RenderTransform> |
| 82 | + <TransformGroup> |
| 83 | + <ScaleTransform ScaleX=".75" ScaleY=".75"/> |
| 84 | + <TranslateTransform X="0" Y="1"/> |
| 85 | + </TransformGroup> |
| 86 | + </Path.RenderTransform> |
| 87 | + </Path> |
| 88 | + </Button> |
| 89 | + <Button Grid.Column="7" Click="OnClose" |
| 90 | + ToolTip.Tip="{DynamicResource pianoroll.menu.searchnote.close}" |
| 91 | + Width="24" Height="24" Margin="2,2,2,2" |
| 92 | + Background="Transparent" BorderThickness="0"> |
| 93 | + <!-- icon source: https://github.com/microsoft/vscode-icons/blob/main/icons/light/close.svg --> |
| 94 | + <Path Classes="clear" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" |
| 95 | + Data="M8.00028 8.70711L11.6467 12.3536L12.3538 11.6465L8.70739 8.00001L12.3538 4.35356L11.6467 3.64645L8.00028 7.2929L4.35384 3.64645L3.64673 4.35356L7.29317 8.00001L3.64673 11.6465L4.35384 12.3536L8.00028 8.70711Z" |
| 96 | + Fill="{StaticResource NeutralAccentBrush}"> |
| 97 | + <Path.RenderTransform> |
| 98 | + <TransformGroup> |
| 99 | + <ScaleTransform ScaleX=".75" ScaleY=".75"/> |
| 100 | + <TranslateTransform X="0" Y="1"/> |
| 101 | + </TransformGroup> |
| 102 | + </Path.RenderTransform> |
| 103 | + </Path> |
| 104 | + </Button> |
| 105 | + </Grid> |
| 106 | + |
79 | 107 | </UserControl> |
0 commit comments