summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/ttk/ttkNotebook.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/generic/ttk/ttkNotebook.c b/generic/ttk/ttkNotebook.c
index b649e4b..389d520 100644
--- a/generic/ttk/ttkNotebook.c
+++ b/generic/ttk/ttkNotebook.c
@@ -4,7 +4,6 @@
#include <string.h>
#include <ctype.h>
-#include <math.h>
#include <stdio.h>
#include <tk.h>
@@ -455,17 +454,15 @@ static void SqueezeTabs(
if (nTabs > 0) {
int difference = available - needed;
- double fraction = (double)difference / needed;
+ double delta = (double)difference / needed;
double slack = 0;
- double ad;
int i;
for (i = 0; i < nTabs; ++i) {
Tab *tab = Ttk_SlaveData(nb->notebook.mgr,i);
-
- ad = slack + tab->width * fraction;
+ double ad = slack + tab->width * delta;
tab->width += (int)ad;
- slack = ad - floor(ad);
+ slack = ad - (int)ad;
}
}
}