From 24cb14bc3d2b9f54575a4f9b63ebd6c88976dc0a Mon Sep 17 00:00:00 2001 From: John Scipione Date: Thu, 10 Mar 2016 19:11:05 -0800 Subject: [PATCH] BTabView: Style fixes Fix misleading indentation remove extra newline just a newline selTabRect => selectedTabRect --- docs/user/interface/TabView.dox | 5 ++--- src/kits/interface/TabView.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/user/interface/TabView.dox b/docs/user/interface/TabView.dox index c9605cf603..a020550b1c 100644 --- a/docs/user/interface/TabView.dox +++ b/docs/user/interface/TabView.dox @@ -416,10 +416,10 @@ /*! - \fn void BTabView::DrawBox(BRect selTabRect) + \fn void BTabView::DrawBox(BRect selectedTabRect) \brief Draws the box that encloses the container view. - \param selTabRect The frame rectangle of the currently selected tab. + \param selectedTabRect The frame rectangle of the currently selected tab. \since BeOS R3 */ @@ -736,4 +736,3 @@ \since Haiku R1 */ - diff --git a/src/kits/interface/TabView.cpp b/src/kits/interface/TabView.cpp index b947bc13d5..e216cbcad2 100644 --- a/src/kits/interface/TabView.cpp +++ b/src/kits/interface/TabView.cpp @@ -47,7 +47,6 @@ static property_info sPropertyList[] = { }; - BTab::BTab(BView* contentsView) : fEnabled(true), @@ -698,6 +697,7 @@ BTabView::Select(int32 index) if (tab != NULL && fContainerView != NULL) { if (index == 0) fTabOffset = 0.0f; + tab->Select(fContainerView); fSelection = index; @@ -840,14 +840,14 @@ BTabView::DrawTabs() void -BTabView::DrawBox(BRect selTabRect) +BTabView::DrawBox(BRect selectedTabRect) { BRect rect(Bounds()); - rect.top = selTabRect.bottom; + rect.top = selectedTabRect.bottom; if (fBorderStyle != B_FANCY_BORDER) rect.top += 1.0f; - rgb_color base = ui_color(B_PANEL_BACKGROUND_COLOR); + rgb_color base = ui_color(B_PANEL_BACKGROUND_COLOR); if (fBorderStyle == B_FANCY_BORDER) be_control_look->DrawGroupFrame(this, rect, rect, base); else {