aboutsummaryrefslogtreecommitdiffstats
path: root/src/apoint.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/apoint.c')
-rw-r--r--src/apoint.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/apoint.c b/src/apoint.c
index b00bc8a..9860038 100644
--- a/src/apoint.c
+++ b/src/apoint.c
@@ -359,9 +359,8 @@ void apoint_update_panel(int which_pan)
/* Draw the scrollbar if necessary. */
if ((apad.length >= app_length) || (apad.first_onscreen > 0)) {
- float ratio = ((float)app_length) / ((float)apad.length);
- int sbar_length = (int)(ratio * app_length);
- int highend = (int)(ratio * apad.first_onscreen);
+ int sbar_length = app_length * app_length / apad.length;
+ int highend = app_length * apad.first_onscreen / apad.length;
unsigned hilt_bar = (which_pan == APP) ? 1 : 0;
int sbar_top = highend + title_lines + 1;