- // round because we need to show all the items
- adj->upper = (virtSize + pixelsPerLine - 1) / pixelsPerLine;
-
- // truncate here as we want to show visible lines entirely
- adj->page_size =
- adj->page_increment = winSize / pixelsPerLine;
-
- // If the scrollbar hits the right side, move the window
- // right to keep it from over extending.
- if ( !wxIsNullDouble(adj->value) &&
- (adj->value + adj->page_size > adj->upper) )
- {
- adj->value = adj->upper - adj->page_size;
- if (adj->value < 0.0)
- adj->value = 0.0;
-
- g_signal_emit_by_name (adj, "value_changed");
- }