|
| 1 | +<Styles |
| 2 | + xmlns="https://github.com/avaloniaui" |
| 3 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 4 | + xmlns:controls="using:LLCOM.Controls" |
| 5 | + xmlns:services="clr-namespace:LLCOM.Services"> |
| 6 | + <Design.PreviewWith> |
| 7 | + <Panel Background="LightSalmon"> |
| 8 | + <StackPanel |
| 9 | + Width="250" |
| 10 | + Margin="5" |
| 11 | + Spacing="2"> |
| 12 | + <TerminalColorPriview MainColor="{x:Static services:TerminalColorSchemes.Campbell_Powershell}" /> |
| 13 | + <TerminalColorPriview MainColor="{x:Static services:TerminalColorSchemes.One_Half_Dark}" /> |
| 14 | + <TerminalColorPriview MainColor="{x:Static services:TerminalColorSchemes.Campbell}" /> |
| 15 | + <TerminalColorPriview MainColor="{x:Static services:TerminalColorSchemes.One_Half_Light}" /> |
| 16 | + <TerminalColorPriview MainColor="{x:Static services:TerminalColorSchemes.IBM_5153}" /> |
| 17 | + <TerminalColorPriview MainColor="{x:Static services:TerminalColorSchemes.Tango_Light}" /> |
| 18 | + </StackPanel> |
| 19 | + </Panel> |
| 20 | + </Design.PreviewWith> |
| 21 | + |
| 22 | + <Style Selector="Border.PreviewSquare"> |
| 23 | + <Setter Property="CornerRadius" Value="1" /> |
| 24 | + <Setter Property="Margin" Value="1.2 1.1 0 0" /> |
| 25 | + </Style> |
| 26 | + <Style Selector="controls|TerminalColorPriview"> |
| 27 | + <!-- Set Defaults --> |
| 28 | + <Setter Property="Template"> |
| 29 | + <ControlTemplate> |
| 30 | + <Border |
| 31 | + Height="30" |
| 32 | + MinWidth="200" |
| 33 | + Background="{Binding MainColor.Background, RelativeSource={RelativeSource TemplatedParent}}" |
| 34 | + CornerRadius="4"> |
| 35 | + <Grid ColumnDefinitions="Auto *"> |
| 36 | + <TextBlock |
| 37 | + Grid.Column="1" |
| 38 | + Margin="5,0,0,0" |
| 39 | + VerticalAlignment="Center" |
| 40 | + FontFamily="{Binding TerminalFontFamily, Source={x:Static services:Utils.Setting}}" |
| 41 | + Foreground="{Binding MainColor.Foreground, RelativeSource={RelativeSource TemplatedParent}}" |
| 42 | + Text="{Binding MainColor.Name, RelativeSource={RelativeSource TemplatedParent}}" /> |
| 43 | + <Grid |
| 44 | + Margin="5,0,0,0" |
| 45 | + VerticalAlignment="Center" |
| 46 | + ColumnDefinitions="9 9 9 9 9 9 9 9" |
| 47 | + RowDefinitions="9 9"> |
| 48 | + <Border |
| 49 | + Grid.Row="0" |
| 50 | + Grid.Column="0" |
| 51 | + Background="{Binding MainColor.Code40, RelativeSource={RelativeSource TemplatedParent}}" |
| 52 | + Classes="PreviewSquare" /> |
| 53 | + <Border |
| 54 | + Grid.Row="0" |
| 55 | + Grid.Column="1" |
| 56 | + Background="{Binding MainColor.Code41, RelativeSource={RelativeSource TemplatedParent}}" |
| 57 | + Classes="PreviewSquare" /> |
| 58 | + <Border |
| 59 | + Grid.Row="0" |
| 60 | + Grid.Column="2" |
| 61 | + Background="{Binding MainColor.Code42, RelativeSource={RelativeSource TemplatedParent}}" |
| 62 | + Classes="PreviewSquare" /> |
| 63 | + <Border |
| 64 | + Grid.Row="0" |
| 65 | + Grid.Column="3" |
| 66 | + Background="{Binding MainColor.Code43, RelativeSource={RelativeSource TemplatedParent}}" |
| 67 | + Classes="PreviewSquare" /> |
| 68 | + <Border |
| 69 | + Grid.Row="0" |
| 70 | + Grid.Column="4" |
| 71 | + Background="{Binding MainColor.Code44, RelativeSource={RelativeSource TemplatedParent}}" |
| 72 | + Classes="PreviewSquare" /> |
| 73 | + <Border |
| 74 | + Grid.Row="0" |
| 75 | + Grid.Column="5" |
| 76 | + Background="{Binding MainColor.Code45, RelativeSource={RelativeSource TemplatedParent}}" |
| 77 | + Classes="PreviewSquare" /> |
| 78 | + <Border |
| 79 | + Grid.Row="0" |
| 80 | + Grid.Column="6" |
| 81 | + Background="{Binding MainColor.Code46, RelativeSource={RelativeSource TemplatedParent}}" |
| 82 | + Classes="PreviewSquare" /> |
| 83 | + <Border |
| 84 | + Grid.Row="0" |
| 85 | + Grid.Column="7" |
| 86 | + Background="{Binding MainColor.Code47, RelativeSource={RelativeSource TemplatedParent}}" |
| 87 | + Classes="PreviewSquare" /> |
| 88 | + <Border |
| 89 | + Grid.Row="1" |
| 90 | + Grid.Column="0" |
| 91 | + Background="{Binding MainColor.Code30, RelativeSource={RelativeSource TemplatedParent}}" |
| 92 | + Classes="PreviewSquare" /> |
| 93 | + <Border |
| 94 | + Grid.Row="1" |
| 95 | + Grid.Column="1" |
| 96 | + Background="{Binding MainColor.Code31, RelativeSource={RelativeSource TemplatedParent}}" |
| 97 | + Classes="PreviewSquare" /> |
| 98 | + <Border |
| 99 | + Grid.Row="1" |
| 100 | + Grid.Column="2" |
| 101 | + Background="{Binding MainColor.Code32, RelativeSource={RelativeSource TemplatedParent}}" |
| 102 | + Classes="PreviewSquare" /> |
| 103 | + <Border |
| 104 | + Grid.Row="1" |
| 105 | + Grid.Column="3" |
| 106 | + Background="{Binding MainColor.Code33, RelativeSource={RelativeSource TemplatedParent}}" |
| 107 | + Classes="PreviewSquare" /> |
| 108 | + <Border |
| 109 | + Grid.Row="1" |
| 110 | + Grid.Column="4" |
| 111 | + Background="{Binding MainColor.Code34, RelativeSource={RelativeSource TemplatedParent}}" |
| 112 | + Classes="PreviewSquare" /> |
| 113 | + <Border |
| 114 | + Grid.Row="1" |
| 115 | + Grid.Column="5" |
| 116 | + Background="{Binding MainColor.Code35, RelativeSource={RelativeSource TemplatedParent}}" |
| 117 | + Classes="PreviewSquare" /> |
| 118 | + <Border |
| 119 | + Grid.Row="1" |
| 120 | + Grid.Column="6" |
| 121 | + Background="{Binding MainColor.Code36, RelativeSource={RelativeSource TemplatedParent}}" |
| 122 | + Classes="PreviewSquare" /> |
| 123 | + <Border |
| 124 | + Grid.Row="1" |
| 125 | + Grid.Column="7" |
| 126 | + Background="{Binding MainColor.Code37, RelativeSource={RelativeSource TemplatedParent}}" |
| 127 | + Classes="PreviewSquare" /> |
| 128 | + </Grid> |
| 129 | + </Grid> |
| 130 | + </Border> |
| 131 | + </ControlTemplate> |
| 132 | + </Setter> |
| 133 | + </Style> |
| 134 | +</Styles> |
0 commit comments