new icons

This commit is contained in:
Paddy Xu
2017-08-12 23:31:50 +03:00
parent 6027a387b0
commit e4ab7d0a32
8 changed files with 40 additions and 1 deletions

View File

@@ -70,6 +70,16 @@ namespace QuickLook.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
internal static System.Drawing.Icon app_16 {
get {
object obj = ResourceManager.GetObject("app_16", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
@@ -79,5 +89,15 @@ namespace QuickLook.Properties {
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Icon similar to (Icon).
/// </summary>
internal static System.Drawing.Icon app_white_16 {
get {
object obj = ResourceManager.GetObject("app_white_16", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
}
}

View File

@@ -121,7 +121,13 @@
<data name="app" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\app.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<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_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>
</root>

View File

@@ -212,6 +212,8 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<None Include="Resources\app_white_16.ico" />
<None Include="Resources\app_16.ico" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 296 KiB

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 290 KiB

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -16,6 +16,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using System;
using System.Drawing;
using System.Windows.Forms;
using QuickLook.Helpers;
using QuickLook.Properties;
@@ -44,7 +45,7 @@ namespace QuickLook
{
Text = string.Format(TranslationHelper.GetString("Icon_ToolTip"),
Application.ProductVersion),
Icon = Resources.app,
Icon = GetTrayIconByDPI(),
Visible = true,
ContextMenu = new ContextMenu(new[]
{
@@ -66,6 +67,16 @@ namespace QuickLook
_icon.Visible = false;
}
private Icon GetTrayIconByDPI()
{
var isWin7 = Environment.OSVersion.Version < new Version(6, 2);
var scale = DpiHelper.GetCurrentScaleFactor().Vertical;
if (isWin7)
return scale > 1 ? Resources.app : Resources.app_16;
return scale > 1 ? Resources.app_white : Resources.app_white_16;
}
public static void ShowNotification(string title, string content, bool isError = false, int timeout = 5000,
Action clickEvent = null,
Action closeEvent = null)