Skip to content

Commit

Permalink
🖥️ v3.1.2
Browse files Browse the repository at this point in the history
- Better HiDPI support (#21)
- Fix: Blurry icons in context menus
  • Loading branch information
Beelink committed Mar 22, 2021
1 parent 5dbcfd2 commit 7701254
Show file tree
Hide file tree
Showing 91 changed files with 2,294 additions and 1,987 deletions.
Binary file modified .vs/quick-picture-viewer/v16/.suo
Binary file not shown.
Binary file modified docs/imgs/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@
<script src="js/snowflakes.js"></script>
<script src="js/index.js"></script>
<link rel="shortcut icon" href="https://github.com/ModuleArt/quick-picture-viewer/blob/master/quick-picture-viewer/resources/imgs/picture32.png?raw=true" type="image/png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Quick Picture Viewer">
<meta name="twitter:description" content="🖼️ Lightweight, versatile desktop image viewer for Windows. The best replacement for the default Windows photo viewer.">
<meta name="twitter:image:src" content="https://repository-images.githubusercontent.com/227230655/fc018000-8ae6-11eb-8ea0-a0c3744f45db">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Module Art">
<meta property="og:title" content="Quick Picture Viewer">
<meta property="og:description" content="🖼️ Lightweight, versatile desktop image viewer for Windows. The best replacement for the default Windows photo viewer.">
<meta property="og:url" content="https://moduleart.github.io/quick-picture-viewer/">
<meta property="og:locale" content="en_US">
<meta property="og:image" content="https://repository-images.githubusercontent.com/227230655/fc018000-8ae6-11eb-8ea0-a0c3744f45db">
</head>
<body>
<div id="special-effects" class="special-effects"></div>
Expand Down
Binary file modified inno-setup/QuickPictureViewer-Setup.exe
Binary file not shown.
3 changes: 3 additions & 0 deletions quick-picture-viewer/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
<section name="quick_picture_viewer.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
</sectionGroup>
</configSections>
<System.Windows.Forms.ApplicationConfigurationSection>
<add key="DpiAwareness" value="PerMonitorV2" />
</System.Windows.Forms.ApplicationConfigurationSection>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
Expand Down
30 changes: 15 additions & 15 deletions quick-picture-viewer/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 11 additions & 12 deletions quick-picture-viewer/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -361,13 +361,16 @@ private void openFile(string path, bool goPrev = false)
string ext = Path.GetExtension(path);
if (ext == ".webp")
{
byte[] rawWebP = File.ReadAllBytes(path);
using (WebP webp = new WebP())
Bitmap bmp = WebpWrapper.ParseWebp(path);
switch (WebpWrapper.CurrentError)
{
WebPDecoderOptions decoderOptions = new WebPDecoderOptions();
decoderOptions.use_threads = 1;
decoderOptions.alpha_dithering_strength = 100;
openImage(webp.Decode(rawWebP, decoderOptions), Path.GetDirectoryName(path), Path.GetFileName(path));
case WebpWrapper.Error.NoError:
openImage(bmp, Path.GetDirectoryName(path), Path.GetFileName(path));
break;
case WebpWrapper.Error.UnableToOpen:
closeFile();
showSuggestion(WebpWrapper.TypeName + " - " + LangMan.Get("unable-open-file") + ": " + Path.GetFileName(path), SuggestionIcon.Warning);
break;
}
}
else if (ext == ".ico")
Expand Down Expand Up @@ -864,7 +867,7 @@ private void saveAsButton_Click(object sender, EventArgs e)
case ".tiff":
case ".tif":
saveFileDialog1.FilterIndex = 5;
ext = ".tif";
ext = ".tiff";
break;
case ".ico":
saveFileDialog1.FilterIndex = 6;
Expand Down Expand Up @@ -2544,11 +2547,7 @@ private void SaveFile(string path, string ext, bool dispose)
IcoWrapper.ConvertToIcon(bmpToSave, memory);
break;
case ".webp":
using (WebP webp = new WebP())
{
bytes = webp.EncodeLossy(bmpToSave);
fs.Write(bytes, 0, bytes.Length);
}
WebpWrapper.Save(bmpToSave, path);
break;
}
}
Expand Down
46 changes: 38 additions & 8 deletions quick-picture-viewer/MainForm.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1271,6 +1271,9 @@
<data name="showNavArrowsBtn.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 10pt</value>
</data>
<data name="showNavArrowsBtn.ImageScaling" type="System.Windows.Forms.ToolStripItemImageScaling, System.Windows.Forms">
<value>None</value>
</data>
<data name="showNavArrowsBtn.ShortcutKeys" type="System.Windows.Forms.Keys, System.Windows.Forms">
<value>F6</value>
</data>
Expand All @@ -1283,6 +1286,9 @@
<data name="showToolbarBtn.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 10pt</value>
</data>
<data name="showToolbarBtn.ImageScaling" type="System.Windows.Forms.ToolStripItemImageScaling, System.Windows.Forms">
<value>None</value>
</data>
<data name="showToolbarBtn.ShortcutKeys" type="System.Windows.Forms.Keys, System.Windows.Forms">
<value>F7</value>
</data>
Expand All @@ -1295,6 +1301,9 @@
<data name="showStatusbarBtn.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 10pt</value>
</data>
<data name="showStatusbarBtn.ImageScaling" type="System.Windows.Forms.ToolStripItemImageScaling, System.Windows.Forms">
<value>None</value>
</data>
<data name="showStatusbarBtn.ShortcutKeys" type="System.Windows.Forms.Keys, System.Windows.Forms">
<value>F8</value>
</data>
Expand All @@ -1307,6 +1316,9 @@
<data name="showMenuItem.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 10pt</value>
</data>
<data name="showMenuItem.ImageScaling" type="System.Windows.Forms.ToolStripItemImageScaling, System.Windows.Forms">
<value>None</value>
</data>
<data name="showMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>287, 24</value>
</data>
Expand All @@ -1325,6 +1337,9 @@
<data name="wallpaperBtn.Enabled" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="wallpaperBtn.ImageScaling" type="System.Windows.Forms.ToolStripItemImageScaling, System.Windows.Forms">
<value>None</value>
</data>
<data name="wallpaperBtn.ShortcutKeys" type="System.Windows.Forms.Keys, System.Windows.Forms">
<value>Alt+B</value>
</data>
Expand All @@ -1343,6 +1358,9 @@
<data name="qlibToolsep3.Size" type="System.Drawing.Size, System.Drawing">
<value>284, 6</value>
</data>
<data name="copyImageBtn.ImageScaling" type="System.Windows.Forms.ToolStripItemImageScaling, System.Windows.Forms">
<value>None</value>
</data>
<data name="copyImageBtn.ShortcutKeys" type="System.Windows.Forms.Keys, System.Windows.Forms">
<value>Ctrl+C</value>
</data>
Expand All @@ -1352,6 +1370,9 @@
<data name="copyImageBtn.Text" xml:space="preserve">
<value>copy image</value>
</data>
<data name="copyFileBtn.ImageScaling" type="System.Windows.Forms.ToolStripItemImageScaling, System.Windows.Forms">
<value>None</value>
</data>
<data name="copyFileBtn.ShortcutKeys" type="System.Windows.Forms.Keys, System.Windows.Forms">
<value>Ctrl+Shift+C</value>
</data>
Expand All @@ -1361,12 +1382,18 @@
<data name="copyFileBtn.Text" xml:space="preserve">
<value>copy file</value>
</data>
<data name="copyBtn.ImageScaling" type="System.Windows.Forms.ToolStripItemImageScaling, System.Windows.Forms">
<value>None</value>
</data>
<data name="copyBtn.Size" type="System.Drawing.Size, System.Drawing">
<value>287, 24</value>
</data>
<data name="copyBtn.Text" xml:space="preserve">
<value>copy</value>
</data>
<data name="pasteBtn.ImageScaling" type="System.Windows.Forms.ToolStripItemImageScaling, System.Windows.Forms">
<value>None</value>
</data>
<data name="pasteBtn.ShortcutKeys" type="System.Windows.Forms.Keys, System.Windows.Forms">
<value>Ctrl+V</value>
</data>
Expand All @@ -1379,6 +1406,9 @@
<data name="selectAllBtn.Enabled" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="selectAllBtn.ImageScaling" type="System.Windows.Forms.ToolStripItemImageScaling, System.Windows.Forms">
<value>None</value>
</data>
<data name="selectAllBtn.ShortcutKeys" type="System.Windows.Forms.Keys, System.Windows.Forms">
<value>Ctrl+A</value>
</data>
Expand All @@ -1389,7 +1419,7 @@
<value>select all</value>
</data>
<data name="rmbMenu.Size" type="System.Drawing.Size, System.Drawing">
<value>288, 152</value>
<value>288, 174</value>
</data>
<data name="&gt;&gt;rmbMenu.Name" xml:space="preserve">
<value>rmbMenu</value>
Expand Down Expand Up @@ -1569,7 +1599,7 @@
<value>picturePanel</value>
</data>
<data name="&gt;&gt;picturePanel.Type" xml:space="preserve">
<value>quick_picture_viewer.CustomPanel, quick-picture-viewer, Version=3.1.2.0, Culture=neutral, PublicKeyToken=null</value>
<value>quick_picture_viewer.CustomPanel, quick-picture-viewer, Version=3.1.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;picturePanel.Parent" xml:space="preserve">
<value>$this</value>
Expand Down Expand Up @@ -4367,6 +4397,12 @@
<data name="&gt;&gt;openRecursive.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;saveBtn.Name" xml:space="preserve">
<value>saveBtn</value>
</data>
<data name="&gt;&gt;saveBtn.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;saveAsButton.Name" xml:space="preserve">
<value>saveAsButton</value>
</data>
Expand Down Expand Up @@ -4769,12 +4805,6 @@
<data name="&gt;&gt;infoTooltip.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolTip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;saveBtn.Name" xml:space="preserve">
<value>saveBtn</value>
</data>
<data name="&gt;&gt;saveBtn.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>MainForm</value>
</data>
Expand Down
3 changes: 3 additions & 0 deletions quick-picture-viewer/MiniViewForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion quick-picture-viewer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ static class Program
[STAThread]
static void Main(string[] args)
{
if (Environment.OSVersion.Version.Major >= 6) NativeMan.SetProcessDPIAware();
NativeMan.SetProcessDpiAwarenessContext(NativeMan.DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Expand Down
2 changes: 1 addition & 1 deletion quick-picture-viewer/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Minor Versionffgg
// Build Number
// Revision
//
Expand Down
Loading

0 comments on commit 7701254

Please sign in to comment.