summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2017-05-02 18:22:32 (GMT)
committerfvogel <fvogelnew1@free.fr>2017-05-02 18:22:32 (GMT)
commit17dc3ad82adb8c68cc4548ce8af220784340df96 (patch)
tree840a8adaab0db816f46d9b704177b8185d894101 /generic
parent00b1b03df4ce671eea9cc375ea1d6d7d892d73ea (diff)
downloadtk-17dc3ad82adb8c68cc4548ce8af220784340df96.zip
tk-17dc3ad82adb8c68cc4548ce8af220784340df96.tar.gz
tk-17dc3ad82adb8c68cc4548ce8af220784340df96.tar.bz2
Revert the previous commit since it has drawbacks (see [6020ee2d03]).bug_308940fff
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 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;
}
}
}