Style changes only

This commit is contained in:
John Scipione
2013-02-17 20:13:32 -05:00
parent da08cea0e3
commit 8236628b59
3 changed files with 18 additions and 17 deletions
-2
View File
@@ -327,5 +327,3 @@ resource(205, "kActionGo") archive BBitmap {
$"0000000000000000000000000000000000000000000000000000000000000000" $"0000000000000000000000000000000000000000000000000000000000000000"
} }
}; };
@@ -227,6 +227,7 @@ TabContainerView::AddTab(TabView* tab, int32 index)
_ValidateTabVisibility(); _ValidateTabVisibility();
} }
TabView* TabView*
TabContainerView::RemoveTab(int32 index) TabContainerView::RemoveTab(int32 index)
{ {
@@ -330,9 +331,8 @@ TabContainerView::SelectTab(TabView* tab)
if (fSelectedTab != NULL) if (fSelectedTab != NULL)
index = GroupLayout()->IndexOfItem(tab->LayoutItem()); index = GroupLayout()->IndexOfItem(tab->LayoutItem());
if (!tab->LayoutItem()->IsVisible()) { if (!tab->LayoutItem()->IsVisible())
SetFirstVisibleTabIndex(index); SetFirstVisibleTabIndex(index);
}
fController->TabSelected(index); fController->TabSelected(index);
} }
@@ -539,4 +539,3 @@ TabContainerView::_SendFakeMouseMoved()
if (Bounds().Contains(where)) if (Bounds().Contains(where))
_MouseMoved(where, B_INSIDE_VIEW, NULL); _MouseMoved(where, B_INSIDE_VIEW, NULL);
} }
+16 -12
View File
@@ -93,25 +93,28 @@ TabView::Draw(BRect updateRect)
{ {
BRect frame(fLayoutItem->Frame()); BRect frame(fLayoutItem->Frame());
if (fIsFront) { if (fIsFront) {
// Extend the front tab outward left/right in order to merge // Extend the front tab outward left/right in order to merge
// the frames of adjacent tabs. // the frames of adjacent tabs.
if (!fIsFirst) if (!fIsFirst)
frame.left--; frame.left--;
if (!fIsLast) if (!fIsLast)
frame.right++; frame.right++;
frame.bottom++; frame.bottom++;
} }
DrawBackground(fContainerView, frame, updateRect, fIsFirst, fIsLast, DrawBackground(fContainerView, frame, updateRect, fIsFirst, fIsLast,
fIsFront); fIsFront);
if (fIsFront) { if (fIsFront) {
frame.top += 3.0f; frame.top += 3.0f;
if (!fIsFirst) if (!fIsFirst)
frame.left++; frame.left++;
if (!fIsLast) if (!fIsLast)
frame.right--; frame.right--;
} else } else
frame.top += 6.0f; frame.top += 6.0f;
float spacing = be_control_look->DefaultLabelSpacing(); float spacing = be_control_look->DefaultLabelSpacing();
frame.InsetBy(spacing, spacing / 2); frame.InsetBy(spacing, spacing / 2);
DrawContents(fContainerView, frame, updateRect, fIsFirst, fIsLast, DrawContents(fContainerView, frame, updateRect, fIsFirst, fIsLast,
@@ -126,6 +129,7 @@ TabView::DrawBackground(BView* owner, BRect frame, const BRect& updateRect,
rgb_color base = ui_color(B_PANEL_BACKGROUND_COLOR); rgb_color base = ui_color(B_PANEL_BACKGROUND_COLOR);
uint32 borders = BControlLook::B_TOP_BORDER uint32 borders = BControlLook::B_TOP_BORDER
| BControlLook::B_BOTTOM_BORDER; | BControlLook::B_BOTTOM_BORDER;
if (isFirst) if (isFirst)
borders |= BControlLook::B_LEFT_BORDER; borders |= BControlLook::B_LEFT_BORDER;
if (isLast) if (isLast)