Tracker: Style fixes
More style fixes
This commit is contained in:
parent
bb5847906b
commit
ee20ff95a4
@ -419,7 +419,7 @@ DraggableContainerIcon::MouseMoved(BPoint where, uint32, const BMessage*)
|
||||
if (button)
|
||||
message.AddInt32("buttons", (int32)button);
|
||||
|
||||
if (button & B_PRIMARY_MOUSE_BUTTON) {
|
||||
if ((button & B_PRIMARY_MOUSE_BUTTON) != 0) {
|
||||
// add an action specifier to the message, so that it is not copied
|
||||
message.AddInt32("be:actions", (modifiers() & B_OPTION_KEY) != 0
|
||||
? B_COPY_TARGET : B_MOVE_TARGET);
|
||||
|
@ -523,7 +523,7 @@ bool
|
||||
BPose::PointInPose(BPoint loc, const BPoseView* poseView, BPoint where,
|
||||
BTextWidget** hitWidget) const
|
||||
{
|
||||
if (hitWidget)
|
||||
if (hitWidget != NULL)
|
||||
*hitWidget = NULL;
|
||||
|
||||
// check intersection with icon
|
||||
@ -603,7 +603,7 @@ BPose::Draw(BRect rect, const BRect& updateRect, BPoseView* poseView,
|
||||
&& windowActive;
|
||||
|
||||
if (index == 0 && selectDuringDraw) {
|
||||
//draw with dark background to select text
|
||||
// draw with dark background to select text
|
||||
drawView->PushState();
|
||||
drawView->SetLowColor(0, 0, 0);
|
||||
}
|
||||
@ -962,7 +962,7 @@ BPose::CalcRect(const BPoseView* poseView) const
|
||||
rect.right = rect.left + poseView->IconSizeInt();
|
||||
|
||||
BTextWidget* widget = WidgetFor(poseView->FirstColumn()->AttrHash());
|
||||
if (widget) {
|
||||
if (widget != NULL) {
|
||||
float textWidth = ceilf(widget->TextWidth(poseView) + 1);
|
||||
if (textWidth > poseView->IconSizeInt()) {
|
||||
rect.left += (poseView->IconSizeInt() - textWidth) / 2;
|
||||
@ -979,7 +979,7 @@ BPose::CalcRect(const BPoseView* poseView) const
|
||||
rect.right = rect.left + B_MINI_ICON + kMiniIconSeparator;
|
||||
rect.bottom = rect.top + poseView->IconPoseHeight();
|
||||
BTextWidget* widget = WidgetFor(poseView->FirstColumn()->AttrHash());
|
||||
if (widget)
|
||||
if (widget != NULL)
|
||||
rect.right += ceil(widget->TextWidth(poseView) + 1);
|
||||
}
|
||||
|
||||
|
@ -8129,7 +8129,7 @@ BPoseView::FindPose(BPoint point, int32* poseIndex) const
|
||||
{
|
||||
if (ViewMode() == kListMode) {
|
||||
int32 index = (int32)(point.y / fListElemHeight);
|
||||
if (poseIndex)
|
||||
if (poseIndex != NULL)
|
||||
*poseIndex = index;
|
||||
|
||||
BPoint loc(0, index * fListElemHeight);
|
||||
@ -9488,11 +9488,13 @@ BPoseView::ColumnFor(uint32 attr) const
|
||||
}
|
||||
|
||||
|
||||
bool // returns true if actually resized
|
||||
bool
|
||||
BPoseView::ResizeColumnToWidest(BColumn* column)
|
||||
{
|
||||
ASSERT(ViewMode() == kListMode);
|
||||
|
||||
// returns true if actually resized
|
||||
|
||||
float maxWidth = kMinColumnWidth;
|
||||
|
||||
PoseList* poseList = CurrentPoseList();
|
||||
|
@ -33,6 +33,8 @@ All rights reserved.
|
||||
*/
|
||||
|
||||
|
||||
#include "TextWidget.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@ -51,7 +53,6 @@ All rights reserved.
|
||||
#include "Commands.h"
|
||||
#include "FSUtils.h"
|
||||
#include "PoseView.h"
|
||||
#include "TextWidget.h"
|
||||
#include "Utilities.h"
|
||||
|
||||
|
||||
|
@ -460,8 +460,8 @@ BViewState::_Init()
|
||||
{
|
||||
fViewMode = kListMode;
|
||||
fLastIconMode = 0;
|
||||
fIconSize = 32;
|
||||
fLastIconSize = 32;
|
||||
fIconSize = B_LARGE_ICON;
|
||||
fLastIconSize = B_LARGE_ICON;
|
||||
fListOrigin.Set(0, 0);
|
||||
fIconOrigin.Set(0, 0);
|
||||
fPrimarySortAttr = AttrHashString(kAttrStatName, B_STRING_TYPE);
|
||||
|
Loading…
Reference in New Issue
Block a user