mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Plugin Features - Removed icons
Data model event node - Fix numeric values
This commit is contained in:
1 parent
654863e0de
commit
212f8855de
9 files changed
+60
-59
No files matched your search
@@ -25,12 +25,12 @@
|
||||
</Grid.ContextFlyout>
|
||||
|
||||
<!-- Icon column -->
|
||||
<shared:ArtemisIcon Grid.Column="0"
|
||||
Icon="{CompiledBinding FeatureInfo.ResolvedIcon}"
|
||||
Fill="False"
|
||||
Width="20"
|
||||
Height="20"
|
||||
IsVisible="{CompiledBinding LoadException, Converter={x:Static ObjectConverters.IsNull}}" />
|
||||
<avalonia:MaterialIcon Grid.Column="0"
|
||||
ToolTip.Tip="{CompiledBinding FeatureType}"
|
||||
Kind="{CompiledBinding FeatureIcon}"
|
||||
Width="20"
|
||||
Height="20"
|
||||
IsVisible="{CompiledBinding LoadException, Converter={x:Static ObjectConverters.IsNull}}" />
|
||||
|
||||
<Button Grid.Column="0"
|
||||
Classes="AppBarButton icon-button"
|
||||
|
||||
@@ -5,11 +5,17 @@ using System.Reactive;
|
||||
using System.Reactive.Disposables;
|
||||
using System.Threading.Tasks;
|
||||
using Artemis.Core;
|
||||
using Artemis.Core.DeviceProviders;
|
||||
using Artemis.Core.LayerBrushes;
|
||||
using Artemis.Core.LayerEffects;
|
||||
using Artemis.Core.Modules;
|
||||
using Artemis.Core.ScriptingProviders;
|
||||
using Artemis.Core.Services;
|
||||
using Artemis.UI.Shared;
|
||||
using Artemis.UI.Shared.Services;
|
||||
using Artemis.UI.Shared.Services.Builders;
|
||||
using Avalonia.Threading;
|
||||
using Material.Icons;
|
||||
using ReactiveUI;
|
||||
|
||||
namespace Artemis.UI.Screens.Plugins;
|
||||
@@ -90,6 +96,42 @@ public class PluginFeatureViewModel : ActivatableViewModelBase
|
||||
public bool CanRemovePrerequisites => FeatureInfo.PlatformPrerequisites.Any(p => p.UninstallActions.Any());
|
||||
public bool IsPopupEnabled => CanInstallPrerequisites || CanRemovePrerequisites;
|
||||
|
||||
public MaterialIconKind FeatureIcon
|
||||
{
|
||||
get
|
||||
{
|
||||
if (FeatureInfo.FeatureType.IsAssignableTo(typeof(DeviceProvider)))
|
||||
return MaterialIconKind.Devices;
|
||||
if (FeatureInfo.FeatureType.IsAssignableTo(typeof(Module)))
|
||||
return MaterialIconKind.VectorRectangle;
|
||||
if (FeatureInfo.FeatureType.IsAssignableTo(typeof(LayerBrushProvider)))
|
||||
return MaterialIconKind.Brush;
|
||||
if (FeatureInfo.FeatureType.IsAssignableTo(typeof(LayerEffectProvider)))
|
||||
return MaterialIconKind.AutoAwesome;
|
||||
if (FeatureInfo.FeatureType.IsAssignableTo(typeof(ScriptingProvider)))
|
||||
return MaterialIconKind.Code;
|
||||
return MaterialIconKind.Extension;
|
||||
}
|
||||
}
|
||||
|
||||
public string FeatureType
|
||||
{
|
||||
get
|
||||
{
|
||||
if (FeatureInfo.FeatureType.IsAssignableTo(typeof(DeviceProvider)))
|
||||
return "Device Provider";
|
||||
if (FeatureInfo.FeatureType.IsAssignableTo(typeof(Module)))
|
||||
return "Module";
|
||||
if (FeatureInfo.FeatureType.IsAssignableTo(typeof(LayerBrushProvider)))
|
||||
return "Layer Brush";
|
||||
if (FeatureInfo.FeatureType.IsAssignableTo(typeof(LayerEffectProvider)))
|
||||
return "Layer Effect";
|
||||
if (FeatureInfo.FeatureType.IsAssignableTo(typeof(ScriptingProvider)))
|
||||
return "Scripting Provider";
|
||||
return "Miscellaneous feature";
|
||||
}
|
||||
}
|
||||
|
||||
private void ExecuteShowLogsFolder()
|
||||
{
|
||||
try
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<shared:ArtemisIcon Icon="{CompiledBinding Info.ResolvedIcon}" Width="16" Height="16" Margin="0 0 5 0" />
|
||||
<shared:ArtemisIcon Icon="{CompiledBinding Plugin.Info.ResolvedIcon}" Width="16" Height="16" Margin="0 0 5 0" />
|
||||
<TextBlock Text="{CompiledBinding LanguageName}" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<shared:ArtemisIcon Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Grid.RowSpan="2"
|
||||
Icon="{CompiledBinding ScriptConfiguration.Script.ScriptingProvider.Info.ResolvedIcon, FallbackValue=QuestionMark}"
|
||||
Icon="{CompiledBinding ScriptConfiguration.Script.ScriptingProvider.Plugin.Info.ResolvedIcon, FallbackValue=QuestionMark}"
|
||||
Width="32 "
|
||||
Height="32"
|
||||
Margin="0 0 10 0"
|
||||
|
||||
@@ -10,7 +10,7 @@ public class ProfileModuleViewModel : ViewModelBase
|
||||
{
|
||||
Module = module;
|
||||
Name = module.Info.Name;
|
||||
Icon = module.Info.ResolvedIcon ?? MaterialIconKind.QuestionMark.ToString();
|
||||
Icon = module.Plugin.Info.ResolvedIcon ?? MaterialIconKind.QuestionMark.ToString();
|
||||
Description = module.Info.Description;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user