简体   繁体   中英

wxPython AboutDialog icon not centered

I have a problem with the wx.AboutBox . My image (or icon if you want) is not centered as the one in the tutorial - I'm on Windows 7 and the tutorial is likely to be tested on Ubuntu - is that it?

我的约会:

教程:

The code:

    about = wx.AboutDialogInfo() 

    about.SetIcon(wx.Icon('Fartberegneren.png', wx.BITMAP_TYPE_PNG))
    about.SetName('Fart Beregneren')
    about.SetVersion('1.0')
    about.SetDescription(description)
    about.SetCopyright('(C) 2012 - 2013 Casper William Medom Nielsen')
    about.SetWebSite('http://www.casperwmn.dk')
    about.AddDeveloper('Casper William Medom Nielsen')
    about.AddDeveloper('Rasmus Bøje Larsen')
    about.AddDocWriter('Casper William Medom Nielsen')
    about.AddDocWriter('Rasmus Bøje Larsen')

    wx.AboutBox(about)

I got an answer by reporting it:

"It's not a bug, it's an attempt to approximate the native behaviour. There is no well-defined standard for the about box under Windows but the most usual layout puts the icon to the left. More generally speaking, wxAboutBox doesn't make any guarantees about its appearance under the given platform as it wraps the native dialog if available. If you need something looking in the same way under all platforms you can always (easily) use a generic dialog in your own code."

Not only your code, but even the demo demonstrates the same problem for me on Windows 7 with wxPython 2.8.12.1. Looks like a bug to me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM