From ecce638c011ddb2ac42dec50cdaaf5df3fb9f1dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Tue, 10 Jun 2014 15:40:20 +0000 Subject: [PATCH] [GB.GUI.BASE] * BUG: Correctly clip GridView column and row headers again. git-svn-id: svn://localhost/gambas/trunk@6311 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- comp/src/gb.gui.base/.project | 2 +- .../gb.gui.base/.src/GridView/GridView.class | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/comp/src/gb.gui.base/.project b/comp/src/gb.gui.base/.project index d82a7ee0a..3ea867626 100644 --- a/comp/src/gb.gui.base/.project +++ b/comp/src/gb.gui.base/.project @@ -6,7 +6,7 @@ Version=3.5.90 VersionFile=1 Component=gb.image Component=gb.gui -Environment="GB_GUI=gb.gtk\nLIBOVERLAY_SCROLLBAR=0" +Environment="GB_GUI=gb.qt4\nLIBOVERLAY_SCROLLBAR=0" TabSize=2 Type=Component Packager=1 diff --git a/comp/src/gb.gui.base/.src/GridView/GridView.class b/comp/src/gb.gui.base/.src/GridView/GridView.class index df25db7e8..c750910d9 100644 --- a/comp/src/gb.gui.base/.src/GridView/GridView.class +++ b/comp/src/gb.gui.base/.src/GridView/GridView.class @@ -393,22 +393,32 @@ Public Sub ScrollArea_Draw() iCol2 = I With $hColumns[I] If .W > 0 And If $iHeader And Horizontal Then - 'Draw.ClipRect = hClip.Intersection(Rect(X - 1, F, .Width + 1, H - F)) + ''If $bGrid Then Draw.FillRect(X - 1, F, 1, H - F, iGrid) If System.RightToLeft Then Paint.FillRect(X, F, 1, H - F, iGrid) Else Paint.FillRect(X - 1, F, 1, H - F, iGrid) Endif + + Paint.Save + If iSort = I Then WA = Min(16, H - F) - Style.PaintArrow(X + .Width - WA, F, WA, H - F, If(bAscent, Align.Bottom, Align.Top)) + If WA < .Width Then Style.PaintArrow(X + .Width - WA, F, WA, H - F, If(bAscent, Align.Bottom, Align.Top)) 'Draw.ClipRect = hClip.Intersection(Rect(X, F, Max(0, .Width - WA - 2), H - F)) 'If Draw.ClipRect Then Draw.Text(.Text, X + 4, F, .Width - WA - 8, H - F, .Alignment) + Paint.Rectangle(X + 1, F, Max(0, .Width - WA - 4), H - F) + Paint.Clip Paint.DrawText(.Text, X + 4, F, .Width - WA - 8, H - F, .Alignment) Else + Paint.Rectangle(X + 1, F, .Width - 2, H - F) + Paint.Clip Paint.DrawText(.Text, X + 4, F, .Width - 8, H - F, .Alignment) Endif + + Paint.Restore + Endif X += .Width End With @@ -457,10 +467,13 @@ Public Sub ScrollArea_Draw() H = $hRows._GetRowHeight(I) If H > 0 And If $iHeader And Vertical Then Paint.FillRect(X, Y - 1, W - F, 1, iGrid) - 'Draw.ClipRect = hClip.Intersection(Rect(X, Y, W - F, H)) + Paint.Save + Paint.Rectangle(X, Y + 1, W - F, H - 3) + Paint.Clip If I = $iRow Then Paint.Font.Bold = True Paint.DrawText($hRows._GetRowText(I), X, Y + 2, W - F, H - 2, Align.Center) If I = $iRow Then Paint.Font.Bold = False + Paint.Restore Endif 'Draw.Style.Handle(W - 2, Y, 2, H, True)