|
2 | 2 | xmlns="https://github.com/avaloniaui" |
3 | 3 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
4 | 4 | xmlns:controls="clr-namespace:StabilityMatrix.Avalonia.Controls" |
| 5 | + xmlns:converters="clr-namespace:StabilityMatrix.Avalonia.Converters" |
5 | 6 | xmlns:fluentIcons="clr-namespace:FluentIcons.Avalonia.Fluent;assembly=FluentIcons.Avalonia.Fluent" |
| 7 | + xmlns:labs="clr-namespace:Avalonia.Labs.Controls;assembly=Avalonia.Labs.Controls" |
6 | 8 | xmlns:mocks="using:StabilityMatrix.Avalonia.DesignData" |
7 | 9 | xmlns:models="clr-namespace:StabilityMatrix.Core.Models;assembly=StabilityMatrix.Core" |
8 | 10 | xmlns:sg="clr-namespace:SpacedGridControl.Avalonia;assembly=SpacedGridControl.Avalonia" |
9 | 11 | xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia" |
10 | | - xmlns:labs="clr-namespace:Avalonia.Labs.Controls;assembly=Avalonia.Labs.Controls" |
11 | | - xmlns:vendorLabs="clr-namespace:StabilityMatrix.Avalonia.Controls.VendorLabs" |
12 | | - xmlns:converters="clr-namespace:StabilityMatrix.Avalonia.Converters"> |
| 12 | + xmlns:vendorLabs="clr-namespace:StabilityMatrix.Avalonia.Controls.VendorLabs"> |
13 | 13 |
|
14 | 14 | <Design.PreviewWith> |
15 | | - <Panel Width="450" Height="600"> |
| 15 | + <Panel Width="550" Height="600"> |
16 | 16 | <StackPanel |
17 | 17 | Width="250" |
18 | | - Margin="8" |
| 18 | + Margin="64,24" |
| 19 | + HorizontalAlignment="Left" |
19 | 20 | Spacing="4"> |
20 | 21 | <controls:BetterComboBox |
21 | 22 | HorizontalAlignment="Stretch" |
|
30 | 31 | </StackPanel> |
31 | 32 | </Panel> |
32 | 33 | </Design.PreviewWith> |
33 | | - |
| 34 | + |
34 | 35 | <converters:FileUriConverter x:Key="FileUriConverter" /> |
35 | | - |
| 36 | + |
36 | 37 | <!-- ReSharper disable once Xaml.StaticResourceNotResolved --> |
37 | 38 | <ControlTheme |
38 | 39 | x:Key="BetterComboBoxItemHybridModelTheme" |
|
53 | 54 | CornerRadius="6" |
54 | 55 | IsVisible="{Binding Local.PreviewImageFullPathGlobal, Converter={x:Static StringConverters.IsNotNullOrEmpty}, FallbackValue=''}" |
55 | 56 | RenderOptions.BitmapInterpolationMode="HighQuality" |
| 57 | + RenderOptions.EdgeMode="Antialias" |
56 | 58 | Source="{Binding Local.PreviewImageFullPathGlobal, FallbackValue='', Converter={StaticResource FileUriConverter}}" |
57 | | - Stretch="UniformToFill"/> |
| 59 | + Stretch="UniformToFill" /> |
58 | 60 | <StackPanel |
59 | 61 | Grid.Column="1" |
60 | 62 | MaxWidth="300" |
|
133 | 135 | Grid.RowSpan="2" |
134 | 136 | Width="42" |
135 | 137 | Height="42" |
| 138 | + CornerRadius="20" |
136 | 139 | RenderOptions.BitmapInterpolationMode="HighQuality" |
137 | | - CornerRadius="40" |
| 140 | + RenderOptions.EdgeMode="Antialias" |
138 | 141 | Source="{Binding Local.PreviewImageFullPathGlobal, Converter={StaticResource FileUriConverter}}" |
139 | | - Stretch="UniformToFill"/> |
| 142 | + Stretch="UniformToFill" /> |
140 | 143 |
|
141 | 144 | <!-- Text --> |
142 | 145 | <sg:SpacedGrid |
|
179 | 182 | IsVisible="{Binding Local.ConfigFullPath, Converter={x:Static StringConverters.IsNotNullOrEmpty}, FallbackValue=False}" |
180 | 183 | Symbol="BeakerSettings" |
181 | 184 | ToolTip.Tip="{Binding Local.DisplayConfigFileName}" /> |
| 185 | + <Label |
| 186 | + MinHeight="0" |
| 187 | + Margin="0,0,0,0" |
| 188 | + Padding="6,0,6,0" |
| 189 | + Classes="Circle LightBlue" |
| 190 | + Content="{Binding Local.ConnectedModelInfo.BaseModel}" |
| 191 | + FontSize="10" |
| 192 | + FontWeight="SemiBold" |
| 193 | + Theme="{StaticResource TagLabel}" /> |
182 | 194 | </StackPanel> |
183 | 195 | </sg:SpacedGrid> |
184 | 196 | </sg:SpacedGrid> |
|
221 | 233 | Grid.RowSpan="2" |
222 | 234 | Width="36" |
223 | 235 | Height="36" |
224 | | - CornerRadius="60" |
| 236 | + CornerRadius="36" |
225 | 237 | RenderOptions.BitmapInterpolationMode="HighQuality" |
226 | 238 | Source="{Binding Local.PreviewImageFullPathGlobal, Converter={StaticResource FileUriConverter}}" |
227 | | - Stretch="UniformToFill"> |
228 | | - </vendorLabs:BetterAsyncImage> |
| 239 | + Stretch="UniformToFill" /> |
| 240 | + |
| 241 | + <!--<Label |
| 242 | + Grid.RowSpan="2" |
| 243 | + Theme="{StaticResource TagLabel}" |
| 244 | + Classes="Circle Solid White" |
| 245 | + VerticalAlignment="Bottom" |
| 246 | + FontSize="10" |
| 247 | + FontWeight="SemiBold" |
| 248 | + Padding="4,1" |
| 249 | + Content="{Binding Local.ConnectedModelInfo.BaseModel}"/>--> |
229 | 250 |
|
230 | 251 | <!-- Text --> |
231 | 252 | <sg:SpacedGrid |
232 | 253 | Grid.Row="1" |
233 | 254 | Grid.Column="1" |
| 255 | + ColumnDefinitions="*,Auto" |
234 | 256 | RowDefinitions="Auto,Auto" |
235 | 257 | RowSpacing="1"> |
236 | 258 |
|
237 | | - <TextBlock Text="{Binding Local.DisplayModelName}" TextTrimming="CharacterEllipsis" /> |
| 259 | + <TextBlock |
| 260 | + Grid.Row="0" |
| 261 | + Grid.Column="0" |
| 262 | + Grid.ColumnSpan="2" |
| 263 | + Text="{Binding Local.DisplayModelName}" |
| 264 | + TextTrimming="CharacterEllipsis" /> |
238 | 265 | <TextBlock |
239 | 266 | Grid.Row="1" |
| 267 | + Grid.Column="0" |
| 268 | + Grid.ColumnSpan="1" |
| 269 | + Margin="0,2,0,0" |
240 | 270 | FontSize="12" |
241 | 271 | FontWeight="Regular" |
242 | 272 | Foreground="{DynamicResource TextFillColorSecondaryBrush}" |
243 | 273 | Text="{Binding Local.DisplayModelVersion}" |
244 | 274 | TextTrimming="CharacterEllipsis" /> |
| 275 | + |
| 276 | + <!-- Badges --> |
| 277 | + <StackPanel |
| 278 | + Grid.Row="1" |
| 279 | + Grid.Column="1" |
| 280 | + HorizontalAlignment="Right" |
| 281 | + VerticalAlignment="Bottom" |
| 282 | + Orientation="Horizontal"> |
| 283 | + <fluentIcons:SymbolIcon |
| 284 | + Margin="4" |
| 285 | + FontSize="12" |
| 286 | + Foreground="{DynamicResource TextFillColorSecondaryBrush}" |
| 287 | + IsVisible="{Binding Local.ConfigFullPath, Converter={x:Static StringConverters.IsNotNullOrEmpty}, FallbackValue=False}" |
| 288 | + Symbol="BeakerSettings" |
| 289 | + ToolTip.Tip="{Binding Local.DisplayConfigFileName}" /> |
| 290 | + <Label |
| 291 | + MinHeight="0" |
| 292 | + Margin="0,0,0,0" |
| 293 | + Padding="6,0,6,0" |
| 294 | + Classes="Circle LightBlue" |
| 295 | + Content="{Binding Local.ConnectedModelInfo.BaseModel}" |
| 296 | + FontSize="10" |
| 297 | + FontWeight="SemiBold" |
| 298 | + Theme="{StaticResource TagLabel}" /> |
| 299 | + </StackPanel> |
245 | 300 | </sg:SpacedGrid> |
246 | 301 | </sg:SpacedGrid> |
247 | 302 | </DataTemplate> |
|
0 commit comments