Operating system : Debian Testing, Xorg with 200% scaling
wxPython version & source : 4.0.7 gtk3 (phoenix) wxWidgets 3.0.4 from debian repos
Python version & source : 3.7.5 from debian repos
Once Debian updated wxpython version to 4.0.7, i immediately realized that this issue is fixed: https://github.com/wxWidgets/Phoenix/issues/1327
I noticed it because my app started using hires assets, however, it did not scale them appropriately.
import wx
class MainFrame(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None, wx.ID_ANY, 'test')
sizer = wx.BoxSizer(wx.HORIZONTAL)
img = wx.Image('img64.png')
scale = wx.GetApp().GetTopWindow().GetContentScaleFactor()
print(scale)
#img.Rescale(img.GetWidth() // int(scale), img.GetHeight() // int(scale))
bmp = wx.StaticBitmap(self, wx.ID_ANY, img.ConvertToBitmap())
sizer.Add(bmp, 0, wx.ALL, 0)
self.SetSizer(sizer)
self.Show()
app = wx.App(False)
mf = MainFrame()
app.MainLoop()
Using this image as a resource: