Skip to content

Commit

Permalink
Tracker: style fixes to ViewState
Browse files Browse the repository at this point in the history
  • Loading branch information
jscipione committed Jun 21, 2014
1 parent a4c3bbd commit 27dc6eb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/kits/tracker/ViewState.cpp
Expand Up @@ -78,6 +78,9 @@ static const int32 kColumnStateMinArchiveVersion = 21;
// bump version when layout changes


// #pragma mark - BColumn


BColumn::BColumn(const char* title, float offset, float width,
alignment align, const char* attributeName, uint32 attrType,
const char* displayAs, bool statField, bool editable)
Expand Down Expand Up @@ -244,7 +247,7 @@ BColumn::ArchiveToMessage(BMessage &message) const
}


BColumn *
BColumn*
BColumn::_Sanitize(BColumn* column)
{
if (column == NULL)
Expand Down Expand Up @@ -273,7 +276,7 @@ BColumn::_Sanitize(BColumn* column)
}


// #pragma mark -
// #pragma mark - BViewState


BViewState::BViewState()
Expand Down Expand Up @@ -469,15 +472,19 @@ BViewState::_Sanitize(BViewState* state, bool fixOnly)
if (state->fViewMode == kListMode) {
if (state->fListOrigin.x < 0)
state->fListOrigin.x = 0;

if (state->fListOrigin.y < 0)
state->fListOrigin.y = 0;
}
if (state->fIconSize < 16)
state->fIconSize = 16;

if (state->fIconSize > 128)
state->fIconSize = 128;

if (state->fLastIconSize < 16)
state->fLastIconSize = 16;

if (state->fLastIconSize > 128)
state->fLastIconSize = 128;

Expand Down
1 change: 1 addition & 0 deletions src/kits/tracker/ViewState.h
Expand Up @@ -423,4 +423,5 @@ BViewState::StateNeedsSaving()

using namespace BPrivate;


#endif // _VIEW_STATE_H

0 comments on commit 27dc6eb

Please sign in to comment.