From 519337dee72568dcf3b09e593f28b7bd1972afdd Mon Sep 17 00:00:00 2001 From: Benjamin Williams Date: Fri, 10 Nov 2006 13:47:06 +0000 Subject: [PATCH 1/1] fixed clipping regression in wxAuiNotebook git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/aui/auibook.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/aui/auibook.cpp b/src/aui/auibook.cpp index 84ed97b2b2..6aa541bfa9 100644 --- a/src/aui/auibook.cpp +++ b/src/aui/auibook.cpp @@ -389,13 +389,17 @@ void wxAuiDefaultTabArt::DrawTab(wxDC& dc, // create points that will make the tab outline + int clip_width = tab_width; + if (tab_x + clip_width > in_rect.x + in_rect.width) + clip_width = (in_rect.x + in_rect.width) - tab_x; + wxPoint clip_points[6]; - clip_points[0] = wxPoint(tab_x, tab_y+tab_height-3); - clip_points[1] = wxPoint(tab_x, tab_y+2); - clip_points[2] = wxPoint(tab_x+2, tab_y); - clip_points[3] = wxPoint(tab_x+tab_width-1, tab_y); - clip_points[4] = wxPoint(tab_x+tab_width+1, tab_y+2); - clip_points[5] = wxPoint(tab_x+tab_width+1, tab_y+tab_height-3); + clip_points[0] = wxPoint(tab_x, tab_y+tab_height-3); + clip_points[1] = wxPoint(tab_x, tab_y+2); + clip_points[2] = wxPoint(tab_x+2, tab_y); + clip_points[3] = wxPoint(tab_x+clip_width-1, tab_y); + clip_points[4] = wxPoint(tab_x+clip_width+1, tab_y+2); + clip_points[5] = wxPoint(tab_x+clip_width+1, tab_y+tab_height-3); // set the clipping region for the tab -- wxRegion clipping_region(6, clip_points); -- 2.45.2