diff --git a/src/kits/interface/ControlLook.cpp b/src/kits/interface/ControlLook.cpp
index 642d300..e99e2d5 100644
--- a/src/kits/interface/ControlLook.cpp
+++ b/src/kits/interface/ControlLook.cpp
@@ -1355,7 +1355,7 @@ BControlLook::DrawSliderHashMarks(BView* view, BRect& rect,
 
 void
 BControlLook::DrawActiveTab(BView* view, BRect& rect, const BRect& updateRect,
-	const rgb_color& base, uint32 flags, uint32 borders)
+	const rgb_color& base, uint32 flags, uint32 borders, uint32 orientation)
 {
 	if (!rect.IsValid() || !rect.Intersects(updateRect))
 		return;
@@ -1405,44 +1405,136 @@ BControlLook::DrawActiveTab(BView* view, BRect& rect, const BRect& updateRect,
 
 	static const float kRoundCornerRadius = 4.0f;
 
-	// left top corner dimensions
-	BRect leftTopCorner(rect);
-	leftTopCorner.right = floorf(leftTopCorner.left + kRoundCornerRadius);
-	leftTopCorner.bottom = floorf(rect.top + kRoundCornerRadius);
-	clipping.Exclude(leftTopCorner);
-
-	// draw the left top corner
-	_DrawRoundCornerLeftTop(view, leftTopCorner, updateRect, base,
-		edgeShadowColor, frameLightColor, bevelLightColor,
-		fillGradient);
-
-	// right top corner dimensions
-	BRect rightTopCorner(rect);
-	rightTopCorner.right = floorf(rect.right);
-	rightTopCorner.left = floorf(rightTopCorner.right - kRoundCornerRadius);
-	rightTopCorner.bottom = floorf(rect.top + kRoundCornerRadius);
-	clipping.Exclude(rightTopCorner);
-
-	// draw the right top corner
-	_DrawRoundCornerRightTop(view, rightTopCorner, updateRect, base,
-		edgeShadowColor, edgeLightColor, frameLightColor,
-		frameShadowColor, bevelLightColor, bevelShadowColor,
-		fillGradient);
+	if(orientation == 0) {
+		// left top corner dimensions
+		BRect leftTopCorner(rect);
+		leftTopCorner.right = floorf(leftTopCorner.left + kRoundCornerRadius);
+		leftTopCorner.bottom = floorf(rect.top + kRoundCornerRadius);
+		clipping.Exclude(leftTopCorner);
+
+		// draw the left top corner
+		_DrawRoundCornerLeftTop(view, leftTopCorner, updateRect, base,
+			edgeShadowColor, frameLightColor, bevelLightColor,
+			fillGradient);
+
+		// right top corner dimensions
+		BRect rightTopCorner(rect);
+		rightTopCorner.right = floorf(rect.right);
+		rightTopCorner.left = floorf(rightTopCorner.right - kRoundCornerRadius);
+		rightTopCorner.bottom = floorf(rect.top + kRoundCornerRadius);
+		clipping.Exclude(rightTopCorner);
+
+		// draw the right top corner
+		_DrawRoundCornerRightTop(view, rightTopCorner, updateRect, base,
+			edgeShadowColor, edgeLightColor, frameLightColor,
+			frameShadowColor, bevelLightColor, bevelShadowColor,
+			fillGradient);
+	} else if(orientation == 1) {
+		// left bottom corner dimensions
+		BRect leftBottomCorner(rect);
+		leftBottomCorner.right = floorf(leftBottomCorner.left + kRoundCornerRadius);
+		leftBottomCorner.top = floorf(rect.bottom - kRoundCornerRadius);
+		clipping.Exclude(leftBottomCorner);
+
+		// draw the left top corner
+		_DrawRoundCornerLeftBottom(view, leftBottomCorner, updateRect, base,
+			edgeShadowColor, edgeLightColor, frameLightColor,
+			frameShadowColor, bevelLightColor, bevelShadowColor,
+			fillGradient);
+
+		// right top corner dimensions
+		BRect rightBottomCorner(rect);
+		rightBottomCorner.right = floorf(rect.right);
+		rightBottomCorner.left = floorf(rightBottomCorner.right - kRoundCornerRadius);
+		rightBottomCorner.top = floorf(rect.bottom - kRoundCornerRadius);
+		clipping.Exclude(rightBottomCorner);
+
+		// draw the right top corner
+		_DrawRoundCornerRightBottom(view, rightBottomCorner, updateRect, base,
+			edgeLightColor, frameShadowColor, bevelShadowColor,
+			fillGradient);
+	} else if(orientation == 2) {
+		// left top corner dimensions
+		BRect leftTopCorner(rect);
+		leftTopCorner.right = floorf(leftTopCorner.left + kRoundCornerRadius);
+		leftTopCorner.bottom = floorf(rect.top + kRoundCornerRadius);
+		clipping.Exclude(leftTopCorner);
+
+		// draw the left top corner
+		_DrawRoundCornerLeftTop(view, leftTopCorner, updateRect, base,
+			edgeShadowColor, frameLightColor, bevelLightColor,
+			fillGradient);
+
+		// left bottom corner dimensions
+		BRect leftBottomCorner(rect);
+		leftBottomCorner.right = floorf(leftBottomCorner.left + kRoundCornerRadius);
+		leftBottomCorner.top = floorf(rect.bottom - kRoundCornerRadius);
+		clipping.Exclude(leftBottomCorner);
+
+		// draw the left top corner
+		_DrawRoundCornerLeftBottom(view, leftBottomCorner, updateRect, base,
+			edgeShadowColor, edgeLightColor, frameLightColor,
+			frameShadowColor, bevelLightColor, bevelShadowColor,
+			fillGradient);
+	} else if(orientation == 3) {
+		// right top corner dimensions
+		BRect rightTopCorner(rect);
+		rightTopCorner.right = floorf(rect.right);
+		rightTopCorner.left = floorf(rightTopCorner.right - kRoundCornerRadius);
+		rightTopCorner.bottom = floorf(rect.top + kRoundCornerRadius);
+		clipping.Exclude(rightTopCorner);
+
+		// draw the right top corner
+		_DrawRoundCornerRightTop(view, rightTopCorner, updateRect, base,
+			edgeShadowColor, edgeLightColor, frameLightColor,
+			frameShadowColor, bevelLightColor, bevelShadowColor,
+			fillGradient);
+
+		// right top corner dimensions
+		BRect rightBottomCorner(rect);
+		rightBottomCorner.right = floorf(rect.right);
+		rightBottomCorner.left = floorf(rightBottomCorner.right - kRoundCornerRadius);
+		rightBottomCorner.top = floorf(rect.bottom - kRoundCornerRadius);
+		clipping.Exclude(rightBottomCorner);
+
+		// draw the right top corner
+		_DrawRoundCornerRightBottom(view, rightBottomCorner, updateRect, base,
+			edgeLightColor, frameShadowColor, bevelShadowColor,
+			fillGradient);
+	}
 
 	// clip out the corners
 	view->ConstrainClippingRegion(&clipping);
+	
+	uint32 bordersToDraw = 0;
+	if(orientation == 0) {
+		bordersToDraw = (B_LEFT_BORDER | B_TOP_BORDER | B_RIGHT_BORDER);
+	} else if(orientation == 1) {
+		bordersToDraw = (B_LEFT_BORDER | B_BOTTOM_BORDER | B_RIGHT_BORDER);
+	} else if(orientation == 2) { // left
+		bordersToDraw = (B_LEFT_BORDER | B_BOTTOM_BORDER | B_TOP_BORDER);
+	} else if(orientation == 3) { // right
+		bordersToDraw = (B_RIGHT_BORDER | B_BOTTOM_BORDER | B_TOP_BORDER);
+	}
 
 	// draw the rest of frame and fill
 	_DrawFrame(view, rect, edgeShadowColor, edgeShadowColor, edgeLightColor,
 		edgeLightColor,
-		borders & (B_LEFT_BORDER | B_TOP_BORDER | B_RIGHT_BORDER));
-	if ((borders & B_LEFT_BORDER) == 0)
-		rect.left++;
-	if ((borders & B_RIGHT_BORDER) == 0)
-		rect.right--;
+		borders & bordersToDraw);
+	if(orientation == 0 || orientation == 1) {
+		if ((borders & B_LEFT_BORDER) == 0)
+			rect.left++;
+		if ((borders & B_RIGHT_BORDER) == 0)
+			rect.right--;
+	} else {
+		if ((borders & B_TOP_BORDER) == 0)
+			rect.top++;
+		if ((borders & B_BOTTOM_BORDER) == 0)
+			rect.bottom--;
+	}
 
 	_DrawFrame(view, rect, frameLightColor, frameLightColor, frameShadowColor,
-		frameShadowColor, B_LEFT_BORDER | B_TOP_BORDER | B_RIGHT_BORDER);
+		frameShadowColor, bordersToDraw);
 
 	_DrawFrame(view, rect, bevelLightColor, bevelLightColor, bevelShadowColor,
 		bevelShadowColor);
@@ -1456,7 +1548,7 @@ BControlLook::DrawActiveTab(BView* view, BRect& rect, const BRect& updateRect,
 
 void
 BControlLook::DrawInactiveTab(BView* view, BRect& rect, const BRect& updateRect,
-	const rgb_color& base, uint32 flags, uint32 borders)
+	const rgb_color& base, uint32 flags, uint32 borders, uint32 orientation)
 {
 	if (!rect.IsValid() || !rect.Intersects(updateRect))
 		return;
@@ -1491,26 +1583,50 @@ BControlLook::DrawInactiveTab(BView* view, BRect& rect, const BRect& updateRect,
 		fillGradient.AddColor(tint_color(base, 1.08), 255);
 	}
 
+	uint32 bordersToDraw = 0;
+	if(orientation == 0) {
+		bordersToDraw = (B_LEFT_BORDER | B_TOP_BORDER | B_RIGHT_BORDER);
+		rect.top += 4;
+	} else if(orientation == 1) {
+		bordersToDraw = (B_LEFT_BORDER | B_BOTTOM_BORDER | B_RIGHT_BORDER);
+		rect.bottom -= 4;
+	} else if(orientation == 2) { // left
+		bordersToDraw = (B_LEFT_BORDER | B_BOTTOM_BORDER | B_TOP_BORDER);
+		rect.left += 4;
+	} else if(orientation == 3) { // right
+		bordersToDraw = (B_RIGHT_BORDER | B_BOTTOM_BORDER | B_TOP_BORDER);
+		rect.right -= 4;
+	}
+	
 	// active tabs stand out at the top, but this is an inactive tab
 	view->SetHighColor(base);
-	view->FillRect(BRect(rect.left, rect.top, rect.right, rect.top + 4));
-	rect.top += 4;
+	view->FillRect(rect);
 
 	// frame and fill
 	_DrawFrame(view, rect, edgeShadowColor, edgeShadowColor, edgeLightColor,
 		edgeLightColor,
-		borders & (B_LEFT_BORDER | B_TOP_BORDER | B_RIGHT_BORDER));
+		borders & bordersToDraw);
 
 	_DrawFrame(view, rect, frameLightColor, frameLightColor, frameShadowColor,
 		frameShadowColor,
-		borders & (B_LEFT_BORDER | B_TOP_BORDER | B_RIGHT_BORDER));
+		borders & bordersToDraw);
 
 	if (rect.IsValid()) {
-		_DrawFrame(view, rect, bevelShadowColor, bevelShadowColor,
-			bevelLightColor, bevelLightColor, B_LEFT_BORDER & ~borders);
+		if(orientation == 0 || orientation == 1) {
+			_DrawFrame(view, rect, bevelShadowColor, bevelShadowColor,
+				bevelLightColor, bevelLightColor, B_LEFT_BORDER & ~borders);
+		} else {
+			_DrawFrame(view, rect, bevelShadowColor, bevelShadowColor,
+				bevelLightColor, bevelLightColor, B_TOP_BORDER & ~borders);
+		}
 	} else {
-		if ((B_LEFT_BORDER & ~borders) != 0)
-			rect.left++;
+		if(orientation == 0 || orientation == 1) {
+			if ((B_LEFT_BORDER & ~borders) != 0)
+				rect.left++;
+		} else {
+			if ((B_TOP_BORDER & ~borders) != 0)
+				rect.top++;
+		}
 	}
 
 	view->FillRect(rect, fillGradient);
@@ -3164,12 +3280,12 @@ BControlLook::_DrawRoundCornerFrameRightBottom(BView* view, BRect& cornerRect,
 	// frame
 	ellipseRect.InsetBy(1, 1);
 	cornerRect.right--;
-	cornerRect.bottom++;
+	cornerRect.bottom--;
 	view->SetHighColor(frameColor);
 	view->FillEllipse(ellipseRect);
 
 	// prepare for bevel
-	cornerRect.left++;
+	cornerRect.right--;
 	cornerRect.bottom--;
 }
 
