mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-11-27 23:19:13 +08:00
vis issue on start, fixing border
This commit is contained in:
parent
273902a6c2
commit
b5daffca55
@ -5,8 +5,6 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d"
|
||||
ActualThemeChanged="UserControl_ActualThemeChanged"
|
||||
Loaded="UserControl_Loaded"
|
||||
d:DesignHeight="300"
|
||||
d:DesignWidth="720">
|
||||
<UserControl.Resources>
|
||||
|
@ -1,50 +1,12 @@
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Media;
|
||||
|
||||
namespace PowerLauncher.UI
|
||||
{
|
||||
public sealed partial class LauncherControl : UserControl, INotifyPropertyChanged
|
||||
public sealed partial class LauncherControl : UserControl
|
||||
{
|
||||
private Brush _borderBrush;
|
||||
|
||||
public LauncherControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public Brush SolidBorderBrush
|
||||
{
|
||||
get { return _borderBrush; }
|
||||
set { Set(ref _borderBrush, value); }
|
||||
}
|
||||
|
||||
private void Set<T>(ref T storage, T value, [CallerMemberName]string propertyName = null)
|
||||
{
|
||||
if (Equals(storage, value))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
storage = value;
|
||||
OnPropertyChanged(propertyName);
|
||||
}
|
||||
|
||||
private void UserControl_ActualThemeChanged(FrameworkElement sender, object args)
|
||||
{
|
||||
SolidBorderBrush = Application.Current.Resources["SystemChromeLow"] as SolidColorBrush;
|
||||
}
|
||||
|
||||
private void UserControl_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
SolidBorderBrush = Application.Current.Resources["SystemChromeLow"] as SolidColorBrush;
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
private void OnPropertyChanged(string propertyName) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
@ -5,7 +5,6 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d"
|
||||
xmlns:ToolkitBehaviors="using:Microsoft.Toolkit.Uwp.UI.Animations.Behaviors"
|
||||
xmlns:Core="using:Microsoft.Xaml.Interactions.Core"
|
||||
xmlns:Interactivity="using:Microsoft.Xaml.Interactivity"
|
||||
xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters"
|
||||
|
@ -94,7 +94,7 @@ namespace PowerLauncher
|
||||
|
||||
_settingsWatcher = new SettingsWatcher(_settings);
|
||||
|
||||
_mainVM.MainWindowVisibility = Visibility.Visible;
|
||||
_mainVM.MainWindowVisibility = Visibility.Hidden;
|
||||
Log.Info("|App.OnStartup|End Wox startup ---------------------------------------------------- ");
|
||||
|
||||
bootTime.Stop();
|
||||
|
@ -282,7 +282,9 @@ namespace PowerLauncher
|
||||
|
||||
this.SearchBoxBorder.BorderBrush = solidBorderBrush;
|
||||
this.SearchBoxBorder.Background = solidBorderBrush;
|
||||
|
||||
this.ListBoxBorder.BorderBrush = solidBorderBrush;
|
||||
this.ListBoxBorder.Background = solidBorderBrush;
|
||||
|
||||
}
|
||||
}
|
||||
else if(e.PropertyName == "PrimaryTextColor")
|
||||
|
Loading…
Reference in New Issue
Block a user