From 62115b47721b2659d5dd748cbd4d2dbc7900de4d Mon Sep 17 00:00:00 2001 From: Humdinger Date: Sun, 1 Jul 2012 18:58:43 +0200 Subject: [PATCH] Automatic whitespace cleanup and coding style. --- src/preferences/media/MediaListItem.cpp | 14 +++++++------- src/preferences/media/MediaWindow.cpp | 7 +++---- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/preferences/media/MediaListItem.cpp b/src/preferences/media/MediaListItem.cpp index cfd6f51b09..acf68b6bd2 100644 --- a/src/preferences/media/MediaListItem.cpp +++ b/src/preferences/media/MediaListItem.cpp @@ -2,7 +2,7 @@ // // 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. // // @@ -10,7 +10,7 @@ // Author: Sikosis, Jérôme Duval // Description: Media Preferences // Created : June 25, 2003 -// +// // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ #include "MediaListItem.h" @@ -70,13 +70,13 @@ struct MediaListItem::Renderer { { fDoubleInsets = doubleInset; } - + void Render(BView* onto, BRect frame, bool complete = false) { const rgb_color lowColor = onto->LowColor(); const rgb_color highColor = onto->HighColor(); const rgb_color kBlack = {0, 0, 0, 255}; - + if (fSelected || complete) { if (fSelected) onto->SetLowColor(tint_color(lowColor, B_DARKEN_2_TINT)); @@ -86,7 +86,7 @@ struct MediaListItem::Renderer { frame.left += 4; frame.top += kITEM_MARGIN; BRect iconFrame(MediaIcons::IconRectAt(frame.LeftTop() + BPoint(1, 0))); - + onto->SetDrawingMode(B_OP_OVER); if (fPrimaryIcon && !fDoubleInsets) { onto->DrawBitmap(fPrimaryIcon, iconFrame); @@ -103,7 +103,7 @@ struct MediaListItem::Renderer { onto->SetDrawingMode(B_OP_COPY); onto->SetHighColor(kBlack); - + BFont font = be_plain_font; font_height fontInfo; font.GetHeight(&fontInfo); @@ -130,7 +130,7 @@ struct MediaListItem::Renderer { width += iconSpace; width += 8.0f; // space between icons and text - + width += be_plain_font->StringWidth(fTitle) + 3.0f; return width; } diff --git a/src/preferences/media/MediaWindow.cpp b/src/preferences/media/MediaWindow.cpp index 9d599b8529..a96526e47e 100644 --- a/src/preferences/media/MediaWindow.cpp +++ b/src/preferences/media/MediaWindow.cpp @@ -413,11 +413,10 @@ MediaWindow::InitWindow() // Start the window fInitCheck = InitMedia(true); - if (fInitCheck != B_OK) { + if (fInitCheck != B_OK) PostMessage(B_QUIT_REQUESTED); - } else if (IsHidden()) { + else if (IsHidden()) Show(); - } } @@ -753,7 +752,7 @@ MediaWindow::_MakeEmptyParamView() B_ALIGN_VERTICAL_CENTER); stringView->SetExplicitAlignment(centered); stringView->SetAlignment(B_ALIGN_CENTER); - + fContentLayout->AddView(stringView); fContentLayout->SetVisibleItem(fContentLayout->CountItems() - 1);