Style fixes to BMenuItem::GetContentSize and update docs
Rename width and height to _width and _height matching the header. Update the documentation for this method as well.
This commit is contained in:
@@ -1,13 +1,13 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2014 Haiku Inc. All rights reserved.
|
* Copyright 2014 Haiku, Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
* John Scipione, [email protected]
|
* John Scipione, [email protected]
|
||||||
*
|
*
|
||||||
* Corresponds to:
|
* Corresponds to:
|
||||||
* headers/os/interface/MenuItem.h hrev46953
|
* headers/os/interface/MenuItem.h hrev46969
|
||||||
* src/kits/interface/MenuItem.cpp hrev46953
|
* src/kits/interface/MenuItem.cpp hrev46969
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -266,8 +266,8 @@
|
|||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn void BMenuItem::GetContentSize(float* width, float* height)
|
\fn void BMenuItem::GetContentSize(float* _width, float* _height)
|
||||||
\brief Fills out \a width and \a height with the content rectangle
|
\brief Fills out \a _width and \a _height with the content rectangle
|
||||||
dimensions.
|
dimensions.
|
||||||
|
|
||||||
You only need to call this method if you're implementing your own
|
You only need to call this method if you're implementing your own
|
||||||
@@ -280,8 +280,8 @@
|
|||||||
The content rectangle can be calculated using this method as well as
|
The content rectangle can be calculated using this method as well as
|
||||||
ContentLocation() to get location of the top left corner.
|
ContentLocation() to get location of the top left corner.
|
||||||
|
|
||||||
\param width Filled out with the \a width of the content rectangle.
|
\param _width Filled out with the width of the content rectangle.
|
||||||
\param height Filled out with the \a height of the content rectangle.
|
\param _height Filled out with the height of the content rectangle.
|
||||||
|
|
||||||
\sa ContentLocation()
|
\sa ContentLocation()
|
||||||
\sa DrawContent()
|
\sa DrawContent()
|
||||||
|
|||||||
@@ -360,7 +360,7 @@ BMenuItem::Frame() const
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
BMenuItem::GetContentSize(float* width, float* height)
|
BMenuItem::GetContentSize(float* _width, float* _height)
|
||||||
{
|
{
|
||||||
// TODO: Get rid of this. BMenu should handle this
|
// TODO: Get rid of this. BMenu should handle this
|
||||||
// automatically. Maybe it's not even needed, since our
|
// automatically. Maybe it's not even needed, since our
|
||||||
@@ -369,10 +369,10 @@ BMenuItem::GetContentSize(float* width, float* height)
|
|||||||
|
|
||||||
fCachedWidth = fSuper->StringWidth(fLabel);
|
fCachedWidth = fSuper->StringWidth(fLabel);
|
||||||
|
|
||||||
if (width)
|
if (_width)
|
||||||
*width = (float)ceil(fCachedWidth);
|
*_width = (float)ceil(fCachedWidth);
|
||||||
if (height)
|
if (_height)
|
||||||
*height = MenuPrivate(fSuper).FontHeight();
|
*_height = MenuPrivate(fSuper).FontHeight();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user