mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
About tab - Clean up XAML and fix image quality
This commit is contained in:
parent
d7f3ee1190
commit
a664cfbcad
@ -1,9 +1,10 @@
|
|||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
|
using Avalonia.ReactiveUI;
|
||||||
|
|
||||||
namespace Artemis.UI.Screens.Device
|
namespace Artemis.UI.Screens.Device
|
||||||
{
|
{
|
||||||
public partial class DeviceSettingsView : UserControl
|
public partial class DeviceSettingsView : ReactiveUserControl<DeviceSettingsViewModel>
|
||||||
{
|
{
|
||||||
public DeviceSettingsView()
|
public DeviceSettingsView()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -57,7 +57,7 @@
|
|||||||
Margin="0 0 15 0"
|
Margin="0 0 15 0"
|
||||||
IsVisible="{Binding RobertProfileImage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}">
|
IsVisible="{Binding RobertProfileImage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}">
|
||||||
<Ellipse.Fill>
|
<Ellipse.Fill>
|
||||||
<ImageBrush Source="{Binding RobertProfileImage}" />
|
<ImageBrush Source="{Binding RobertProfileImage}" BitmapInterpolationMode="HighQuality" />
|
||||||
</Ellipse.Fill>
|
</Ellipse.Fill>
|
||||||
</Ellipse>
|
</Ellipse>
|
||||||
<TextBlock Grid.Row="0" Grid.Column="1" Padding="0">
|
<TextBlock Grid.Row="0" Grid.Column="1" Padding="0">
|
||||||
@ -75,16 +75,7 @@
|
|||||||
|
|
||||||
<Separator Classes="card-separator" />
|
<Separator Classes="card-separator" />
|
||||||
|
|
||||||
<Grid>
|
<Grid RowDefinitions="*,*,*" ColumnDefinitions="Auto,*">
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition />
|
|
||||||
<RowDefinition />
|
|
||||||
<RowDefinition />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Ellipse Grid.Row="0"
|
<Ellipse Grid.Row="0"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Grid.RowSpan="3"
|
Grid.RowSpan="3"
|
||||||
@ -94,7 +85,7 @@
|
|||||||
Margin="0 0 15 0"
|
Margin="0 0 15 0"
|
||||||
IsVisible="{Binding DarthAffeProfileImage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}">
|
IsVisible="{Binding DarthAffeProfileImage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}">
|
||||||
<Ellipse.Fill>
|
<Ellipse.Fill>
|
||||||
<ImageBrush Source="{Binding DarthAffeProfileImage}" />
|
<ImageBrush Source="{Binding DarthAffeProfileImage}" BitmapInterpolationMode="HighQuality" />
|
||||||
</Ellipse.Fill>
|
</Ellipse.Fill>
|
||||||
</Ellipse>
|
</Ellipse>
|
||||||
<TextBlock Grid.Row="0" Grid.Column="1" Padding="0">
|
<TextBlock Grid.Row="0" Grid.Column="1" Padding="0">
|
||||||
@ -122,7 +113,7 @@
|
|||||||
Margin="0 0 15 0"
|
Margin="0 0 15 0"
|
||||||
IsVisible="{Binding DrMeteorProfileImage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}">
|
IsVisible="{Binding DrMeteorProfileImage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}">
|
||||||
<Ellipse.Fill>
|
<Ellipse.Fill>
|
||||||
<ImageBrush Source="{Binding DrMeteorProfileImage}" />
|
<ImageBrush Source="{Binding DrMeteorProfileImage}" BitmapInterpolationMode="HighQuality" />
|
||||||
</Ellipse.Fill>
|
</Ellipse.Fill>
|
||||||
</Ellipse>
|
</Ellipse>
|
||||||
<TextBlock Grid.Row="0" Grid.Column="1" Padding="0">
|
<TextBlock Grid.Row="0" Grid.Column="1" Padding="0">
|
||||||
@ -150,7 +141,7 @@
|
|||||||
Margin="0 0 15 0"
|
Margin="0 0 15 0"
|
||||||
IsVisible="{Binding KaiProfileImage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}">
|
IsVisible="{Binding KaiProfileImage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}">
|
||||||
<Ellipse.Fill>
|
<Ellipse.Fill>
|
||||||
<ImageBrush Source="{Binding KaiProfileImage}" />
|
<ImageBrush Source="{Binding KaiProfileImage}" BitmapInterpolationMode="HighQuality" />
|
||||||
</Ellipse.Fill>
|
</Ellipse.Fill>
|
||||||
</Ellipse>
|
</Ellipse>
|
||||||
<TextBlock Grid.Row="0" Grid.Column="1" Padding="0">
|
<TextBlock Grid.Row="0" Grid.Column="1" Padding="0">
|
||||||
@ -259,11 +250,8 @@
|
|||||||
https://unclassified.software/en/apps/netrevisiontask
|
https://unclassified.software/en/apps/netrevisiontask
|
||||||
</controls:HyperlinkButton>
|
</controls:HyperlinkButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
|
||||||
</Border>
|
</Border>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
using Artemis.Core;
|
using Artemis.Core;
|
||||||
using Artemis.UI.Exceptions;
|
using Artemis.UI.Exceptions;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
@ -18,7 +19,7 @@ public class ViewLocator : IDataTemplate
|
|||||||
|
|
||||||
// This isn't strictly required but it's super confusing (and happens to me all the time) if you implement IActivatableViewModel but forget to make your user control reactive.
|
// This isn't strictly required but it's super confusing (and happens to me all the time) if you implement IActivatableViewModel but forget to make your user control reactive.
|
||||||
// When this happens your OnActivated never gets called and it's easy to miss.
|
// When this happens your OnActivated never gets called and it's easy to miss.
|
||||||
if (data is IActivatableViewModel && type != null && !type.IsOfGenericType(typeof(ReactiveUserControl<>)))
|
if (Debugger.IsAttached && data is IActivatableViewModel && type != null && !type.IsOfGenericType(typeof(ReactiveUserControl<>)))
|
||||||
throw new ArtemisUIException($"The views of activatable view models should inherit ReactiveUserControl<T>, in this case ReactiveUserControl<{data.GetType().Name}>.");
|
throw new ArtemisUIException($"The views of activatable view models should inherit ReactiveUserControl<T>, in this case ReactiveUserControl<{data.GetType().Name}>.");
|
||||||
|
|
||||||
if (type != null)
|
if (type != null)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user