X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c36cdfc084f779b67668af8cad3eb6906182af21..8064223b7b1b3657363b7a635c381b9269d95e55:/src/aui/auibook.cpp diff --git a/src/aui/auibook.cpp b/src/aui/auibook.cpp index 289faccafa..6ee896da22 100644 --- a/src/aui/auibook.cpp +++ b/src/aui/auibook.cpp @@ -194,9 +194,7 @@ wxAuiDefaultTabArt::wxAuiDefaultTabArt() m_tab_ctrl_height = 0; #ifdef __WXMAC__ - wxBrush toolbarbrush; - toolbarbrush.MacSetTheme( kThemeBrushToolbarBackground ); - wxColor base_colour = toolbarbrush.GetColour(); + wxColor base_colour = wxColour( wxMacCreateCGColorFromHITheme(kThemeBrushToolbarBackground)); #else wxColor base_colour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE); #endif @@ -1613,6 +1611,11 @@ void wxAuiTabContainer::Render(wxDC* raw_dc, wxWindow* wnd) return; wxMemoryDC dc; + + // use the same layout direction as the window DC uses to ensure that the + // text is rendered correctly + dc.SetLayoutDirection(raw_dc->GetLayoutDirection()); + wxBitmap bmp; size_t i; size_t page_count = m_pages.GetCount(); @@ -2578,7 +2581,19 @@ void wxAuiTabCtrl::OnChar(wxKeyEvent& event) int newPage = -1; - if (key == WXK_RIGHT) + int forwardKey, backwardKey; + if (GetLayoutDirection() == wxLayout_RightToLeft) + { + forwardKey = WXK_LEFT; + backwardKey = WXK_RIGHT; + } + else + { + forwardKey = WXK_RIGHT; + backwardKey = WXK_LEFT; + } + + if (key == forwardKey) { if (m_pages.GetCount() > 1) { @@ -2588,7 +2603,7 @@ void wxAuiTabCtrl::OnChar(wxKeyEvent& event) newPage = GetActivePage() + 1; } } - else if (key == WXK_LEFT) + else if (key == backwardKey) { if (m_pages.GetCount() > 1) { @@ -3067,7 +3082,7 @@ bool wxAuiNotebook::InsertPage(size_t page_idx, wxASSERT_MSG(page, wxT("page pointer must be non-NULL")); if (!page) return false; - + page->Reparent(this); wxAuiNotebookPage info;