Use be_control_look != NULL everywhere in the Interface Kit.

Should not be a functional change. It is not in the Haiku Coding Guidelines but
I feel like 'if (object != NULL)' is generally preferred to 'if (object)', plus
in this case of be_control_look that is the more common style.
This commit is contained in:
Ryan Leavengood 2012-08-05 17:55:37 -04:00
parent 7483c98dec
commit 57c5b09e1a
7 changed files with 7 additions and 7 deletions

View File

@ -407,7 +407,7 @@ _BMCMenuBar_::_Init(bool setMaxContentWidth)
bottom--;
#endif
if (be_control_look)
if (be_control_look != NULL)
left = right = be_control_look->DefaultLabelSpacing();
SetItemMargins(left, top, right + fShowPopUpMarker ? 10 : 0, bottom);

View File

@ -96,7 +96,7 @@ BCheckBox::Archive(BMessage *archive, bool deep) const
void
BCheckBox::Draw(BRect updateRect)
{
if (be_control_look) {
if (be_control_look != NULL) {
rgb_color base = ui_color(B_PANEL_BACKGROUND_COLOR);
uint32 flags = be_control_look->Flags(this);

View File

@ -89,7 +89,7 @@ BRadioButton::Draw(BRect updateRect)
font_height fontHeight;
GetFontHeight(&fontHeight);
if (be_control_look) {
if (be_control_look != NULL) {
rgb_color base = ui_color(B_PANEL_BACKGROUND_COLOR);
uint32 flags = be_control_look->Flags(this);

View File

@ -1081,7 +1081,7 @@ BScrollBar::Draw(BRect updateRect)
}
// fill the clickable surface of the thumb
if (be_control_look) {
if (be_control_look != NULL) {
be_control_look->DrawButtonBackground(this, rect, updateRect,
normal, 0, BControlLook::B_ALL_BORDERS, fOrientation);
} else {

View File

@ -1000,7 +1000,7 @@ BSlider::DrawHashMarks()
BRect frame = HashMarksFrame();
BView* view = OffscreenView();
if (be_control_look) {
if (be_control_look != NULL) {
rgb_color base = ui_color(B_PANEL_BACKGROUND_COLOR);
uint32 flags = be_control_look->Flags(this);
be_control_look->DrawSliderHashMarks(view, frame, frame, base,

View File

@ -574,7 +574,7 @@ BStatusBar::SetTo(float value, const char* text, const char* trailingText)
}
// TODO: Ask the BControlLook in the first place about dirty rect.
if (be_control_look)
if (be_control_look != NULL)
update.InsetBy(-1, -1);
Invalidate(update);

View File

@ -174,7 +174,7 @@ _BTextInput_::AlignTextRect()
float vInset = max_c(1, floorf((textRect.Height() - LineHeight(0)) / 2.0));
float hInset = 2;
if (be_control_look)
if (be_control_look != NULL)
hInset = be_control_look->DefaultLabelSpacing();
textRect.InsetBy(hInset, vInset);