fixed some style issues introduced with the latest patch

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20178 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2007-02-20 12:52:18 +00:00
parent 470523054d
commit 355c6ebe10

View File

@ -49,32 +49,34 @@ ExpanderPreferences::ExpanderPreferences(BMessage *settings)
BStringView *stringView = new BStringView(frameRect, "expansion", "Expansion:", BStringView *stringView = new BStringView(frameRect, "expansion", "Expansion:",
B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW); B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW);
stringView->ResizeToPreferred(); stringView->ResizeToPreferred();
if(stringView->Frame().right>maxWidth) maxWidth=stringView->Frame().right; if (stringView->Frame().right > maxWidth)
maxWidth = stringView->Frame().right;
box->AddChild(stringView); box->AddChild(stringView);
frameRect.top = stringView->Frame().bottom + 5; frameRect.top = stringView->Frame().bottom + 5;
frameRect.left += 10; frameRect.left += 10;
fAutoExpand = new BCheckBox(frameRect, "autoExpand", "Automatically expand files", NULL); fAutoExpand = new BCheckBox(frameRect, "autoExpand", "Automatically expand files", NULL);
fAutoExpand->ResizeToPreferred(); fAutoExpand->ResizeToPreferred();
if(fAutoExpand->Frame().right>maxWidth) maxWidth=fAutoExpand->Frame().right; if (fAutoExpand->Frame().right > maxWidth)
maxWidth = fAutoExpand->Frame().right;
box->AddChild(fAutoExpand); box->AddChild(fAutoExpand);
frameRect = fAutoExpand->Frame(); frameRect = fAutoExpand->Frame();
frameRect.top = fAutoExpand->Frame().bottom + 1; frameRect.top = fAutoExpand->Frame().bottom + 1;
fCloseWindow = new BCheckBox(frameRect, "closeWindowWhenDone", "Close window when done expanding", NULL); fCloseWindow = new BCheckBox(frameRect, "closeWindowWhenDone", "Close window when done expanding", NULL);
fCloseWindow->ResizeToPreferred(); fCloseWindow->ResizeToPreferred();
if(fCloseWindow->Frame().right>maxWidth) maxWidth=fCloseWindow->Frame().right; if (fCloseWindow->Frame().right > maxWidth)
maxWidth = fCloseWindow->Frame().right;
box->AddChild(fCloseWindow); box->AddChild(fCloseWindow);
frameRect = stringView->Frame(); frameRect = stringView->Frame();
frameRect.top = fCloseWindow->Frame().bottom + 10; frameRect.top = fCloseWindow->Frame().bottom + 10;
stringView = new BStringView(frameRect, "destinationFolder", "Destination Folder:", stringView = new BStringView(frameRect, "destinationFolder", "Destination Folder:",
B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW); B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW);
stringView->ResizeToPreferred(); stringView->ResizeToPreferred();
if(stringView->Frame().right>maxWidth) maxWidth=stringView->Frame().right; if (stringView->Frame().right > maxWidth)
maxWidth = stringView->Frame().right;
box->AddChild(stringView); box->AddChild(stringView);
frameRect.top = stringView->Frame().bottom + 5; frameRect.top = stringView->Frame().bottom + 5;
@ -83,7 +85,8 @@ ExpanderPreferences::ExpanderPreferences(BMessage *settings)
fLeaveDest = new BRadioButton(frameRect, "leaveDest", "Leave destination folder path empty", fLeaveDest = new BRadioButton(frameRect, "leaveDest", "Leave destination folder path empty",
new BMessage(MSG_LEAVEDEST)); new BMessage(MSG_LEAVEDEST));
fLeaveDest->ResizeToPreferred(); fLeaveDest->ResizeToPreferred();
if(fLeaveDest->Frame().right>maxWidth) maxWidth=fLeaveDest->Frame().right; if (fLeaveDest->Frame().right > maxWidth)
maxWidth = fLeaveDest->Frame().right;
box->AddChild(fLeaveDest); box->AddChild(fLeaveDest);
frameRect = fLeaveDest->Frame(); frameRect = fLeaveDest->Frame();
@ -91,17 +94,18 @@ ExpanderPreferences::ExpanderPreferences(BMessage *settings)
fSameDest = new BRadioButton(frameRect, "sameDir", "Same directory as source (archive) file", fSameDest = new BRadioButton(frameRect, "sameDir", "Same directory as source (archive) file",
new BMessage(MSG_SAMEDIR)); new BMessage(MSG_SAMEDIR));
fSameDest->ResizeToPreferred(); fSameDest->ResizeToPreferred();
if(fSameDest->Frame().right>maxWidth) maxWidth=fSameDest->Frame().right; if (fSameDest->Frame().right > maxWidth)
maxWidth = fSameDest->Frame().right;
box->AddChild(fSameDest); box->AddChild(fSameDest);
frameRect = fSameDest->Frame(); frameRect = fSameDest->Frame();
frameRect.top = frameRect.bottom + 1; frameRect.top = frameRect.bottom + 1;
fDestUse = new BRadioButton(frameRect, "destUse", "Use:",new BMessage(MSG_DESTUSE)); fDestUse = new BRadioButton(frameRect, "destUse", "Use:",new BMessage(MSG_DESTUSE));
fDestUse->ResizeToPreferred(); fDestUse->ResizeToPreferred();
if(fDestUse->Frame().right>maxWidth) maxWidth=fDestUse->Frame().right; if (fDestUse->Frame().right > maxWidth)
maxWidth = fDestUse->Frame().right;
box->AddChild(fDestUse); box->AddChild(fDestUse);
frameRect = fDestUse->Frame(); frameRect = fDestUse->Frame();
frameRect.left = fDestUse->Frame().right + 1; frameRect.left = fDestUse->Frame().right + 1;
frameRect.right = frameRect.left + 58; frameRect.right = frameRect.left + 58;
@ -120,21 +124,21 @@ ExpanderPreferences::ExpanderPreferences(BMessage *settings)
frameRect.left = frameRect.right + 5; frameRect.left = frameRect.right + 5;
fSelect = new BButton(frameRect, "selectButton", "Select", new BMessage(MSG_DESTSELECT)); fSelect = new BButton(frameRect, "selectButton", "Select", new BMessage(MSG_DESTSELECT));
fSelect->ResizeToPreferred(); fSelect->ResizeToPreferred();
if(fSelect->Frame().right>maxWidth) maxWidth=fSelect->Frame().right; if (fSelect->Frame().right > maxWidth)
maxWidth = fSelect->Frame().right;
box->AddChild(fSelect); box->AddChild(fSelect);
fSelect->SetEnabled(false); fSelect->SetEnabled(false);
fDestText->MoveBy(0,(fSelect->Frame().Height() - fDestText->Frame().Height())/2.0); fDestText->MoveBy(0,(fSelect->Frame().Height() - fDestText->Frame().Height())/2.0);
fDestText->ResizeTo(158,fDestText->Frame().Height()); fDestText->ResizeTo(158,fDestText->Frame().Height());
frameRect = stringView->Frame(); frameRect = stringView->Frame();
frameRect.top = fDestUse->Frame().bottom + 10; frameRect.top = fDestUse->Frame().bottom + 10;
stringView = new BStringView(frameRect, "other", "Other:",B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW); stringView = new BStringView(frameRect, "other", "Other:",B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW);
stringView->ResizeToPreferred(); stringView->ResizeToPreferred();
if(stringView->Frame().right>maxWidth) maxWidth=stringView->Frame().right; if (stringView->Frame().right > maxWidth)
maxWidth = stringView->Frame().right;
box->AddChild(stringView); box->AddChild(stringView);
frameRect.top = stringView->Frame().bottom + 5; frameRect.top = stringView->Frame().bottom + 5;
@ -142,17 +146,18 @@ ExpanderPreferences::ExpanderPreferences(BMessage *settings)
fOpenDest = new BCheckBox(frameRect, "openDestination", "Open destination folder after extraction", NULL); fOpenDest = new BCheckBox(frameRect, "openDestination", "Open destination folder after extraction", NULL);
fOpenDest->ResizeToPreferred(); fOpenDest->ResizeToPreferred();
if(fOpenDest->Frame().right>maxWidth) maxWidth=fOpenDest->Frame().right; if (fOpenDest->Frame().right > maxWidth)
maxWidth = fOpenDest->Frame().right;
box->AddChild(fOpenDest); box->AddChild(fOpenDest);
frameRect = fOpenDest->Frame(); frameRect = fOpenDest->Frame();
frameRect.top = frameRect.bottom + 1; frameRect.top = frameRect.bottom + 1;
fAutoShow = new BCheckBox(frameRect, "autoShow", "Automatically show contents listing", NULL); fAutoShow = new BCheckBox(frameRect, "autoShow", "Automatically show contents listing", NULL);
fAutoShow->ResizeToPreferred(); fAutoShow->ResizeToPreferred();
if(fAutoShow->Frame().right>maxWidth) maxWidth=fAutoShow->Frame().right; if (fAutoShow->Frame().right > maxWidth)
maxWidth = fAutoShow->Frame().right;
box->AddChild(fAutoShow); box->AddChild(fAutoShow);
box->ResizeTo(maxWidth + 15,fAutoShow->Frame().bottom + 10); box->ResizeTo(maxWidth + 15,fAutoShow->Frame().bottom + 10);
rect = BRect(Bounds().right-89, Bounds().bottom-40, Bounds().right-14, Bounds().bottom-16); rect = BRect(Bounds().right-89, Bounds().bottom-40, Bounds().right-14, Bounds().bottom-16);
@ -164,7 +169,6 @@ ExpanderPreferences::ExpanderPreferences(BMessage *settings)
button->MoveTo(box->Frame().right - button->Frame().Width(),box->Frame().bottom + 10 ); button->MoveTo(box->Frame().right - button->Frame().Width(),box->Frame().bottom + 10 );
background->AddChild(button); background->AddChild(button);
rect = button->Frame(); rect = button->Frame();
BButton *cancel = new BButton(rect, "CancelButton", "Cancel", new BMessage(MSG_CANCEL)); BButton *cancel = new BButton(rect, "CancelButton", "Cancel", new BMessage(MSG_CANCEL));
cancel->ResizeToPreferred(); cancel->ResizeToPreferred();
@ -173,7 +177,6 @@ ExpanderPreferences::ExpanderPreferences(BMessage *settings)
ResizeTo(box->Frame().right + 11 ,button->Frame().bottom + 11); ResizeTo(box->Frame().right + 11 ,button->Frame().bottom + 11);
BScreen screen(this); BScreen screen(this);
MoveBy((screen.Frame().Width()-Bounds().Width())/2, MoveBy((screen.Frame().Width()-Bounds().Width())/2,
(screen.Frame().Height()-Bounds().Height())/2); (screen.Frame().Height()-Bounds().Height())/2);