mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-13 19:19:10 +00:00
Stop using adaptive theme. Fix #194.
This commit is contained in:
@@ -80,7 +80,6 @@ namespace QuickLook.Plugin.VideoViewer
|
||||
else
|
||||
{
|
||||
context.TitlebarAutoHide = true;
|
||||
context.Theme = Themes.Dark;
|
||||
context.TitlebarBlurVisibility = true;
|
||||
}
|
||||
}
|
||||
|
@@ -42,10 +42,10 @@
|
||||
<BlurEffect Radius="100" />
|
||||
</Rectangle.Effect>
|
||||
<Rectangle.Fill>
|
||||
<ImageBrush ImageSource="{Binding ElementName=viewerPanel, Path=CoverArt}" Stretch="UniformToFill"
|
||||
Opacity="0.9" />
|
||||
<ImageBrush ImageSource="{Binding ElementName=viewerPanel, Path=CoverArt}" Stretch="UniformToFill" />
|
||||
</Rectangle.Fill>
|
||||
</Rectangle>
|
||||
<Rectangle Grid.Column="0" Grid.ColumnSpan="2" Fill="{DynamicResource MainWindowBackground}" Opacity="0.6" />
|
||||
<Image Grid.Column="0" x:Name="imageCoverArt" Margin="20,40,20,40">
|
||||
<Image.Effect>
|
||||
<DropShadowEffect Direction="0" BlurRadius="6" Color="#FF898989" ShadowDepth="0" />
|
||||
|
@@ -237,7 +237,6 @@ namespace QuickLook.Plugin.VideoViewer
|
||||
break;
|
||||
case MediaState.Playing:
|
||||
UpdateMeta();
|
||||
DetermineTheme();
|
||||
HasVideo = mediaElement.VlcMediaPlayer.VideoTrackCount > 0;
|
||||
HasAudio = mediaElement.VlcMediaPlayer.AudioTrackCount > 0;
|
||||
IsPlaying = true;
|
||||
@@ -277,20 +276,6 @@ namespace QuickLook.Plugin.VideoViewer
|
||||
: Visibility.Visible;
|
||||
}
|
||||
|
||||
private void DetermineTheme()
|
||||
{
|
||||
if (HasVideo)
|
||||
return;
|
||||
|
||||
if (CoverArt == null)
|
||||
return;
|
||||
|
||||
using (var bitmap = new Bitmap(CoverArt.ToBitmap()))
|
||||
{
|
||||
_context.Theme = bitmap.IsDarkImage() ? Themes.Dark : Themes.Light;
|
||||
}
|
||||
}
|
||||
|
||||
private void ChangeVolume(double delta)
|
||||
{
|
||||
IsMuted = false;
|
||||
|
Reference in New Issue
Block a user