mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Remove RefreshFrameAsync since ChangeTheme calls this function
This commit is contained in:
parent
bac14fa7ff
commit
dd210ad419
3 changed files with 6 additions and 7 deletions
|
|
@ -433,7 +433,7 @@ namespace Flow.Launcher.Core.Resource
|
|||
|
||||
BlurEnabled = IsBlurTheme();
|
||||
|
||||
// Can only apply blur but here also apply drop shadow effect to avoid possible drop shadow effect issues
|
||||
// Apply blur and drop shadow effect so that we do not need to call it again
|
||||
_ = RefreshFrameAsync();
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -367,8 +367,10 @@ namespace Flow.Launcher.Plugin
|
|||
/// Set the current theme
|
||||
/// </summary>
|
||||
/// <param name="theme"></param>
|
||||
/// <returns></returns>
|
||||
public void SetCurrentTheme(ThemeData theme);
|
||||
/// <returns>
|
||||
/// True if the theme is set successfully, false otherwise.
|
||||
/// </returns>
|
||||
public bool SetCurrentTheme(ThemeData theme);
|
||||
|
||||
/// Load image from path. Support local, remote and data:image url.
|
||||
/// If image path is missing, it will return a missing icon.
|
||||
|
|
|
|||
|
|
@ -377,11 +377,8 @@ namespace Flow.Launcher
|
|||
|
||||
public ThemeData GetCurrentTheme() => Theme.GetCurrentTheme();
|
||||
|
||||
public void SetCurrentTheme(ThemeData theme)
|
||||
{
|
||||
public bool SetCurrentTheme(ThemeData theme) =>
|
||||
Theme.ChangeTheme(theme.FileNameWithoutExtension);
|
||||
_ = _theme.RefreshFrameAsync();
|
||||
}
|
||||
|
||||
public ValueTask<ImageSource> LoadImageAsync(string path, bool loadFullImage = false, bool cacheImage = true) =>
|
||||
ImageLoader.LoadAsync(path, loadFullImage, cacheImage);
|
||||
|
|
|
|||
Loading…
Reference in a new issue