Some more style cleanups.
It's really not necessary to provide all default arguments in C++ - especially not wrong ones... git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5963 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -60,9 +60,6 @@ SettingsView::SettingsView(BRect rect, MouseSettings &settings)
|
|||||||
{
|
{
|
||||||
ResizeToPreferred();
|
ResizeToPreferred();
|
||||||
|
|
||||||
BTextControl *textcontrol;
|
|
||||||
BRect frame;
|
|
||||||
|
|
||||||
fDoubleClickBitmap = BTranslationUtils::GetBitmap("double_click_bmap");
|
fDoubleClickBitmap = BTranslationUtils::GetBitmap("double_click_bmap");
|
||||||
fSpeedBitmap = BTranslationUtils::GetBitmap("speed_bmap");
|
fSpeedBitmap = BTranslationUtils::GetBitmap("speed_bmap");
|
||||||
fAccelerationBitmap = BTranslationUtils::GetBitmap("acceleration_bmap");
|
fAccelerationBitmap = BTranslationUtils::GetBitmap("acceleration_bmap");
|
||||||
@@ -98,7 +95,7 @@ SettingsView::SettingsView(BRect rect, MouseSettings &settings)
|
|||||||
fFocusMenu->AddItem(new BMenuItem(focusLabels[i], message));
|
fFocusMenu->AddItem(new BMenuItem(focusLabels[i], message));
|
||||||
}
|
}
|
||||||
|
|
||||||
frame.Set(165, 208, 440, 200);
|
BRect frame(165, 208, 440, 200);
|
||||||
field = new BMenuField(frame, "ffm", "Focus follows mouse:", fFocusMenu);
|
field = new BMenuField(frame, "ffm", "Focus follows mouse:", fFocusMenu);
|
||||||
field->SetDivider(field->StringWidth(field->Label()) + kItemSpace);
|
field->SetDivider(field->StringWidth(field->Label()) + kItemSpace);
|
||||||
field->SetAlignment(B_ALIGN_RIGHT);
|
field->SetAlignment(B_ALIGN_RIGHT);
|
||||||
@@ -107,38 +104,39 @@ SettingsView::SettingsView(BRect rect, MouseSettings &settings)
|
|||||||
// Create the "Double-click speed slider...
|
// Create the "Double-click speed slider...
|
||||||
frame.Set(166, 11, 328, 50);
|
frame.Set(166, 11, 328, 50);
|
||||||
dcSpeedSlider = new BSlider(frame, "double_click_speed", "Double-click speed",
|
dcSpeedSlider = new BSlider(frame, "double_click_speed", "Double-click speed",
|
||||||
new BMessage(SLIDER_DOUBLE_CLICK_SPEED), 0, 1000, B_BLOCK_THUMB, B_FOLLOW_LEFT, B_WILL_DRAW);
|
new BMessage(SLIDER_DOUBLE_CLICK_SPEED), 0, 1000);
|
||||||
dcSpeedSlider->SetHashMarks(B_HASH_MARKS_BOTTOM);
|
dcSpeedSlider->SetHashMarks(B_HASH_MARKS_BOTTOM);
|
||||||
dcSpeedSlider->SetHashMarkCount(5);
|
dcSpeedSlider->SetHashMarkCount(5);
|
||||||
dcSpeedSlider->SetLimitLabels("Slow","Fast");
|
dcSpeedSlider->SetLimitLabels("Slow", "Fast");
|
||||||
AddChild(dcSpeedSlider);
|
AddChild(dcSpeedSlider);
|
||||||
|
|
||||||
// Create the "Mouse Speed" slider...
|
// Create the "Mouse Speed" slider...
|
||||||
frame.Set(166,76,328,125);
|
frame.Set(166,76,328,125);
|
||||||
mouseSpeedSlider = new BSlider(frame,"mouse_speed","Mouse Speed",
|
mouseSpeedSlider = new BSlider(frame, "mouse_speed", "Mouse Speed",
|
||||||
new BMessage(SLIDER_MOUSE_SPEED),0,1000,B_BLOCK_THUMB,B_FOLLOW_LEFT,B_WILL_DRAW);
|
new BMessage(SLIDER_MOUSE_SPEED), 0, 1000);
|
||||||
mouseSpeedSlider->SetHashMarks(B_HASH_MARKS_BOTTOM);
|
mouseSpeedSlider->SetHashMarks(B_HASH_MARKS_BOTTOM);
|
||||||
mouseSpeedSlider->SetHashMarkCount(7);
|
mouseSpeedSlider->SetHashMarkCount(7);
|
||||||
mouseSpeedSlider->SetLimitLabels("Slow","Fast");
|
mouseSpeedSlider->SetLimitLabels("Slow", "Fast");
|
||||||
AddChild(mouseSpeedSlider);
|
AddChild(mouseSpeedSlider);
|
||||||
|
|
||||||
// Create the "Mouse Acceleration" slider...
|
// Create the "Mouse Acceleration" slider...
|
||||||
frame.Set(166,141,328,190);
|
frame.Set(166, 141, 328, 190);
|
||||||
mouseAccSlider = new BSlider(frame,"mouse_acceleration","Mouse Acceleration",
|
mouseAccSlider = new BSlider(frame, "mouse_acceleration", "Mouse Acceleration",
|
||||||
new BMessage(SLIDER_MOUSE_ACC),0,1000,B_BLOCK_THUMB,B_FOLLOW_LEFT,B_WILL_DRAW);
|
new BMessage(SLIDER_MOUSE_ACC), 0, 1000);
|
||||||
mouseAccSlider->SetHashMarks(B_HASH_MARKS_BOTTOM);
|
mouseAccSlider->SetHashMarks(B_HASH_MARKS_BOTTOM);
|
||||||
mouseAccSlider->SetHashMarkCount(5);
|
mouseAccSlider->SetHashMarkCount(5);
|
||||||
mouseAccSlider->SetLimitLabels("Slow","Fast");
|
mouseAccSlider->SetLimitLabels("Slow", "Fast");
|
||||||
AddChild(mouseAccSlider);
|
AddChild(mouseAccSlider);
|
||||||
|
|
||||||
// Create the "Double-click test area" text box...
|
// Create the "Double-click test area" text box...
|
||||||
frame=Bounds();
|
frame = Bounds();
|
||||||
frame.left=frame.left+9;
|
frame.left = frame.left + 9;
|
||||||
frame.right=frame.right-230;
|
frame.right = frame.right - 230;
|
||||||
frame.top=frame.bottom-30;
|
frame.top = frame.bottom - 30;
|
||||||
textcontrol = new BTextControl(frame,"double_click_test_area",NULL,"Double-click test area", new BMessage(DOUBLE_CLICK_TEST_AREA),B_FOLLOW_LEFT,B_WILL_DRAW);
|
BTextControl *textControl = new BTextControl(frame, "double_click_test_area", NULL,
|
||||||
textcontrol->SetAlignment(B_ALIGN_LEFT,B_ALIGN_CENTER);
|
"Double-click test area", NULL);
|
||||||
AddChild(textcontrol);
|
textControl->SetAlignment(B_ALIGN_LEFT, B_ALIGN_CENTER);
|
||||||
|
AddChild(textControl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -189,8 +187,8 @@ SettingsView::Draw(BRect updateFrame)
|
|||||||
|
|
||||||
// Draw the icons
|
// Draw the icons
|
||||||
if (updateFrame.Intersects( // i have to add 10 pixels width and height, so weird
|
if (updateFrame.Intersects( // i have to add 10 pixels width and height, so weird
|
||||||
BRect(333,16,354+fDoubleClickBitmap->Bounds().Width(),
|
BRect(333, 16, 354 + fDoubleClickBitmap->Bounds().Width(),
|
||||||
165+fAccelerationBitmap->Bounds().Height()))) {
|
165 + fAccelerationBitmap->Bounds().Height()))) {
|
||||||
if (fDoubleClickBitmap != NULL)
|
if (fDoubleClickBitmap != NULL)
|
||||||
DrawBitmapAsync(fDoubleClickBitmap, BPoint(344, 16));
|
DrawBitmapAsync(fDoubleClickBitmap, BPoint(344, 16));
|
||||||
if (fSpeedBitmap != NULL)
|
if (fSpeedBitmap != NULL)
|
||||||
|
|||||||
Reference in New Issue
Block a user