MessageReceived (BMessage *msg)
{
int32 portion, range;
- double proportion;
+ float proportion;
if (msg->what == SCROLL_BAR_UPDATE)
{
old_value = msg->GetInt32 ("emacs:units", 0);
portion = msg->GetInt32 ("emacs:portion", 0);
range = msg->GetInt32 ("emacs:range", 0);
- proportion = (double) portion / range;
+ proportion = (float) portion / range;
if (!msg->GetBool ("emacs:dragging", false))
{
/* Unlike on Motif, PORTION isn't included in the total
range of the scroll bar. */
- this->SetRange (0, std::floor ((double) range - (range * proportion)));
+ this->SetRange (0, range - portion);
this->SetValue (old_value);
this->SetProportion (proportion);
}
}
BView_scroll_bar_update (scroll_bar, lrint (size),
- BE_SB_MAX, lrint (value), bar->dragging);
+ BE_SB_MAX, ceil (value), bar->dragging);
}
static void