fixed fetching configuration from root
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
using Hyperbar.Extensions;
|
||||
using Hyperbar.Windows.Interop;
|
||||
using Hyperbar.Windows.Primary;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace Hyperbar.Windows
|
||||
{
|
||||
@@ -45,11 +43,8 @@ namespace Hyperbar.Windows
|
||||
builder.Create(context, isolatedServices);
|
||||
}).Build();
|
||||
|
||||
|
||||
services.AddTransient<IWidgetContext>(provider => new WidgetContext(host.Services));
|
||||
host.Start();
|
||||
|
||||
var d = host.Services.GetService<IOptionsMonitor<PrimaryWidgetConfiguration>>();
|
||||
services.AddTransient(provider => host);
|
||||
|
||||
return services;
|
||||
}
|
||||
|
||||
@@ -9,12 +9,15 @@
|
||||
<SolidColorBrush x:Key="ButtonBorderBrushPointerOver" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="ButtonBorderBrushPressed" Color="Transparent" />
|
||||
<SolidColorBrush x:Key="ButtonBorderBrushDisabled" Color="Transparent" />
|
||||
<Thickness x:Key="ButtonPadding">0</Thickness>
|
||||
<x:Double x:Key="ButtonWidth">32</x:Double>
|
||||
<x:Double x:Key="ButtonHeight">32</x:Double>
|
||||
</UserControl.Resources>
|
||||
<Button
|
||||
Width="{StaticResource ButtonWidth}"
|
||||
Height="{StaticResource ButtonHeight}"
|
||||
Padding="0"
|
||||
Command="{Binding Click}"
|
||||
Content="{Binding Icon}" />
|
||||
Content="{Binding Icon}"
|
||||
FontFamily="{StaticResource SymbolThemeFontFamily}" />
|
||||
</UserControl>
|
||||
Reference in New Issue
Block a user