mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-11 17:59:17 +00:00
dark theme; wip videopleyer
This commit is contained in:
@@ -69,6 +69,8 @@ namespace QuickLook.Plugin.VideoViewer
|
||||
windowSize.Height = Math.Max(def.Height, windowSize.Height);
|
||||
|
||||
context.SetPreferredSizeFit(windowSize, 0.6);
|
||||
context.UseDarkTheme = true;
|
||||
context.TitlebarOverlap = true;
|
||||
}
|
||||
|
||||
public void View(string path, ContextObject context)
|
||||
|
@@ -1,31 +1,51 @@
|
||||
<!--
|
||||
This file is a part of unosquare/ffmediaelement project: <https://github.com/unosquare/ffmediaelement>
|
||||
-->
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Style x:Key="ControlButtonStyle" TargetType="Grid">
|
||||
<Setter Property="Height" Value="35" />
|
||||
<Setter Property="Width" Value="35" />
|
||||
<SolidColorBrush x:Key="CaptionButtonIconForeground" Color="#E5EFEFEF" />
|
||||
<SolidColorBrush x:Key="CaptionButtonHoverBackground" Color="#22FFFFFF" />
|
||||
<SolidColorBrush x:Key="CaptionButtonPressBackground" Color="#44FFFFFF" />
|
||||
|
||||
<Style x:Key="CaptionButtonBaseStyle" TargetType="Button">
|
||||
<Setter Property="Focusable" Value="False" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource CaptionButtonIconForeground}" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="CaptionButtonStyle" TargetType="Button" BasedOn="{StaticResource CaptionButtonBaseStyle}">
|
||||
<Setter Property="Width" Value="32" />
|
||||
<Setter Property="Height" Value="32" />
|
||||
<Setter Property="Padding" Value="9,9,9,9" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border Background="{TemplateBinding Background}" BorderThickness="0"
|
||||
Padding="{TemplateBinding Padding}">
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="#22FFFFFF" />
|
||||
<Setter Property="Background" Value="{DynamicResource CaptionButtonHoverBackground}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="Background" Value="{DynamicResource CaptionButtonPressBackground}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<SolidColorBrush x:Key="CustomSliderForegroundBrush" Color="#FFEFEFEF" />
|
||||
<SolidColorBrush x:Key="CustomSliderBackgroundBrush" Color="#55ffffff" />
|
||||
<SolidColorBrush x:Key="CustomSliderBackgroundBrush" Color="#EE000000" />
|
||||
<SolidColorBrush x:Key="CustomSliderHighlightBrush" Color="#FFEFEFEF" />
|
||||
|
||||
<!-- Postion Slider Control -->
|
||||
<ControlTemplate x:Key="PositionSliderThumbTemplate" TargetType="{x:Type Thumb}">
|
||||
<Grid HorizontalAlignment="Center" UseLayoutRounding="True" VerticalAlignment="Center">
|
||||
<Path x:Name="grip" Data="M 0,0 A 180,180 180 1 1 1,1 Z" Fill="Transparent" Stretch="Fill"
|
||||
Stroke="{StaticResource CustomSliderForegroundBrush}" StrokeThickness="2.5" UseLayoutRounding="True"
|
||||
Stroke="{StaticResource CustomSliderForegroundBrush}" StrokeThickness="1" UseLayoutRounding="True"
|
||||
VerticalAlignment="Center"
|
||||
Margin="-1,-1" />
|
||||
</Grid>
|
||||
@@ -49,12 +69,12 @@
|
||||
<RowDefinition Height="{TemplateBinding MinHeight}" />
|
||||
</Grid.RowDefinitions>
|
||||
<DockPanel LastChildFill="True">
|
||||
<Border ClipToBounds="True" x:Name="PART_SelectionRange" Height="3" Visibility="Visible">
|
||||
<Border ClipToBounds="True" x:Name="PART_SelectionRange" Height="1" Visibility="Visible">
|
||||
<Rectangle RadiusX="1" RadiusY="1" Margin="10,0,-10,0"
|
||||
Fill="{StaticResource CustomSliderForegroundBrush}" />
|
||||
</Border>
|
||||
<Border ClipToBounds="True" Height="3" Visibility="Visible">
|
||||
<Rectangle RadiusX="1" RadiusY="1" Margin="20,0,10,0"
|
||||
<Border ClipToBounds="True" Height="1" Visibility="Visible">
|
||||
<Rectangle RadiusX="1" RadiusY="1" Margin="10,0,10,0"
|
||||
Fill="{StaticResource CustomSliderBackgroundBrush}" />
|
||||
</Border>
|
||||
</DockPanel>
|
||||
@@ -73,10 +93,11 @@
|
||||
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
<Setter Property="MinHeight" Value="20" />
|
||||
<Setter Property="MaxHeight" Value="20" />
|
||||
<Setter Property="Height" Value="20" />
|
||||
<Setter Property="MinHeight" Value="10" />
|
||||
<Setter Property="MaxHeight" Value="10" />
|
||||
<Setter Property="Height" Value="10" />
|
||||
<Setter Property="Minimum" Value="0" />
|
||||
<Setter Property="Focusable" Value="False" />
|
||||
<Setter Property="AutoToolTipPlacement" Value="None" />
|
||||
<Setter Property="IsMoveToPointEnabled" Value="True" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
|
@@ -6,9 +6,9 @@
|
||||
xmlns:fa="http://schemas.fontawesome.io/icons/"
|
||||
xmlns:vlc="clr-namespace:Meta.Vlc.Wpf;assembly=Meta.Vlc.Wpf"
|
||||
xmlns:local="clr-namespace:QuickLook.Plugin.VideoViewer"
|
||||
xmlns:glassLayer="clr-namespace:QuickLook.Controls.GlassLayer;assembly=QuickLook"
|
||||
mc:Ignorable="d"
|
||||
x:Name="viewerPanel"
|
||||
Background="#CC4E4E4E"
|
||||
d:DesignHeight="450" d:DesignWidth="450">
|
||||
<Grid>
|
||||
<Grid.Resources>
|
||||
@@ -43,128 +43,48 @@
|
||||
</Image.Style>
|
||||
</Image>
|
||||
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Height="100">
|
||||
<Grid.Background>
|
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
|
||||
<GradientStop Offset="0.0" Color="#00000000" />
|
||||
<GradientStop Offset="0.25" Color="#66000000" />
|
||||
<GradientStop Offset="1" Color="#D6000000" />
|
||||
</LinearGradientBrush>
|
||||
</Grid.Background>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="30" />
|
||||
<RowDefinition Height="75" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.Style>
|
||||
<Style TargetType="{x:Type Grid}">
|
||||
<Style.Triggers>
|
||||
<MultiDataTrigger>
|
||||
<MultiDataTrigger.Conditions>
|
||||
<Condition Binding="{Binding Path=IsMouseOver, RelativeSource={RelativeSource Self}}"
|
||||
Value="True" />
|
||||
<Condition Binding="{Binding HasVideo, ElementName=viewerPanel}" Value="True" />
|
||||
</MultiDataTrigger.Conditions>
|
||||
<MultiDataTrigger.EnterActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="1"
|
||||
Duration="0:0:0.2" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</MultiDataTrigger.EnterActions>
|
||||
<MultiDataTrigger.ExitActions>
|
||||
<BeginStoryboard>
|
||||
<Storyboard>
|
||||
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="0"
|
||||
Duration="0:0:0.2" />
|
||||
</Storyboard>
|
||||
</BeginStoryboard>
|
||||
</MultiDataTrigger.ExitActions>
|
||||
</MultiDataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Grid.Style>
|
||||
|
||||
<Slider Grid.Row="1" x:Name="sliderProgress" Style="{StaticResource PositionSliderStyle}"
|
||||
SmallChange="0.00001" LargeChange="0.01" Maximum="1"
|
||||
Value="{Binding Position, ElementName=mediaElement}" />
|
||||
|
||||
<Grid Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="149" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Grid.Column="0" VerticalAlignment="Center" Orientation="Horizontal" Margin="10,0,0,0">
|
||||
<StackPanel.Style>
|
||||
<Style TargetType="StackPanel">
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding HasAudio, ElementName=viewerPanel}" Value="False">
|
||||
<Setter Property="Visibility" Value="Hidden" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</StackPanel.Style>
|
||||
<Grid x:Name="buttonMute" Style="{StaticResource ControlButtonStyle}">
|
||||
<fa:ImageAwesome Height="23" Width="23" Foreground="#FFEFEFEF">
|
||||
<fa:ImageAwesome.Style>
|
||||
<Style TargetType="fa:ImageAwesome">
|
||||
<Setter Property="Icon" Value="VolumeOff" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsMuted, ElementName=viewerPanel}"
|
||||
Value="False">
|
||||
<Setter Property="Icon" Value="VolumeUp" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</fa:ImageAwesome.Style>
|
||||
</fa:ImageAwesome>
|
||||
</Grid>
|
||||
<Slider Style="{StaticResource CustomSliderStyle}" Width="75" Maximum="100"
|
||||
Value="{Binding Volume, ElementName=mediaElement}"
|
||||
Visibility="{Binding IsMuted, ElementName=viewerPanel, Converter={StaticResource BooleanToVisibilityHiddenConverter}}"
|
||||
BorderThickness="0,0,5,0" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Grid x:Name="buttonBackward" Style="{StaticResource ControlButtonStyle}">
|
||||
<fa:ImageAwesome Icon="Backward" Height="23" Width="23" Foreground="#FFEFEFEF" />
|
||||
</Grid>
|
||||
<Grid Width="3" />
|
||||
<Grid x:Name="buttonPlayPause" Style="{StaticResource ControlButtonStyle}">
|
||||
<fa:ImageAwesome Height="23" Width="23" Foreground="#FFEFEFEF">
|
||||
<fa:ImageAwesome.Style>
|
||||
<Style>
|
||||
<Setter Property="fa:ImageAwesome.Icon" Value="Pause" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsPlaying, ElementName=viewerPanel}"
|
||||
Value="False">
|
||||
<Setter Property="fa:ImageAwesome.Icon" Value="Play" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</fa:ImageAwesome.Style>
|
||||
</fa:ImageAwesome>
|
||||
</Grid>
|
||||
<Grid Width="3" />
|
||||
<Grid x:Name="buttonStop" Style="{StaticResource ControlButtonStyle}">
|
||||
<fa:ImageAwesome Icon="Stop" Height="21" Width="21" Foreground="#FFEFEFEF" />
|
||||
</Grid>
|
||||
<Grid Width="3" />
|
||||
<Grid x:Name="buttonForward" Style="{StaticResource ControlButtonStyle}">
|
||||
<fa:ImageAwesome Icon="Forward" Height="23" Width="23" Foreground="#FFEFEFEF" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Center"
|
||||
Orientation="Horizontal" Margin="0,0,10,0">
|
||||
<TextBlock FontSize="14" Foreground="#FFEFEFEF"
|
||||
Text="{Binding Time, StringFormat=hh\\:mm\\:ss, ElementName=mediaElement}" />
|
||||
<TextBlock FontSize="14" Text=" / " Foreground="#FFEFEFEF" />
|
||||
<TextBlock FontSize="14" Foreground="#FFEFEFEF"
|
||||
Text="{Binding Length, StringFormat=hh\\:mm\\:ss, ElementName=mediaElement}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Height="32">
|
||||
<glassLayer:GlassLayer BlurredElement="{Binding ElementName=mediaElement}" OverlayColor="#FF3B3B3B" />
|
||||
<DockPanel>
|
||||
<Button x:Name="buttonPlayPause" Style="{StaticResource CaptionButtonStyle}" DockPanel.Dock="Left">
|
||||
<fa:ImageAwesome Foreground="{DynamicResource CaptionButtonIconForeground}">
|
||||
<fa:ImageAwesome.Style>
|
||||
<Style>
|
||||
<Setter Property="fa:ImageAwesome.Icon" Value="Pause" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsPlaying, ElementName=viewerPanel}"
|
||||
Value="False">
|
||||
<Setter Property="fa:ImageAwesome.Icon" Value="Play" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</fa:ImageAwesome.Style>
|
||||
</fa:ImageAwesome>
|
||||
</Button>
|
||||
<Button x:Name="buttonMute" Style="{StaticResource CaptionButtonStyle}" DockPanel.Dock="Right">
|
||||
<fa:ImageAwesome Icon="VolumeUp" Foreground="{DynamicResource CaptionButtonIconForeground}">
|
||||
<fa:ImageAwesome.Style>
|
||||
<Style TargetType="fa:ImageAwesome">
|
||||
<Setter Property="Icon" Value="VolumeOff" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsMuted, ElementName=viewerPanel}"
|
||||
Value="False">
|
||||
<Setter Property="Icon" Value="VolumeUp" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</fa:ImageAwesome.Style>
|
||||
</fa:ImageAwesome>
|
||||
</Button>
|
||||
<Button Width="Auto" Style="{StaticResource CaptionButtonStyle}" DockPanel.Dock="Right">
|
||||
<TextBlock DockPanel.Dock="Right" VerticalAlignment="Center" FontSize="11"
|
||||
Foreground="{DynamicResource CaptionButtonIconForeground}"
|
||||
Text="{Binding Time, StringFormat=hh\\:mm\\:ss, ElementName=mediaElement}"/>
|
||||
</Button>
|
||||
<Slider x:Name="sliderProgress" Style="{StaticResource PositionSliderStyle}"
|
||||
SmallChange="0.00001" LargeChange="0.01" Maximum="1"
|
||||
Value="{Binding Position, ElementName=mediaElement}" />
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
@@ -60,9 +60,6 @@ namespace QuickLook.Plugin.VideoViewer
|
||||
// buttonMute.Visibility = Visibility.Collapsed;
|
||||
//};
|
||||
buttonMute.MouseLeftButtonUp += (sender, e) => IsMuted = !IsMuted;
|
||||
buttonStop.MouseLeftButtonUp += PlayerStop;
|
||||
buttonBackward.MouseLeftButtonUp += (sender, e) => Seek(TimeSpan.FromSeconds(-10));
|
||||
buttonForward.MouseLeftButtonUp += (sender, e) => Seek(TimeSpan.FromSeconds(10));
|
||||
|
||||
sliderProgress.PreviewMouseDown += (sender, e) =>
|
||||
{
|
||||
|
@@ -1,103 +0,0 @@
|
||||
// Copyright © 2017 Paddy Xu
|
||||
//
|
||||
// This file is part of QuickLook program.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using System.Windows.Markup;
|
||||
|
||||
namespace QuickLook.Actions
|
||||
{
|
||||
[ContentProperty("Actions")]
|
||||
public class ConditionalEventTrigger : FrameworkContentElement
|
||||
{
|
||||
public static readonly DependencyProperty ConditionProperty =
|
||||
DependencyProperty.Register("Condition", typeof(bool), typeof(ConditionalEventTrigger));
|
||||
|
||||
public static readonly DependencyProperty TriggersProperty = DependencyProperty.RegisterAttached("Triggers",
|
||||
typeof(ConditionalEventTriggerCollection), typeof(ConditionalEventTrigger), new PropertyMetadata
|
||||
{
|
||||
PropertyChangedCallback = (obj, e) =>
|
||||
{
|
||||
// When "Triggers" is set, register handlers for each trigger in the list
|
||||
var element = (FrameworkElement) obj;
|
||||
var triggers = (List<ConditionalEventTrigger>) e.NewValue;
|
||||
foreach (var trigger in triggers)
|
||||
element.AddHandler(trigger.RoutedEvent, new RoutedEventHandler((obj2, e2) =>
|
||||
trigger.OnRoutedEvent(element)));
|
||||
}
|
||||
});
|
||||
|
||||
private static readonly RoutedEvent TriggerActionsEvent = EventManager.RegisterRoutedEvent("",
|
||||
RoutingStrategy.Direct,
|
||||
typeof(EventHandler), typeof(ConditionalEventTrigger));
|
||||
|
||||
public ConditionalEventTrigger()
|
||||
{
|
||||
Actions = new List<TriggerAction>();
|
||||
}
|
||||
|
||||
public RoutedEvent RoutedEvent { get; set; }
|
||||
public List<TriggerAction> Actions { get; set; }
|
||||
|
||||
// Condition
|
||||
public bool Condition
|
||||
{
|
||||
get => (bool) GetValue(ConditionProperty);
|
||||
set => SetValue(ConditionProperty, value);
|
||||
}
|
||||
|
||||
// "Triggers" attached property
|
||||
public static ConditionalEventTriggerCollection GetTriggers(DependencyObject obj)
|
||||
{
|
||||
return (ConditionalEventTriggerCollection) obj.GetValue(TriggersProperty);
|
||||
}
|
||||
|
||||
public static void SetTriggers(DependencyObject obj, ConditionalEventTriggerCollection value)
|
||||
{
|
||||
obj.SetValue(TriggersProperty, value);
|
||||
}
|
||||
|
||||
// When an event fires, check the condition and if it is true fire the actions
|
||||
private void OnRoutedEvent(FrameworkElement element)
|
||||
{
|
||||
DataContext = element.DataContext; // Allow data binding to access element properties
|
||||
if (Condition)
|
||||
{
|
||||
// Construct an EventTrigger containing the actions, then trigger it
|
||||
var dummyTrigger = new EventTrigger {RoutedEvent = TriggerActionsEvent};
|
||||
foreach (var action in Actions)
|
||||
dummyTrigger.Actions.Add(action);
|
||||
|
||||
element.Triggers.Add(dummyTrigger);
|
||||
try
|
||||
{
|
||||
element.RaiseEvent(new RoutedEventArgs(TriggerActionsEvent));
|
||||
}
|
||||
finally
|
||||
{
|
||||
element.Triggers.Remove(dummyTrigger);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Create collection type visible to XAML - since it is attached we cannot construct it in code
|
||||
public class ConditionalEventTriggerCollection : List<ConditionalEventTrigger>
|
||||
{
|
||||
}
|
||||
}
|
@@ -15,8 +15,8 @@
|
||||
Viewport="0,0,100,100" TileMode="FlipY" Stretch="UniformToFill" />
|
||||
</Rectangle.Fill>
|
||||
</Rectangle>
|
||||
<Rectangle Panel.ZIndex="50" Fill="#FFDADADA" Opacity="0.8"
|
||||
Visibility="{Binding ElementName=glassLayer,Path=GrayOverlayVisibility}" />
|
||||
<Rectangle Panel.ZIndex="50" Fill="{Binding ElementName=glassLayer, Path=OverlayColor}" Opacity="0.7"
|
||||
Visibility="{Binding ElementName=glassLayer,Path=ColorOverlayVisibility}" />
|
||||
<Grid Panel.ZIndex="0" Visibility="{Binding ElementName=glassLayer,Path=GlassVisibility}">
|
||||
<Grid.Effect>
|
||||
<local:GaussianBlurEffect Direction="0,1"
|
||||
|
@@ -15,10 +15,13 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using System.Drawing;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
using QuickLook.Helpers;
|
||||
using Color = System.Windows.Media.Color;
|
||||
using Size = System.Windows.Size;
|
||||
|
||||
namespace QuickLook.Controls.GlassLayer
|
||||
{
|
||||
@@ -56,25 +59,44 @@ namespace QuickLook.Controls.GlassLayer
|
||||
|
||||
#endregion public Visual BlurredElement
|
||||
|
||||
#region public Visibility GrayOverlayVisibility
|
||||
#region public SolidColorBrush OverlayColor
|
||||
|
||||
/// <summary>
|
||||
/// Identifies the GrayOverlayVisibility dependency property.
|
||||
/// Identifies the OverlayColor dependency property.
|
||||
/// </summary>
|
||||
public static DependencyProperty GrayOverlayVisibilityProperty =
|
||||
DependencyProperty.Register("GrayOverlayVisibility", typeof(Visibility), typeof(GlassLayer),
|
||||
new UIPropertyMetadata(Visibility.Visible));
|
||||
public static DependencyProperty OverlayColorProperty =
|
||||
DependencyProperty.Register("OverlayColor", typeof(SolidColorBrush), typeof(GlassLayer),
|
||||
new UIPropertyMetadata(new SolidColorBrush(Color.FromRgb(0xDA, 0xDA, 0xDA))));
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
public Visibility GrayOverlayVisibility
|
||||
public SolidColorBrush OverlayColor
|
||||
{
|
||||
get => (Visibility) GetValue(GrayOverlayVisibilityProperty);
|
||||
|
||||
set => SetValue(GrayOverlayVisibilityProperty, value);
|
||||
get => (SolidColorBrush) GetValue(OverlayColorProperty);
|
||||
|
||||
set => SetValue(OverlayColorProperty, value);
|
||||
}
|
||||
|
||||
#endregion public Visibility GrayOverlayVisibility
|
||||
#endregion public SolidColorBrush OverlayColor
|
||||
|
||||
#region public Visibility ColorOverlayVisibility
|
||||
|
||||
/// <summary>
|
||||
/// Identifies the ColorOverlayVisibilityProperty dependency property.
|
||||
/// </summary>
|
||||
public static DependencyProperty ColorOverlayVisibilityProperty =
|
||||
DependencyProperty.Register("ColorOverlayVisibility", typeof(Visibility), typeof(GlassLayer),
|
||||
new UIPropertyMetadata(Visibility.Visible));
|
||||
|
||||
public Visibility ColorOverlayVisibility
|
||||
{
|
||||
get => (Visibility) GetValue(ColorOverlayVisibilityProperty);
|
||||
|
||||
set => SetValue(ColorOverlayVisibilityProperty, value);
|
||||
}
|
||||
|
||||
#endregion public Visibility ColorOverlayVisibility
|
||||
|
||||
#region public Visibility NoiseVisibility
|
||||
|
||||
|
@@ -29,7 +29,7 @@ namespace QuickLook.Helpers
|
||||
public static void PerformAggressiveGC()
|
||||
{
|
||||
// delay some time to make sure that all windows are closed
|
||||
Task.Delay(1000).ContinueWith(t => GC.Collect(GC.MaxGeneration));
|
||||
Task.Delay(2000).ContinueWith(t => GC.Collect(GC.MaxGeneration));
|
||||
}
|
||||
|
||||
public static bool IsRunningAsUWP()
|
||||
|
@@ -8,7 +8,6 @@
|
||||
xmlns:glassLayer="clr-namespace:QuickLook.Controls.GlassLayer"
|
||||
xmlns:converters="clr-namespace:QuickLook.Converters"
|
||||
xmlns:controls="clr-namespace:QuickLook.Controls"
|
||||
xmlns:actions="clr-namespace:QuickLook.Actions"
|
||||
mc:Ignorable="d" x:Class="QuickLook.MainWindowTransparent" x:Name="mainWindow"
|
||||
UseLayoutRounding="True"
|
||||
d:DesignWidth="624" d:DesignHeight="700"
|
||||
@@ -34,6 +33,9 @@
|
||||
</controls:MainWindowBase.Resources>
|
||||
<controls:MainWindowBase.Style>
|
||||
<Style TargetType="controls:MainWindowBase">
|
||||
<Setter Property="Foreground" Value="{DynamicResource MainWindowForeground}" />
|
||||
<Setter Property="ResizeMode"
|
||||
Value="{Binding ContextObject.CanResize, ElementName=mainWindow, Converter={StaticResource BooleanToResizeModeConverter}}" />
|
||||
<Setter Property="WindowChrome.WindowChrome">
|
||||
<Setter.Value>
|
||||
<WindowChrome CaptionHeight="0"
|
||||
@@ -52,16 +54,12 @@
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</controls:MainWindowBase.Style>
|
||||
<controls:MainWindowBase.ResizeMode>
|
||||
<Binding ElementName="mainWindow" Path="ContextObject.CanResize"
|
||||
Converter="{StaticResource BooleanToResizeModeConverter}" />
|
||||
</controls:MainWindowBase.ResizeMode>
|
||||
<Border>
|
||||
<Border.Effect>
|
||||
<DropShadowEffect BlurRadius="{StaticResource MainWindowShadowBlurRadius}" ShadowDepth="0" Opacity="0.6"
|
||||
Color="Gray" />
|
||||
Color="{DynamicResource MainWindowShadowColor}" />
|
||||
</Border.Effect>
|
||||
<Grid x:Name="windowFrameContainer" Background="{StaticResource MainWindowBackground}"
|
||||
<Grid x:Name="windowFrameContainer" Background="{DynamicResource MainWindowBackground}"
|
||||
Margin="{Binding WindowState, ElementName=mainWindow, Converter={StaticResource WindowStateToThicknessConverter}, ConverterParameter={StaticResource MainWindowShadowPaddingThinkness}}">
|
||||
<Grid.Resources>
|
||||
<Storyboard x:Key="ShowCaptionStoryboard">
|
||||
@@ -86,17 +84,17 @@
|
||||
<Grid x:Name="windowCaptionContainer" Height="{StaticResource MainWindowCaptionHeight}"
|
||||
VerticalAlignment="Top"
|
||||
ZIndex="100">
|
||||
<glassLayer:GlassLayer BlurredElement="{Binding ElementName=containerPanel}" />
|
||||
<glassLayer:GlassLayer OverlayColor="{DynamicResource CaptionBackground}" BlurredElement="{Binding ElementName=containerPanel}" />
|
||||
<DockPanel>
|
||||
<Button x:Name="buttonCloseWindow" Style="{StaticResource CaptionCloseButtonStyle}"
|
||||
DockPanel.Dock="Right">
|
||||
<fa:ImageAwesome Icon="TimesCircle"
|
||||
Foreground="{StaticResource CaptionButtonIconForeground}" />
|
||||
Foreground="{DynamicResource CaptionButtonIconForeground}" />
|
||||
</Button>
|
||||
<Button x:Name="buttonWindowStatus" Style="{StaticResource CaptionButtonStyle}"
|
||||
Visibility="{Binding ContextObject.CanResize, ElementName=mainWindow, Converter={StaticResource BooleanToVisibilityConverter}}"
|
||||
DockPanel.Dock="Right">
|
||||
<fa:ImageAwesome Foreground="{StaticResource CaptionButtonIconForeground}">
|
||||
<fa:ImageAwesome Foreground="{DynamicResource CaptionButtonIconForeground}">
|
||||
<fa:ImageAwesome.Style>
|
||||
<Style TargetType="{x:Type fa:ImageAwesome}">
|
||||
<Setter Property="Icon" Value="WindowMaximize" />
|
||||
@@ -123,10 +121,10 @@
|
||||
</Button.Content>
|
||||
</Button>
|
||||
<Button DockPanel.Dock="Left" x:Name="buttonPin" Style="{StaticResource CaptionButtonStyle}">
|
||||
<fa:ImageAwesome Icon="ThumbTack" Foreground="{StaticResource CaptionButtonIconForeground}" />
|
||||
<fa:ImageAwesome Icon="ThumbTack" Foreground="{DynamicResource CaptionButtonIconForeground}" />
|
||||
</Button>
|
||||
<Button x:Name="buttonShare" Style="{StaticResource CaptionButtonStyle}" DockPanel.Dock="Left">
|
||||
<fa:ImageAwesome Icon="ShareAlt" Foreground="{StaticResource CaptionButtonIconForeground}" />
|
||||
<fa:ImageAwesome Icon="ShareAlt" Foreground="{DynamicResource CaptionButtonIconForeground}" />
|
||||
</Button>
|
||||
<Grid x:Name="titleArea" Background="Transparent">
|
||||
<TextBlock Text="{Binding ContextObject.Title, ElementName=mainWindow}" FontSize="12"
|
||||
@@ -135,10 +133,11 @@
|
||||
</Grid>
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
<DockPanel x:Name="containerPanel" Background="#FFF8F8FB" ZIndex="80">
|
||||
<DockPanel x:Name="containerPanel" Background="{DynamicResource MainWindowBackground}" ZIndex="80">
|
||||
<Grid DockPanel.Dock="Top" Height="{StaticResource MainWindowCaptionHeight}"
|
||||
Visibility="{Binding ContextObject.TitlebarOverlap, ElementName=mainWindow, Converter={StaticResource BooleanToVisibilityCollapsedConverter}}" />
|
||||
<ContentControl x:Name="container"
|
||||
Foreground="{DynamicResource CaptionButtonIconForeground}"
|
||||
Content="{Binding ContextObject.ViewerContent, ElementName=mainWindow}" />
|
||||
<DockPanel.Style>
|
||||
<Style TargetType="{x:Type DockPanel}">
|
||||
@@ -154,7 +153,7 @@
|
||||
</DockPanel.Style>
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
<Grid x:Name="busyIndicatorLayer" Background="{StaticResource MainWindowBackground}" ZIndex="200">
|
||||
<Grid x:Name="busyIndicatorLayer" Background="{DynamicResource MainWindowBackground}" ZIndex="200">
|
||||
<Grid.Style>
|
||||
<Style TargetType="{x:Type Grid}">
|
||||
<Setter Property="Visibility" Value="Collapsed" />
|
||||
|
@@ -40,10 +40,15 @@ namespace QuickLook
|
||||
/// </summary>
|
||||
public partial class MainWindowTransparent : MainWindowBase, INotifyPropertyChanged
|
||||
{
|
||||
private string _path;
|
||||
private bool _pinned;
|
||||
private bool _restoreForDragMove;
|
||||
private readonly ResourceDictionary _darkDict = new ResourceDictionary
|
||||
{
|
||||
Source = new Uri("pack://application:,,,/QuickLook;component/Styles/MainWindowStyles.Dark.xaml")
|
||||
};
|
||||
|
||||
internal MainWindowTransparent()
|
||||
internal MainWindowTransparent()
|
||||
{
|
||||
// this object should be initialized before loading UI components, because many of which are binding to it.
|
||||
ContextObject = new ContextObject();
|
||||
@@ -93,17 +98,21 @@ namespace QuickLook
|
||||
WindowState = WindowState == WindowState.Maximized ? WindowState.Normal : WindowState.Maximized;
|
||||
|
||||
buttonShare.Click +=
|
||||
(sender, e) => RunWith("rundll32.exe", $"shell32.dll,OpenAs_RunDLL {Path}");
|
||||
(sender, e) => RunWith("rundll32.exe", $"shell32.dll,OpenAs_RunDLL {_path}");
|
||||
}
|
||||
|
||||
private void ShowWindowCaptionContainer(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (!ContextObject.TitlebarOverlap)
|
||||
return;
|
||||
|
||||
var show = (Storyboard) windowFrameContainer.FindResource("ShowCaptionStoryboard");
|
||||
var showAndHide = (Storyboard) windowFrameContainer.FindResource("ShowAndHideTitlebarStoryboard");
|
||||
|
||||
if (!ContextObject.TitlebarOverlap)
|
||||
{
|
||||
show.Begin();
|
||||
showAndHide.Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
if (windowCaptionContainer.IsMouseOver)
|
||||
show.Begin();
|
||||
else
|
||||
@@ -120,7 +129,6 @@ namespace QuickLook
|
||||
}
|
||||
}
|
||||
|
||||
public string Path { get; private set; }
|
||||
public IViewer Plugin { get; private set; }
|
||||
|
||||
public ContextObject ContextObject { get; private set; }
|
||||
@@ -178,7 +186,7 @@ namespace QuickLook
|
||||
|
||||
internal void RunWith(string with, string arg)
|
||||
{
|
||||
if (string.IsNullOrEmpty(Path))
|
||||
if (string.IsNullOrEmpty(_path))
|
||||
return;
|
||||
|
||||
try
|
||||
@@ -186,7 +194,7 @@ namespace QuickLook
|
||||
Process.Start(new ProcessStartInfo(with)
|
||||
{
|
||||
Arguments = arg,
|
||||
WorkingDirectory = System.IO.Path.GetDirectoryName(Path)
|
||||
WorkingDirectory = System.IO.Path.GetDirectoryName(_path)
|
||||
});
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -197,14 +205,14 @@ namespace QuickLook
|
||||
|
||||
internal void Run()
|
||||
{
|
||||
if (string.IsNullOrEmpty(Path))
|
||||
if (string.IsNullOrEmpty(_path))
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
Process.Start(new ProcessStartInfo(Path)
|
||||
Process.Start(new ProcessStartInfo(_path)
|
||||
{
|
||||
WorkingDirectory = System.IO.Path.GetDirectoryName(Path)
|
||||
WorkingDirectory = System.IO.Path.GetDirectoryName(_path)
|
||||
});
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -283,12 +291,12 @@ namespace QuickLook
|
||||
}
|
||||
Plugin = null;
|
||||
|
||||
Path = string.Empty;
|
||||
_path = string.Empty;
|
||||
}
|
||||
|
||||
internal void BeginShow(IViewer matchedPlugin, string path, Action<ExceptionDispatchInfo> exceptionHandler)
|
||||
{
|
||||
Path = path;
|
||||
_path = path;
|
||||
Plugin = matchedPlugin;
|
||||
|
||||
ContextObject.ViewerWindow = this;
|
||||
@@ -312,6 +320,7 @@ namespace QuickLook
|
||||
if (Visibility != Visibility.Visible)
|
||||
Show();
|
||||
|
||||
ShowWindowCaptionContainer(null, null);
|
||||
//WindowHelper.SetActivate(new WindowInteropHelper(this), ContextObject.CanFocus);
|
||||
|
||||
// load plugin, do not block UI
|
||||
@@ -333,26 +342,26 @@ namespace QuickLook
|
||||
{
|
||||
buttonOpenWithText.Inlines.Clear();
|
||||
|
||||
if (Directory.Exists(Path))
|
||||
if (Directory.Exists(_path))
|
||||
{
|
||||
AddToInlines("MW_BrowseFolder", System.IO.Path.GetFileName(Path));
|
||||
AddToInlines("MW_BrowseFolder", System.IO.Path.GetFileName(_path));
|
||||
return;
|
||||
}
|
||||
var isExe = FileHelper.IsExecutable(Path, out string appFriendlyName);
|
||||
var isExe = FileHelper.IsExecutable(_path, out string appFriendlyName);
|
||||
if (isExe)
|
||||
{
|
||||
AddToInlines("MW_Run", appFriendlyName);
|
||||
return;
|
||||
}
|
||||
// not an exe
|
||||
var found = FileHelper.GetAssocApplication(Path, out appFriendlyName);
|
||||
var found = FileHelper.GetAssocApplication(_path, out appFriendlyName);
|
||||
if (found)
|
||||
{
|
||||
AddToInlines("MW_OpenWith", appFriendlyName);
|
||||
return;
|
||||
}
|
||||
// assoc not found
|
||||
AddToInlines("MW_Open", System.IO.Path.GetFileName(Path));
|
||||
AddToInlines("MW_Open", System.IO.Path.GetFileName(_path));
|
||||
|
||||
void AddToInlines(string str, string replaceWith)
|
||||
{
|
||||
@@ -407,5 +416,19 @@ namespace QuickLook
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
public void SwitchTheme(bool dark)
|
||||
{
|
||||
if (dark)
|
||||
{
|
||||
if (!Resources.MergedDictionaries.Contains(_darkDict))
|
||||
Resources.MergedDictionaries.Add(_darkDict);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Resources.MergedDictionaries.Contains(_darkDict))
|
||||
Resources.MergedDictionaries.Remove(_darkDict);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -31,13 +31,13 @@ namespace QuickLook.Plugin
|
||||
/// </summary>
|
||||
public class ContextObject : INotifyPropertyChanged
|
||||
{
|
||||
private bool _autoHideTitlebar;
|
||||
private bool _canResize = true;
|
||||
private bool _fullWindowDragging;
|
||||
private bool _isBusy = true;
|
||||
private string _title = "";
|
||||
private bool _titlebarOverlap;
|
||||
private object _viewerContent;
|
||||
private bool _useDarkTheme;
|
||||
|
||||
/// <summary>
|
||||
/// Get the viewer window.
|
||||
@@ -127,6 +127,21 @@ namespace QuickLook.Plugin
|
||||
}
|
||||
}
|
||||
|
||||
public bool UseDarkTheme
|
||||
{
|
||||
get { return _useDarkTheme; }
|
||||
set
|
||||
{
|
||||
_useDarkTheme = value;
|
||||
ApplyViewerWindowTheme();
|
||||
}
|
||||
}
|
||||
|
||||
private void ApplyViewerWindowTheme()
|
||||
{
|
||||
ViewerWindow?.SwitchTheme(UseDarkTheme);
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
/// <summary>
|
||||
@@ -175,14 +190,16 @@ namespace QuickLook.Plugin
|
||||
|
||||
internal void Reset()
|
||||
{
|
||||
ViewerWindow = null;
|
||||
Title = "";
|
||||
ViewerContent = null;
|
||||
IsBusy = true;
|
||||
PreferredSize = new Size();
|
||||
CanResize = true;
|
||||
FullWindowDragging = false;
|
||||
TitlebarOverlap = false;
|
||||
UseDarkTheme = false;
|
||||
|
||||
ViewerContent = null;
|
||||
ViewerWindow = null;
|
||||
}
|
||||
|
||||
[NotifyPropertyChangedInvocator]
|
||||
|
@@ -5,7 +5,6 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:QuickLook.Plugin.InfoPanel"
|
||||
FontSize="14"
|
||||
Background="#FFF8F8FB"
|
||||
mc:Ignorable="d" Width="453" Height="172" UseLayoutRounding="True" TextOptions.TextHintingMode="Animated">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
|
@@ -50,7 +50,7 @@ namespace QuickLook.Plugin.InfoPanel
|
||||
context.ViewerContent = _ip;
|
||||
|
||||
_ip.DisplayInfo(path);
|
||||
|
||||
context.UseDarkTheme = true;
|
||||
context.IsBusy = false;
|
||||
}
|
||||
|
||||
|
@@ -111,7 +111,6 @@
|
||||
<Compile Include="..\GitVersion.cs">
|
||||
<Link>Properties\GitVersion.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="Actions\ConditionalEventTrigger.cs" />
|
||||
<Compile Include="Controls\GlassLayer\GaussianBlurEffect.cs" />
|
||||
<Compile Include="Controls\GlassLayer\GlassLayer.xaml.cs">
|
||||
<DependentUpon>GlassLayer.xaml</DependentUpon>
|
||||
@@ -181,6 +180,10 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Styles\MainWindowStyles.Dark.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Styles\MainWindowStyles.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
15
QuickLook/Styles/MainWindowStyles.Dark.xaml
Normal file
15
QuickLook/Styles/MainWindowStyles.Dark.xaml
Normal file
@@ -0,0 +1,15 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:fa="http://schemas.fontawesome.io/icons/">
|
||||
<Color x:Key="MainWindowShadowColor">Gray</Color>
|
||||
<SolidColorBrush x:Key="MainWindowBackground" Color="#FF565656" />
|
||||
<SolidColorBrush x:Key="MainWindowForeground" Color="#E5EFEFEF" />
|
||||
<SolidColorBrush x:Key="CaptionTextHoverBorder" Color="#FFB9B9B9" />
|
||||
<SolidColorBrush x:Key="CaptionButtonIconForeground" Color="#E5EFEFEF" />
|
||||
<SolidColorBrush x:Key="CaptionButtonHoverBackground" Color="#22FFFFFF" />
|
||||
<SolidColorBrush x:Key="CaptionButtonPressBackground" Color="#44FFFFFF" />
|
||||
<SolidColorBrush x:Key="CaptionCloseButtonHoverBackground" Color="#FFE81123" />
|
||||
<SolidColorBrush x:Key="CaptionCloseButtonPressBackground" Color="#FFB5394B" />
|
||||
<SolidColorBrush x:Key="CaptionBackground" Color="#FF3B3B3B" />
|
||||
</ResourceDictionary>
|
@@ -5,13 +5,21 @@
|
||||
<system:Double x:Key="MainWindowShadowBlurRadius">6</system:Double>
|
||||
<Thickness x:Key="MainWindowShadowPaddingThinkness">6</Thickness>
|
||||
<system:Double x:Key="MainWindowCaptionHeight">32</system:Double>
|
||||
<SolidColorBrush x:Key="CaptionButtonIconForeground" Color="#E5868686" />
|
||||
<Color x:Key="MainWindowShadowColor">Gray</Color>
|
||||
<SolidColorBrush x:Key="MainWindowBackground" Color="#FFF8F8FB" />
|
||||
<SolidColorBrush x:Key="MainWindowForeground" Color="#E50E0E0E" />
|
||||
<SolidColorBrush x:Key="CaptionTextHoverBorder" Color="#FF3D3D3D" />
|
||||
<SolidColorBrush x:Key="CaptionButtonIconForeground" Color="#E5868686" />
|
||||
<SolidColorBrush x:Key="CaptionButtonHoverBackground" Color="#44FFFFFF" />
|
||||
<SolidColorBrush x:Key="CaptionButtonPressBackground" Color="#88FFFFFF" />
|
||||
<SolidColorBrush x:Key="CaptionCloseButtonHoverBackground" Color="#FFE81123" />
|
||||
<SolidColorBrush x:Key="CaptionCloseButtonPressBackground" Color="#FFB5394B" />
|
||||
<SolidColorBrush x:Key="CaptionBackground" Color="#FFDADADA" />
|
||||
|
||||
<Style x:Key="CaptionButtonBaseStyle" TargetType="Button">
|
||||
<Setter Property="Focusable" Value="False" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Foreground" Value="#E50E0E0E" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource MainWindowForeground}" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="HorizontalAlignment" Value="Center" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
@@ -35,11 +43,11 @@
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="BorderBrush" Value="#FF3D3D3D" />
|
||||
<Setter Property="Background" Value="#44FFFFFF" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource CaptionTextHoverBorder}" />
|
||||
<Setter Property="Background" Value="{DynamicResource CaptionButtonHoverBackground}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="Background" Value="#88FFFFFF" />
|
||||
<Setter Property="Background" Value="{DynamicResource CaptionButtonPressBackground}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
@@ -60,10 +68,10 @@
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="#44FFFFFF" />
|
||||
<Setter Property="Background" Value="{DynamicResource CaptionButtonHoverBackground}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="Background" Value="#88FFFFFF" />
|
||||
<Setter Property="Background" Value="{DynamicResource CaptionButtonPressBackground}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
@@ -71,10 +79,10 @@
|
||||
<Style x:Key="CaptionCloseButtonStyle" TargetType="Button" BasedOn="{StaticResource CaptionButtonStyle}">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="#FFE81123" />
|
||||
<Setter Property="Background" Value="{DynamicResource CaptionCloseButtonHoverBackground}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="Background" Value="#FFB5394B" />
|
||||
<Setter Property="Background" Value="{DynamicResource CaptionCloseButtonPressBackground}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
Reference in New Issue
Block a user