mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Bugfix for issue #397
Wallpaper is not cached in Wox's memory, so that the wallpaper file remains unlocked
This commit is contained in:
parent
bb9684f7d3
commit
734505ee73
1 changed files with 6 additions and 1 deletions
|
|
@ -425,7 +425,12 @@ namespace Wox
|
||||||
var wallpaper = WallpaperPathRetrieval.GetWallpaperPath();
|
var wallpaper = WallpaperPathRetrieval.GetWallpaperPath();
|
||||||
if (wallpaper != null && File.Exists(wallpaper))
|
if (wallpaper != null && File.Exists(wallpaper))
|
||||||
{
|
{
|
||||||
var brush = new ImageBrush(new BitmapImage(new Uri(wallpaper)));
|
var memStream = new MemoryStream(File.ReadAllBytes(wallpaper));
|
||||||
|
var bitmap = new BitmapImage();
|
||||||
|
bitmap.BeginInit();
|
||||||
|
bitmap.StreamSource = memStream;
|
||||||
|
bitmap.EndInit();
|
||||||
|
var brush = new ImageBrush(bitmap);
|
||||||
brush.Stretch = Stretch.UniformToFill;
|
brush.Stretch = Stretch.UniformToFill;
|
||||||
PreviewPanel.Background = brush;
|
PreviewPanel.Background = brush;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue