meaning of left/right keys should be inversed in RTL locale (patch 1863866)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -154,7 +154,7 @@ static void DrawFocusRect(wxWindow* win, wxDC& dc, const wxRect& rect, int flags
|
|||||||
rect.height );
|
rect.height );
|
||||||
#elif (defined(__WXMAC__))
|
#elif (defined(__WXMAC__))
|
||||||
|
|
||||||
#if wxMAC_USE_CORE_GRAPHICS
|
#if wxMAC_USE_CORE_GRAPHICS
|
||||||
{
|
{
|
||||||
CGRect cgrect = CGRectMake( rect.x , rect.y , rect.width, rect.height ) ;
|
CGRect cgrect = CGRectMake( rect.x , rect.y , rect.width, rect.height ) ;
|
||||||
|
|
||||||
@@ -2735,7 +2735,19 @@ void wxAuiTabCtrl::OnChar(wxKeyEvent& event)
|
|||||||
|
|
||||||
int newPage = -1;
|
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)
|
if (m_pages.GetCount() > 1)
|
||||||
{
|
{
|
||||||
@@ -2745,7 +2757,7 @@ void wxAuiTabCtrl::OnChar(wxKeyEvent& event)
|
|||||||
newPage = GetActivePage() + 1;
|
newPage = GetActivePage() + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (key == WXK_LEFT)
|
else if (key == backwardKey)
|
||||||
{
|
{
|
||||||
if (m_pages.GetCount() > 1)
|
if (m_pages.GetCount() > 1)
|
||||||
{
|
{
|
||||||
@@ -3008,7 +3020,7 @@ wxAuiNotebook::~wxAuiNotebook()
|
|||||||
{
|
{
|
||||||
// Indicate we're deleting pages
|
// Indicate we're deleting pages
|
||||||
m_isBeingDeleted = true;
|
m_isBeingDeleted = true;
|
||||||
|
|
||||||
while ( GetPageCount() > 0 )
|
while ( GetPageCount() > 0 )
|
||||||
DeletePage(0);
|
DeletePage(0);
|
||||||
|
|
||||||
@@ -3208,7 +3220,7 @@ bool wxAuiNotebook::InsertPage(size_t page_idx,
|
|||||||
wxASSERT_MSG(page, wxT("page pointer must be non-NULL"));
|
wxASSERT_MSG(page, wxT("page pointer must be non-NULL"));
|
||||||
if (!page)
|
if (!page)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
page->Reparent(this);
|
page->Reparent(this);
|
||||||
|
|
||||||
wxAuiNotebookPage info;
|
wxAuiNotebookPage info;
|
||||||
|
Reference in New Issue
Block a user