X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b039ef1d48fcc5b2a68374a8618c71ebf9ccfec8..35e7d66928423b5b65907acd09d01bc3bd293e03:/src/univ/notebook.cpp diff --git a/src/univ/notebook.cpp b/src/univ/notebook.cpp index 6f15388aa6..c97f7189b8 100644 --- a/src/univ/notebook.cpp +++ b/src/univ/notebook.cpp @@ -48,7 +48,7 @@ // due to unsigned type nPage is always >= 0 #define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((size_t(nPage)) < GetPageCount())) #else -#define IS_VALID_PAGE(nPage) ((size_t(nPage)) < GetPageCount()) +#define IS_VALID_PAGE(nPage) (((size_t)nPage) < GetPageCount()) #endif // ---------------------------------------------------------------------------- @@ -745,8 +745,16 @@ wxRect wxNotebook::GetTabsPart() const const wxSize indent = GetRenderer()->GetTabIndent(); if ( IsVertical() ) { - rect.x += indent.y; rect.y += indent.x; + if ( dir == wxLEFT ) + { + rect.x += indent.y; + rect.width -= indent.y; + } + else // wxRIGHT + { + rect.width -= indent.y; + } } else // horz { @@ -1285,9 +1293,9 @@ void wxNotebook::DoSetSize(int x, int y, wxSize old_client_size = GetClientSize(); wxControl::DoSetSize(x, y, width, height, sizeFlags); - + wxSize new_client_size = GetClientSize(); - + if (old_client_size != new_client_size) Relayout(); }