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:
parent
7483c98dec
commit
57c5b09e1a
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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 {
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user