Automatic whitespace cleanup and coding style.

This commit is contained in:
Humdinger
2012-07-01 19:06:14 +02:00
parent e0ef5b2a97
commit 62115b4772
2 changed files with 10 additions and 11 deletions
+7 -7
View File
@@ -2,7 +2,7 @@
// //
// Copyright (c) 2003, OpenBeOS // Copyright (c) 2003, OpenBeOS
// //
// This software is part of the OpenBeOS distribution and is covered // This software is part of the OpenBeOS distribution and is covered
// by the OpenBeOS license. // by the OpenBeOS license.
// //
// //
@@ -10,7 +10,7 @@
// Author: Sikosis, Jérôme Duval // Author: Sikosis, Jérôme Duval
// Description: Media Preferences // Description: Media Preferences
// Created : June 25, 2003 // Created : June 25, 2003
// //
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
#include "MediaListItem.h" #include "MediaListItem.h"
@@ -70,13 +70,13 @@ struct MediaListItem::Renderer {
{ {
fDoubleInsets = doubleInset; fDoubleInsets = doubleInset;
} }
void Render(BView* onto, BRect frame, bool complete = false) void Render(BView* onto, BRect frame, bool complete = false)
{ {
const rgb_color lowColor = onto->LowColor(); const rgb_color lowColor = onto->LowColor();
const rgb_color highColor = onto->HighColor(); const rgb_color highColor = onto->HighColor();
const rgb_color kBlack = {0, 0, 0, 255}; const rgb_color kBlack = {0, 0, 0, 255};
if (fSelected || complete) { if (fSelected || complete) {
if (fSelected) if (fSelected)
onto->SetLowColor(tint_color(lowColor, B_DARKEN_2_TINT)); onto->SetLowColor(tint_color(lowColor, B_DARKEN_2_TINT));
@@ -86,7 +86,7 @@ struct MediaListItem::Renderer {
frame.left += 4; frame.left += 4;
frame.top += kITEM_MARGIN; frame.top += kITEM_MARGIN;
BRect iconFrame(MediaIcons::IconRectAt(frame.LeftTop() + BPoint(1, 0))); BRect iconFrame(MediaIcons::IconRectAt(frame.LeftTop() + BPoint(1, 0)));
onto->SetDrawingMode(B_OP_OVER); onto->SetDrawingMode(B_OP_OVER);
if (fPrimaryIcon && !fDoubleInsets) { if (fPrimaryIcon && !fDoubleInsets) {
onto->DrawBitmap(fPrimaryIcon, iconFrame); onto->DrawBitmap(fPrimaryIcon, iconFrame);
@@ -103,7 +103,7 @@ struct MediaListItem::Renderer {
onto->SetDrawingMode(B_OP_COPY); onto->SetDrawingMode(B_OP_COPY);
onto->SetHighColor(kBlack); onto->SetHighColor(kBlack);
BFont font = be_plain_font; BFont font = be_plain_font;
font_height fontInfo; font_height fontInfo;
font.GetHeight(&fontInfo); font.GetHeight(&fontInfo);
@@ -130,7 +130,7 @@ struct MediaListItem::Renderer {
width += iconSpace; width += iconSpace;
width += 8.0f; width += 8.0f;
// space between icons and text // space between icons and text
width += be_plain_font->StringWidth(fTitle) + 3.0f; width += be_plain_font->StringWidth(fTitle) + 3.0f;
return width; return width;
} }
+3 -4
View File
@@ -413,11 +413,10 @@ MediaWindow::InitWindow()
// Start the window // Start the window
fInitCheck = InitMedia(true); fInitCheck = InitMedia(true);
if (fInitCheck != B_OK) { if (fInitCheck != B_OK)
PostMessage(B_QUIT_REQUESTED); PostMessage(B_QUIT_REQUESTED);
} else if (IsHidden()) { else if (IsHidden())
Show(); Show();
}
} }
@@ -753,7 +752,7 @@ MediaWindow::_MakeEmptyParamView()
B_ALIGN_VERTICAL_CENTER); B_ALIGN_VERTICAL_CENTER);
stringView->SetExplicitAlignment(centered); stringView->SetExplicitAlignment(centered);
stringView->SetAlignment(B_ALIGN_CENTER); stringView->SetAlignment(B_ALIGN_CENTER);
fContentLayout->AddView(stringView); fContentLayout->AddView(stringView);
fContentLayout->SetVisibleItem(fContentLayout->CountItems() - 1); fContentLayout->SetVisibleItem(fContentLayout->CountItems() - 1);