mirror of
https://github.com/QL-Win/QuickLook.git
synced 2026-02-28 01:00:17 +08:00
minor UI tweak: show in taskbar when pinned
This commit is contained in:
22
QuickLook/Properties/Resources.Designer.cs
generated
22
QuickLook/Properties/Resources.Designer.cs
generated
@@ -19,7 +19,7 @@ namespace QuickLook.Properties {
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
@@ -80,6 +80,16 @@ namespace QuickLook.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap app_png {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("app_png", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
|
||||
/// </summary>
|
||||
@@ -99,5 +109,15 @@ namespace QuickLook.Properties {
|
||||
return ((System.Drawing.Icon)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap app_white_png {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("app_white_png", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,10 +124,16 @@
|
||||
<data name="app_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\app_16.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="app_png" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\app.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="app_white" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\app_white.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="app_white_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\app_white_16.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="app_white_png" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\app_white.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -193,6 +193,8 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Resource Include="Resources\app.png" />
|
||||
<Resource Include="Resources\app_white.png" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Resources\app_white_16.ico" />
|
||||
<None Include="Resources\app_16.ico" />
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<SolidColorBrush x:Key="CaptionButtonIconForeground" Color="#E5EFEFEF" />
|
||||
<SolidColorBrush x:Key="CaptionButtonHoverBackground" Color="#22FFFFFF" />
|
||||
<SolidColorBrush x:Key="CaptionButtonPressBackground" Color="#44FFFFFF" />
|
||||
<SolidColorBrush x:Key="CaptionCloseButtonHoverForeground" Color="#E5EFEFEF" />
|
||||
<SolidColorBrush x:Key="CaptionCloseButtonHoverBackground" Color="#FFE81123" />
|
||||
<SolidColorBrush x:Key="CaptionCloseButtonPressBackground" Color="#FFB5394B" />
|
||||
<SolidColorBrush x:Key="CaptionBackground" Color="#CC0E0E0E" />
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
<SolidColorBrush x:Key="CaptionButtonIconForeground" Color="#E50E0E0E" />
|
||||
<SolidColorBrush x:Key="CaptionButtonHoverBackground" Color="#44FFFFFF" />
|
||||
<SolidColorBrush x:Key="CaptionButtonPressBackground" Color="#88FFFFFF" />
|
||||
<SolidColorBrush x:Key="CaptionCloseButtonHoverForeground" Color="#E5EFEFEF" />
|
||||
<SolidColorBrush x:Key="CaptionCloseButtonHoverBackground" Color="#FFE81123" />
|
||||
<SolidColorBrush x:Key="CaptionCloseButtonPressBackground" Color="#FFB5394B" />
|
||||
<SolidColorBrush x:Key="CaptionBackground" Color="#BBDADADA" />
|
||||
@@ -81,6 +82,7 @@
|
||||
<Style x:Key="CaptionCloseButtonStyle" TargetType="Button" BasedOn="{StaticResource CaptionButtonStyle}">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Foreground" Value="{DynamicResource CaptionCloseButtonHoverForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource CaptionCloseButtonHoverBackground}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace QuickLook
|
||||
};
|
||||
private bool _canOldPluginResize;
|
||||
private bool _pinned;
|
||||
internal bool Pinned
|
||||
public bool Pinned
|
||||
{
|
||||
get => _pinned;
|
||||
set
|
||||
|
||||
@@ -14,8 +14,11 @@
|
||||
Focusable="False"
|
||||
ResizeMode="CanResizeWithGrip"
|
||||
BorderBrush="{DynamicResource CaptionBackground}"
|
||||
Foreground="{DynamicResource WindowTextForeground}"
|
||||
Background="{DynamicResource MainWindowBackground}"
|
||||
ShowActivated="False" ShowInTaskbar="False">
|
||||
ShowInTaskbar="{Binding ElementName=mainWindow, Path=Pinned}"
|
||||
Title="{Binding ElementName=titleAreaText, Path=Text}"
|
||||
ShowActivated="False">
|
||||
<Window.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
@@ -37,7 +40,6 @@
|
||||
<Window.Style>
|
||||
<Style TargetType="Window">
|
||||
<Setter Property="BorderThickness" Value="{StaticResource MainWindowShadowMarginThickness}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource WindowTextForeground}" />
|
||||
</Style>
|
||||
</Window.Style>
|
||||
<Grid x:Name="windowFrameContainer"
|
||||
@@ -142,7 +144,7 @@
|
||||
<Button DockPanel.Dock="Left" x:Name="buttonShare" Style="{StaticResource CaptionButtonStyle}"
|
||||
Content="" ToolTip="Open With..." />
|
||||
<Grid x:Name="titleArea" Background="Transparent">
|
||||
<TextBlock Text="{Binding ContextObject.Title, ElementName=mainWindow}" FontSize="12"
|
||||
<TextBlock x:Name="titleAreaText" Text="{Binding ContextObject.Title, ElementName=mainWindow}" FontSize="12"
|
||||
HorizontalAlignment="Left" TextTrimming="CharacterEllipsis"
|
||||
VerticalAlignment="Center" Margin="5,0" />
|
||||
</Grid>
|
||||
|
||||
@@ -18,10 +18,13 @@
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Animation;
|
||||
using QuickLook.Common.ExtensionMethods;
|
||||
using QuickLook.Common.Helpers;
|
||||
using QuickLook.Common.Plugin;
|
||||
using Brush = System.Windows.Media.Brush;
|
||||
using FontFamily = System.Windows.Media.FontFamily;
|
||||
using Size = System.Windows.Size;
|
||||
|
||||
namespace QuickLook
|
||||
{
|
||||
@@ -43,6 +46,8 @@ namespace QuickLook
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
Icon = (App.IsWin10 ? Properties.Resources.app_white_png : Properties.Resources.app_png).ToBitmapSource();
|
||||
|
||||
FontFamily = new FontFamily(TranslationHelper.Get("UI_FontFamily", failsafe: "Segoe UI"));
|
||||
|
||||
SizeChanged += SaveWindowSizeOnSizeChanged;
|
||||
|
||||
Reference in New Issue
Block a user