summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2017-05-02 18:24:59 (GMT)
committerfvogel <fvogelnew1@free.fr>2017-05-02 18:24:59 (GMT)
commit30e203aa908d2974306755ad15d3e93e95a9aee2 (patch)
treee6fe466ee24ef2cae59649c9c725af9088652d4a /generic
parentfa9b215690838b15cde6db8cf2be1545c20f6032 (diff)
parent17dc3ad82adb8c68cc4548ce8af220784340df96 (diff)
downloadtk-30e203aa908d2974306755ad15d3e93e95a9aee2.zip
tk-30e203aa908d2974306755ad15d3e93e95a9aee2.tar.gz
tk-30e203aa908d2974306755ad15d3e93e95a9aee2.tar.bz2
Change floor() back to casting to int() in fixing [6020ee2d03].
Diffstat (limited to 'generic')
-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 06aa275..83d7db9 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>
@@ -470,17 +469,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;
}
}
}