mirror of https://github.com/PCSX2/pcsx2.git
gui: Fix about dialog logo DPI scaling
Also dynamically allocate the wxStaticBitmap control since its parent window will delete it, which can cause issues.
This commit is contained in:
parent
1dc5d07696
commit
363b87b334
|
@ -34,13 +34,15 @@ using namespace pxSizerFlags;
|
|||
|
||||
Dialogs::AboutBoxDialog::AboutBoxDialog(wxWindow* parent)
|
||||
: wxDialogWithHelpers(parent, AddAppName(_("About %s")), pxDialogFlags())
|
||||
, m_bitmap_logo(this, wxID_ANY, wxBitmap(EmbeddedImage<res_Logo>().Get()),
|
||||
wxDefaultPosition, wxDefaultSize)
|
||||
{
|
||||
// Main layout
|
||||
SetMinWidth(MSW_GetDPIScale() * 460);
|
||||
const float scale = MSW_GetDPIScale();
|
||||
SetMinWidth(scale * 460);
|
||||
|
||||
*this += m_bitmap_logo | StdCenter();
|
||||
wxImage img = EmbeddedImage<res_Logo>().Get();
|
||||
img.Rescale(img.GetWidth() * scale, img.GetHeight() * scale, wxIMAGE_QUALITY_HIGH);
|
||||
auto bitmap_logo = new wxStaticBitmap(this, wxID_ANY, wxBitmap(img));
|
||||
|
||||
*this += bitmap_logo | StdCenter();
|
||||
|
||||
#ifdef _WIN32
|
||||
const int padding = 15;
|
||||
|
|
|
@ -60,9 +60,6 @@ namespace Dialogs
|
|||
{
|
||||
class AboutBoxDialog: public wxDialogWithHelpers
|
||||
{
|
||||
protected:
|
||||
wxStaticBitmap m_bitmap_logo;
|
||||
|
||||
public:
|
||||
AboutBoxDialog( wxWindow* parent=NULL );
|
||||
virtual ~AboutBoxDialog() = default;
|
||||
|
|
Loading…
Reference in New Issue