[haiku-commits] haiku: hrev50910 - src/kits/interface

  • From: pulkomandy@xxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 29 Jan 2017 21:54:03 +0100 (CET)

hrev50910 adds 1 changeset to branch 'master'
old head: 99dde24c8669f32ab9aa3d663e754b56e66e8b48
new head: c7fabe22b4ed3a419e4579971848b9e1614c2f6e
overview: 
http://cgit.haiku-os.org/haiku/log/?qt=range&q=c7fabe22b4ed+%5E99dde24c8669

----------------------------------------------------------------------------

c7fabe22b4ed: ControlLook: Fix redraw issues introduced in hrev50893.
  
  * I was pretty sure that I didn't change the logic, but turns out
    I was wrong. Sorry about that.
  * Adjusted copy-pasted comments.
  
  Signed-off-by: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
  
  Fixes #13238.

                                  [ Kacper Kasper <kacperkasper@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev50910
Commit:      c7fabe22b4ed3a419e4579971848b9e1614c2f6e
URL:         http://cgit.haiku-os.org/haiku/commit/?id=c7fabe22b4ed
Author:      Kacper Kasper <kacperkasper@xxxxxxxxx>
Date:        Sun Jan 29 20:13:01 2017 UTC
Committer:   Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Commit-Date: Sun Jan 29 20:48:40 2017 UTC

Ticket:      https://dev.haiku-os.org/ticket/13238

----------------------------------------------------------------------------

1 file changed, 10 insertions(+), 5 deletions(-)
src/kits/interface/ControlLook.cpp | 15 ++++++++++-----

----------------------------------------------------------------------------

diff --git a/src/kits/interface/ControlLook.cpp 
b/src/kits/interface/ControlLook.cpp
index 7a00152..fbaadad 100644
--- a/src/kits/interface/ControlLook.cpp
+++ b/src/kits/interface/ControlLook.cpp
@@ -1445,12 +1445,12 @@ BControlLook::DrawActiveTab(BView* view, BRect& rect, 
const BRect& updateRect,
                        clipping.Exclude(leftBottomCorner);
                        clipping.Exclude(rightBottomCorner);
 
-                       // draw the left top corner
+                       // draw the left bottom corner
                        _DrawRoundCornerLeftBottom(view, leftBottomCorner, 
updateRect, base,
                                edgeShadowColor, edgeLightColor, 
frameLightColor,
                                frameShadowColor, bevelLightColor, 
bevelShadowColor,
                                fillGradient);
-                       // draw the right top corner
+                       // draw the right bottom corner
                        _DrawRoundCornerRightBottom(view, rightBottomCorner, 
updateRect,
                                base, edgeLightColor, frameShadowColor, 
bevelShadowColor,
                                fillGradient);
@@ -1463,7 +1463,7 @@ BControlLook::DrawActiveTab(BView* view, BRect& rect, 
const BRect& updateRect,
                        _DrawRoundCornerLeftTop(view, leftTopCorner, 
updateRect, base,
                                edgeShadowColor, frameLightColor, 
bevelLightColor,
                                fillGradient);
-                       // draw the left top corner
+                       // draw the left bottom corner
                        _DrawRoundCornerLeftBottom(view, leftBottomCorner, 
updateRect, base,
                                edgeShadowColor, edgeLightColor, 
frameLightColor,
                                frameShadowColor, bevelLightColor, 
bevelShadowColor,
@@ -1478,7 +1478,7 @@ BControlLook::DrawActiveTab(BView* view, BRect& rect, 
const BRect& updateRect,
                                edgeShadowColor, edgeLightColor, 
frameLightColor,
                                frameShadowColor, bevelLightColor, 
bevelShadowColor,
                                fillGradient);
-                       // draw the right top corner
+                       // draw the right bottom corner
                        _DrawRoundCornerRightBottom(view, rightBottomCorner, 
updateRect,
                                base, edgeLightColor, frameShadowColor, 
bevelShadowColor,
                                fillGradient);
@@ -1569,29 +1569,34 @@ BControlLook::DrawInactiveTab(BView* view, BRect& rect, 
const BRect& updateRect,
                fillGradient.AddColor(tint_color(base, 1.08), 255);
        }
 
+       BRect background = rect;
        uint32 bordersToDraw = 0;
        switch (side) {
                case B_TOP_BORDER:
                        bordersToDraw = (B_LEFT_BORDER | B_TOP_BORDER | 
B_RIGHT_BORDER);
                        rect.top += 4;
+                       background.bottom = rect.top;
                        break;
                case B_BOTTOM_BORDER:
                        bordersToDraw = (B_LEFT_BORDER | B_BOTTOM_BORDER | 
B_RIGHT_BORDER);
                        rect.bottom -= 4;
+                       background.top = rect.bottom;
                        break;
                case B_LEFT_BORDER:
                        bordersToDraw = (B_LEFT_BORDER | B_BOTTOM_BORDER | 
B_TOP_BORDER);
                        rect.left += 4;
+                       background.right = rect.left;
                        break;
                case B_RIGHT_BORDER:
                        bordersToDraw = (B_RIGHT_BORDER | B_BOTTOM_BORDER | 
B_TOP_BORDER);
                        rect.right -= 4;
+                       background.left = rect.right;
                break;
        }
 
        // active tabs stand out at the top, but this is an inactive tab
        view->SetHighColor(base);
-       view->FillRect(rect);
+       view->FillRect(background);
 
        // frame and fill
        _DrawFrame(view, rect, edgeShadowColor, edgeShadowColor, edgeLightColor,


Other related posts:

  • » [haiku-commits] haiku: hrev50910 - src/kits/interface - pulkomandy