mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Settings - Brought the with and margins of different tabs in line with eachother
Settings - Tweaked card title font size and spacing Plugins - Show extra information on plugins in their config dialog Plugins - Added the ability to provide a license in plugin.json
This commit is contained in:
1 parent
a76ecec97d
commit
c86dba30fc
15 files changed
+146
-73
No files matched your search
@@ -43,30 +43,18 @@ public partial class ArtemisIcon : UserControl
|
||||
// If it's a string there are several options
|
||||
else if (Icon is string iconString)
|
||||
{
|
||||
// An URI pointing to an image
|
||||
if (ImageRegex.IsMatch(iconString))
|
||||
{
|
||||
Image image = new() {Source = new Bitmap(iconString), VerticalAlignment = VerticalAlignment.Stretch, HorizontalAlignment = HorizontalAlignment.Stretch};
|
||||
RenderOptions.SetBitmapInterpolationMode(image, BitmapInterpolationMode.HighQuality);
|
||||
Content = image;
|
||||
}
|
||||
// An enum defined as a string
|
||||
if (Enum.TryParse(iconString, true, out MaterialIconKind parsedIcon))
|
||||
else if (Enum.TryParse(iconString, true, out MaterialIconKind parsedIcon))
|
||||
{
|
||||
Content = new MaterialIcon {Kind = parsedIcon, Width = Bounds.Width, Height = Bounds.Height};
|
||||
}
|
||||
// An URI pointing to an image
|
||||
else if (ImageRegex.IsMatch(iconString))
|
||||
{
|
||||
if (!Fill)
|
||||
Content = new Image
|
||||
{
|
||||
Source = new Bitmap(iconString),
|
||||
VerticalAlignment = VerticalAlignment.Stretch,
|
||||
HorizontalAlignment = HorizontalAlignment.Stretch
|
||||
};
|
||||
else
|
||||
Content = new Border
|
||||
{
|
||||
Background = TextElement.GetForeground(this),
|
||||
VerticalAlignment = VerticalAlignment.Stretch,
|
||||
HorizontalAlignment = HorizontalAlignment.Stretch,
|
||||
OpacityMask = new ImageBrush(new Bitmap(iconString))
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
Content = new MaterialIcon {Kind = MaterialIconKind.QuestionMark, Width = Bounds.Width, Height = Bounds.Height};
|
||||
@@ -87,10 +75,10 @@ public partial class ArtemisIcon : UserControl
|
||||
contentControl.Height = Bounds.Height;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void OnPropertyChanged(object? sender, AvaloniaPropertyChangedEventArgs e)
|
||||
{
|
||||
if (e.Property == IconProperty || e.Property == FillProperty)
|
||||
if (e.Property == IconProperty)
|
||||
Update();
|
||||
}
|
||||
|
||||
@@ -119,21 +107,5 @@ public partial class ArtemisIcon : UserControl
|
||||
set => SetValue(IconProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a boolean indicating whether or not the icon should be filled in with the primary text color of the
|
||||
/// theme
|
||||
/// </summary>
|
||||
public static readonly StyledProperty<bool> FillProperty = AvaloniaProperty.Register<ArtemisIcon, bool>(nameof(Icon));
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a boolean indicating whether or not the icon should be filled in with the primary text color of the
|
||||
/// theme
|
||||
/// </summary>
|
||||
public bool Fill
|
||||
{
|
||||
get => GetValue(FillProperty);
|
||||
set => SetValue(FillProperty, value);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -33,4 +33,5 @@
|
||||
<StyleInclude Source="/Styles/Notifications.axaml" />
|
||||
<StyleInclude Source="/Styles/NumberBox.axaml" />
|
||||
<StyleInclude Source="/Styles/TreeView.axaml" />
|
||||
<StyleInclude Source="/Styles/Plugins.axaml" />
|
||||
</Styles>
|
||||
@@ -0,0 +1,5 @@
|
||||
<Styles xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Style Selector=":is(Control).plugin-introduction">
|
||||
<Setter Property="Margin" Value="0 25 0 0" />
|
||||
</Style>
|
||||
</Styles>
|
||||
@@ -45,4 +45,9 @@
|
||||
<Style Selector="TextBlock.subtitle">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextFillColorTertiaryBrush}" />
|
||||
</Style>
|
||||
<Style Selector="TextBlock.card-title">
|
||||
<Setter Property="FontSize" Value="15" />
|
||||
<Setter Property="FontWeight" Value="Medium" />
|
||||
<Setter Property="Margin" Value="0 25 0 5" />
|
||||
</Style>
|
||||
</Styles>
|
||||
Reference in new issue
Block a user