ControlLook: Rename border param to borderStyle

border vs. borders is confusing.

BTabView: Rename border param to borderStyle

BTabView docs: rename border param to borderStyle

enumerate border styles in docs
This commit is contained in:
John Scipione
2016-04-29 14:31:05 -07:00
parent 262ddba25c
commit 3490eda827
5 changed files with 23 additions and 17 deletions
+7 -2
View File
@@ -694,8 +694,13 @@
/*! /*!
\fn void BTabView::SetBorder(border_style border) \fn void BTabView::SetBorder(border_style borderStyle)
\brief Sets the border of the tab view to \a border. \brief Sets the border style of the tab view to \a borderStyle.
\param borderStyle One of the following:
- \c B_FANCY_BORDER (the default)
- \c B_PLAIN_BORDER a plain line border,
- \c B_NO_BORDER do not draw a border.
\since Haiku R1 \since Haiku R1
*/ */
+2 -2
View File
@@ -240,7 +240,7 @@ public:
BRect verticalScrollBarFrame, BRect verticalScrollBarFrame,
BRect horizontalScrollBarFrame, BRect horizontalScrollBarFrame,
const rgb_color& base, const rgb_color& base,
border_style border, border_style borderStyle,
uint32 flags = 0, uint32 flags = 0,
uint32 borders = B_ALL_BORDERS); uint32 borders = B_ALL_BORDERS);
@@ -307,7 +307,7 @@ public:
virtual void DrawBorder(BView* view, BRect& rect, virtual void DrawBorder(BView* view, BRect& rect,
const BRect& updateRect, const BRect& updateRect,
const rgb_color& base, const rgb_color& base,
border_style border, uint32 flags = 0, border_style borderStyle, uint32 flags = 0,
uint32 borders = B_ALL_BORDERS); uint32 borders = B_ALL_BORDERS);
virtual void DrawRaisedBorder(BView* view, BRect& rect, virtual void DrawRaisedBorder(BView* view, BRect& rect,
+1 -1
View File
@@ -162,7 +162,7 @@ public:
virtual void SetTabHeight(float height); virtual void SetTabHeight(float height);
float TabHeight() const; float TabHeight() const;
virtual void SetBorder(border_style border); virtual void SetBorder(border_style borderStyle);
border_style Border() const; border_style Border() const;
BView* ContainerView() const; BView* ContainerView() const;
+8 -7
View File
@@ -680,7 +680,7 @@ void
BControlLook::DrawScrollViewFrame(BView* view, BRect& rect, BControlLook::DrawScrollViewFrame(BView* view, BRect& rect,
const BRect& updateRect, BRect verticalScrollBarFrame, const BRect& updateRect, BRect verticalScrollBarFrame,
BRect horizontalScrollBarFrame, const rgb_color& base, BRect horizontalScrollBarFrame, const rgb_color& base,
border_style border, uint32 flags, uint32 _borders) border_style borderStyle, uint32 flags, uint32 _borders)
{ {
// calculate scroll corner rect before messing with the "rect" // calculate scroll corner rect before messing with the "rect"
BRect scrollCornerFillRect(rect.right, rect.bottom, BRect scrollCornerFillRect(rect.right, rect.bottom,
@@ -692,7 +692,7 @@ BControlLook::DrawScrollViewFrame(BView* view, BRect& rect,
if (verticalScrollBarFrame.IsValid()) if (verticalScrollBarFrame.IsValid())
scrollCornerFillRect.top = verticalScrollBarFrame.bottom + 1; scrollCornerFillRect.top = verticalScrollBarFrame.bottom + 1;
if (border == B_NO_BORDER) { if (borderStyle == B_NO_BORDER) {
if (scrollCornerFillRect.IsValid()) { if (scrollCornerFillRect.IsValid()) {
view->SetHighColor(base); view->SetHighColor(base);
view->FillRect(scrollCornerFillRect); view->FillRect(scrollCornerFillRect);
@@ -700,7 +700,7 @@ BControlLook::DrawScrollViewFrame(BView* view, BRect& rect,
return; return;
} }
bool excludeScrollCorner = border == B_FANCY_BORDER bool excludeScrollCorner = borderStyle == B_FANCY_BORDER
&& horizontalScrollBarFrame.IsValid() && horizontalScrollBarFrame.IsValid()
&& verticalScrollBarFrame.IsValid(); && verticalScrollBarFrame.IsValid();
@@ -713,7 +713,7 @@ BControlLook::DrawScrollViewFrame(BView* view, BRect& rect,
rgb_color scrollbarFrameColor = tint_color(base, B_DARKEN_2_TINT); rgb_color scrollbarFrameColor = tint_color(base, B_DARKEN_2_TINT);
if (border == B_FANCY_BORDER) if (borderStyle == B_FANCY_BORDER)
_DrawOuterResessedFrame(view, rect, base, 1.0, 1.0, flags, borders); _DrawOuterResessedFrame(view, rect, base, 1.0, 1.0, flags, borders);
if ((flags & B_FOCUSED) != 0) { if ((flags & B_FOCUSED) != 0) {
@@ -1634,16 +1634,17 @@ BControlLook::DrawSplitter(BView* view, BRect& rect, const BRect& updateRect,
void void
BControlLook::DrawBorder(BView* view, BRect& rect, const BRect& updateRect, BControlLook::DrawBorder(BView* view, BRect& rect, const BRect& updateRect,
const rgb_color& base, border_style border, uint32 flags, uint32 borders) const rgb_color& base, border_style borderStyle, uint32 flags,
uint32 borders)
{ {
if (border == B_NO_BORDER) if (borderStyle == B_NO_BORDER)
return; return;
rgb_color scrollbarFrameColor = tint_color(base, B_DARKEN_2_TINT); rgb_color scrollbarFrameColor = tint_color(base, B_DARKEN_2_TINT);
if ((flags & B_FOCUSED) != 0) if ((flags & B_FOCUSED) != 0)
scrollbarFrameColor = ui_color(B_KEYBOARD_NAVIGATION_COLOR); scrollbarFrameColor = ui_color(B_KEYBOARD_NAVIGATION_COLOR);
if (border == B_FANCY_BORDER) if (borderStyle == B_FANCY_BORDER)
_DrawOuterResessedFrame(view, rect, base, 1.0, 1.0, flags, borders); _DrawOuterResessedFrame(view, rect, base, 1.0, 1.0, flags, borders);
_DrawFrame(view, rect, scrollbarFrameColor, scrollbarFrameColor, _DrawFrame(view, rect, scrollbarFrameColor, scrollbarFrameColor,
+5 -5
View File
@@ -1166,12 +1166,12 @@ BTabView::TabHeight() const
void void
BTabView::SetBorder(border_style border) BTabView::SetBorder(border_style borderStyle)
{ {
if (fBorderStyle == border) if (fBorderStyle == borderStyle)
return; return;
fBorderStyle = border; fBorderStyle = borderStyle;
_LayoutContainerView((Flags() & B_SUPPORTS_LAYOUT) != 0); _LayoutContainerView((Flags() & B_SUPPORTS_LAYOUT) != 0);
} }
@@ -1373,7 +1373,7 @@ BTabView::operator=(const BTabView&)
extern "C" void extern "C" void
B_IF_GCC_2(_ReservedTabView1__8BTabView, _ZN8BTabView17_ReservedTabView1Ev)( B_IF_GCC_2(_ReservedTabView1__8BTabView, _ZN8BTabView17_ReservedTabView1Ev)(
BTabView* tabView, border_style border) BTabView* tabView, border_style borderStyle)
{ {
tabView->BTabView::SetBorder(border); tabView->BTabView::SetBorder(borderStyle);
} }