fixed some warnings (gcc4)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27261 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
7c30291e7e
commit
a61498c87d
@ -482,7 +482,7 @@ ChartWindow::ChartWindow(BRect frame, const char *name)
|
||||
r.Set(h, v, h+INSTANT_LOAD-1, v + (TOP_LEFT_LIMIT - 1 - 2*V_BORDER));
|
||||
fInstantLoad = new InstantView(r);
|
||||
fTopView->AddChild(fInstantLoad);
|
||||
fInstantLoad->SetViewColor(0.0, 0.0, 0.0);
|
||||
fInstantLoad->SetViewColor(0, 0, 0);
|
||||
|
||||
h += INSTANT_LOAD+H_BORDER;
|
||||
|
||||
@ -1209,10 +1209,10 @@ ChartWindow::OpenRefresh(BPoint here)
|
||||
B_FLOATING_APP_WINDOW_FEEL,
|
||||
B_NOT_RESIZABLE | B_NOT_ZOOMABLE | B_WILL_ACCEPT_FIRST_CLICK);
|
||||
frame.OffsetTo(0.0, 0.0);
|
||||
slider = new BSlider(frame, "", NULL, new BMessage(REFRESH_RATE_MSG), 0.0, 1000.0);
|
||||
slider = new BSlider(frame, "", NULL, new BMessage(REFRESH_RATE_MSG), 0, 1000);
|
||||
slider->SetViewColor(background_color);
|
||||
slider->SetTarget(NULL, this);
|
||||
slider->SetValue(1000.0*log(fCurrentSettings.refresh_rate/REFRESH_RATE_MIN)/log(REFRESH_RATE_MAX/REFRESH_RATE_MIN));
|
||||
slider->SetValue(1000*log(fCurrentSettings.refresh_rate/REFRESH_RATE_MIN)/log(REFRESH_RATE_MAX/REFRESH_RATE_MIN));
|
||||
slider->SetModificationMessage(new BMessage(REFRESH_RATE_MSG));
|
||||
slider->SetLimitLabels(" 0.6 f/s (logarythmic scale)", "600.0 f/s");
|
||||
slider->ResizeToPreferred();
|
||||
@ -1256,15 +1256,18 @@ ChartWindow::DrawInstantLoad(float frame_per_second)
|
||||
colored bars. */
|
||||
if (level > fInstantLoadLevel) {
|
||||
for (i = fInstantLoadLevel; i < level; i++) {
|
||||
if (i<fInstantLoad->step) fInstantLoad->SetHighColor(255.0, 90.0, 90.0);
|
||||
else if ((i/fInstantLoad->step) & 1) fInstantLoad->SetHighColor(90.0, 255.0, 90.0);
|
||||
else fInstantLoad->SetHighColor(40.0, 200.0, 40.0);
|
||||
if (i < fInstantLoad->step)
|
||||
fInstantLoad->SetHighColor(255, 90, 90);
|
||||
else if ((i / fInstantLoad->step) & 1)
|
||||
fInstantLoad->SetHighColor(90, 255, 90);
|
||||
else
|
||||
fInstantLoad->SetHighColor(40, 200, 40);
|
||||
fInstantLoad->FillRect(BRect(3 + i * 4, 2, 5 + i * 4, 19));
|
||||
}
|
||||
}
|
||||
/* the level is lower than before, we need to erase some bars. */
|
||||
else {
|
||||
fInstantLoad->SetHighColor(0.0, 0.0, 0.0);
|
||||
fInstantLoad->SetHighColor(0, 0, 0);
|
||||
for (i = level; i < fInstantLoadLevel; i++)
|
||||
fInstantLoad->FillRect(BRect(3 + i * 4, 2, 5 +i * 4, 19));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user