Update wx
Removes the need for the RTL hacks in BaseGrid as the bugs have been fixed properly in wx.
This commit is contained in:
parent
416b9809c8
commit
6159f1587d
3 changed files with 3 additions and 36 deletions
2
.gitmodules
vendored
2
.gitmodules
vendored
|
@ -4,7 +4,7 @@
|
||||||
ignore = dirty
|
ignore = dirty
|
||||||
[submodule "wxWidgets"]
|
[submodule "wxWidgets"]
|
||||||
path = vendor/wxWidgets
|
path = vendor/wxWidgets
|
||||||
url = git://github.com/wxWidgets/wxWidgets.git
|
url = git://github.com/Aegisub/wxWidgets.git
|
||||||
ignore = dirty
|
ignore = dirty
|
||||||
[submodule "googletest"]
|
[submodule "googletest"]
|
||||||
path = vendor/googletest
|
path = vendor/googletest
|
||||||
|
|
|
@ -54,39 +54,6 @@
|
||||||
#include <wx/scrolbar.h>
|
#include <wx/scrolbar.h>
|
||||||
#include <wx/sizer.h>
|
#include <wx/sizer.h>
|
||||||
|
|
||||||
namespace {
|
|
||||||
#ifdef __WXMSW__
|
|
||||||
class PaintDC : public wxBufferedDC {
|
|
||||||
wxPaintDC dc;
|
|
||||||
|
|
||||||
public:
|
|
||||||
PaintDC(wxWindow *window) : dc(window) {
|
|
||||||
dc.SetLayoutDirection(wxLayout_LeftToRight);
|
|
||||||
Init(&dc, window->GetClientSize(), 0);
|
|
||||||
if (window->GetLayoutDirection() == wxLayout_RightToLeft) {
|
|
||||||
SetLayoutDirection(wxLayout_RightToLeft);
|
|
||||||
SetLogicalOrigin(GetSize().GetWidth(), 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
~PaintDC() {
|
|
||||||
SetLayoutDirection(wxLayout_LeftToRight);
|
|
||||||
SetLogicalOrigin(0, 0);
|
|
||||||
UnMask();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Clear() {
|
|
||||||
auto origin = GetLogicalOrigin();
|
|
||||||
SetLogicalOrigin(0, 0);
|
|
||||||
wxBufferedDC::Clear();
|
|
||||||
SetLogicalOrigin(origin.x, origin.y);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
#else
|
|
||||||
typedef wxAutoBufferedPaintDC PaintDC;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
GRID_SCROLLBAR = 1730,
|
GRID_SCROLLBAR = 1730,
|
||||||
MENU_SHOW_COL = 1250 // Needs 15 IDs after this
|
MENU_SHOW_COL = 1250 // Needs 15 IDs after this
|
||||||
|
@ -319,7 +286,7 @@ void BaseGrid::OnPaint(wxPaintEvent &) {
|
||||||
GetClientSize(&w,&h);
|
GetClientSize(&w,&h);
|
||||||
w -= scrollBar->GetSize().GetWidth();
|
w -= scrollBar->GetSize().GetWidth();
|
||||||
|
|
||||||
PaintDC dc(this);
|
wxAutoBufferedPaintDC dc(this);
|
||||||
dc.SetFont(font);
|
dc.SetFont(font);
|
||||||
|
|
||||||
dc.SetBackground(row_colors.Default);
|
dc.SetBackground(row_colors.Default);
|
||||||
|
|
2
vendor/wxWidgets
vendored
2
vendor/wxWidgets
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit be35fb7a15e8817ecd898ae9558e222ed63e572b
|
Subproject commit 7df5d5a901abb0f34e226d2c9acee94c378f634a
|
Loading…
Reference in a new issue