mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
e8cb4119b8
This removes a Dolphin-specific patch to the wxWidgets3 code for the following reasons: * Calling wxWindowGTK::DoSetSize on a top-level window can end up calling wxTopLevelWindowGTK::DoMoveWindow, which triggers an assert because it is not supposed to be called for a top-level wxWindow. * We should not be patching the wxWidgets code because that means the toolbars will still be broken if someone builds without using the WX that is in our Externals. Instead, we now use a derived class for wxAuiToolBar and override DoSetSize() to remove the problematic behaviour to get the same effect (fixing toolbars) but without changing Externals code and without causing asserts and other issues.
23 lines
723 B
C++
23 lines
723 B
C++
// Copyright 2016 Dolphin Emulator Project
|
|
// Licensed under GPLv2+
|
|
// Refer to the license.txt file included.
|
|
|
|
#include <wx/aui/auibar.h>
|
|
#include <wx/window.h>
|
|
|
|
// This fixes wxAuiToolBar setting itself to 21 pixels wide regardless of content
|
|
// because of a wxWidgets issue as described here: https://dolp.in/pr4013#issuecomment-233096214
|
|
// It overrides DoSetSize() to remove the clamping in the original WX code
|
|
// which is causing display issues on Linux and OS X.
|
|
class DolphinAuiToolBar : public wxAuiToolBar
|
|
{
|
|
public:
|
|
using wxAuiToolBar::wxAuiToolBar;
|
|
|
|
protected:
|
|
void DoSetSize(int x, int y, int width, int height, int size_flags) override
|
|
{
|
|
wxWindow::DoSetSize(x, y, width, height, size_flags);
|
|
}
|
|
};
|