From 27e77d441dba4314236e4eb5ea1821d1699e77c3 Mon Sep 17 00:00:00 2001 From: Adubbz Date: Sun, 18 Feb 2024 10:03:03 +1100 Subject: [PATCH] Fix DPI for Windows --- README.md | 10 ++++------ mymcplusplus/gui/gui.py | 11 +++++++---- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 3791630..1f8d1d1 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,9 @@ It is based on [mymc+](https://git.sr.ht/~thestr4ng3r/mymcplus) by Florian Märk Changes that have been made from the original code include the following: -* Ported to Python 3 and wxPython Phoenix -* Replaced the natively implemented 3D icon renderer with a cross-platform solution using OpenGL 3.2 Core -* Added support for importing PSV files (as created by the PlayStation 3) -* Added a py.test based test suite -* Many other small refactorings... +* Added support for MemCard PRO2 .mc2 files +* Usability improvements +* Various bug fixes Please note that mymc++ is released under the **GPLv3, not Public Domain**! @@ -85,7 +83,7 @@ It is always necessary to specify the path to a memory card image with `-i ` first. For example: ``` -mymcplus -i empty.ps2 format +mymcplusplus -i empty.ps2 format ``` creates the file `empty.ps2` and formats it as an empty memory card. diff --git a/mymcplusplus/gui/gui.py b/mymcplusplus/gui/gui.py index 7149369..a7fa531 100644 --- a/mymcplusplus/gui/gui.py +++ b/mymcplusplus/gui/gui.py @@ -30,6 +30,10 @@ sys.setdefaultencoding("mbcs") import wx +import ctypes +try: ctypes.windll.shcore.SetProcessDpiAwareness(True) +except: pass + from .. import ps2mc, ps2iconsys from ..round import * from ..save import ps2save @@ -120,8 +124,8 @@ def __init__(self, parent, title, mcname = None): self.mcname = None self.icon_win = None - size = (800, 400) - wx.Frame.__init__(self, parent, wx.ID_ANY, title, size = size) + wx.Frame.__init__(self, parent, wx.ID_ANY, title) + self.SetClientSize(self.FromDIP((800, 400))) self.Bind(wx.EVT_CLOSE, self.evt_close) @@ -157,8 +161,7 @@ def __init__(self, parent, title, mcname = None): self.CreateToolBar(wx.TB_HORIZONTAL) self.toolbar = toolbar = self.GetToolBar() - tbsize = (32, 32) - toolbar.SetToolBitmapSize(tbsize) + toolbar.SetToolBitmapSize(self.FromDIP(wx.Size(50, 50))) add_tool(toolbar, self.ID_CMD_OPEN, "Open", wx.ART_FILE_OPEN, "open.png") toolbar.AddSeparator() add_tool(toolbar, self.ID_CMD_IMPORT, "Import", None, "import.png")