summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-11-09 13:10:37 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-11-09 13:10:37 (GMT)
commitb128022078d24422beb7a8ee7d94646af38e750e (patch)
tree3f59fe3616dec2e3a7c52ade4fc6fd287e92ce3b /generic
parent66bf38184997aae41c04d04c179f46fd387dc4a1 (diff)
parentb68dac494c3cbaae6426ecc3bf9d94404fd3a43b (diff)
downloadtk-b128022078d24422beb7a8ee7d94646af38e750e.zip
tk-b128022078d24422beb7a8ee7d94646af38e750e.tar.gz
tk-b128022078d24422beb7a8ee7d94646af38e750e.tar.bz2
Rebase to latest trunk
Diffstat (limited to 'generic')
-rw-r--r--generic/tk.h31
-rw-r--r--generic/ttk/ttkClamTheme.c21
-rw-r--r--generic/ttk/ttkClassicTheme.c2
-rw-r--r--generic/ttk/ttkDefaultTheme.c2
4 files changed, 22 insertions, 34 deletions
diff --git a/generic/tk.h b/generic/tk.h
index 481714a..241eca5 100644
--- a/generic/tk.h
+++ b/generic/tk.h
@@ -17,8 +17,8 @@
#define _TK
#include <tcl.h>
-#if (TCL_MAJOR_VERSION < 8) || (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 6)
-# error Tk 8.7 must be compiled with tcl.h from Tcl 8.6 or better
+#if (TCL_MAJOR_VERSION < 8) || (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 7)
+# error Tk 9.0 must be compiled with tcl.h from Tcl 8.7 or better
#endif
#ifndef EXTERN
@@ -66,17 +66,16 @@ extern "C" {
*/
#ifndef TK_MAJOR_VERSION
-# define TK_MAJOR_VERSION 8
+# define TK_MAJOR_VERSION 9
#endif
-#if TK_MAJOR_VERSION != 8
-# error "This header-file is for Tk 8 only"
-#endif
-#define TK_MINOR_VERSION 7
-#define TK_RELEASE_LEVEL TCL_ALPHA_RELEASE
-#define TK_RELEASE_SERIAL 6
-
-#define TK_VERSION "8.7"
-#define TK_PATCH_LEVEL "8.7a6"
+#if TK_MAJOR_VERSION == 9
+# define TK_MINOR_VERSION 0
+# define TK_RELEASE_LEVEL TCL_BETA_RELEASE
+# define TK_RELEASE_SERIAL 0
+
+# define TK_VERSION "9.0"
+# define TK_PATCH_LEVEL "9.0b1"
+#endif /* TK_MAJOR_VERSION */
/*
* A special definition used to allow this header file to be included from
@@ -146,14 +145,6 @@ typedef struct Tk_StyledElement_ *Tk_StyledElement;
*/
typedef const char *Tk_Uid;
-
-#if (TCL_MAJOR_VERSION < 9) && (TCL_MINOR_VERSION < 7)
-# ifndef Tcl_Size
-# define Tcl_Size int
-# endif
-# define TCL_SIZE_MAX INT_MAX
-# define TCL_SIZE_MODIFIER ""
-#endif
/*
*----------------------------------------------------------------------
diff --git a/generic/ttk/ttkClamTheme.c b/generic/ttk/ttkClamTheme.c
index f6cd38c..7b33470 100644
--- a/generic/ttk/ttkClamTheme.c
+++ b/generic/ttk/ttkClamTheme.c
@@ -545,7 +545,7 @@ static const Ttk_ElementSpec IndicatorElementSpec = {
typedef struct {
Tcl_Obj *lightColorObj;
Tcl_Obj *borderColorObj;
- Tcl_Obj *gripCountObj;
+ Tcl_Obj *gripSizeObj;
} GripElement;
static const Ttk_ElementOptionSpec GripElementOptions[] = {
@@ -553,8 +553,8 @@ static const Ttk_ElementOptionSpec GripElementOptions[] = {
offsetof(GripElement,lightColorObj), LIGHT_COLOR },
{ "-bordercolor", TK_OPTION_COLOR,
offsetof(GripElement,borderColorObj), DARKEST_COLOR },
- { "-gripcount", TK_OPTION_PIXELS,
- offsetof(GripElement,gripCountObj), "5" },
+ { "-gripsize", TK_OPTION_PIXELS,
+ offsetof(GripElement,gripSizeObj), "7.5p" },
{ NULL, TK_OPTION_BOOLEAN, 0, NULL }
};
@@ -567,8 +567,7 @@ static void GripElementSize(
int gripSize = 0;
(void)paddingPtr;
- Tk_GetPixelsFromObj(NULL, tkwin, grip->gripCountObj, &gripSize);
- gripSize *= 2;
+ Tk_GetPixelsFromObj(NULL, tkwin, grip->gripSizeObj, &gripSize);
if (orient == TTK_ORIENT_HORIZONTAL) {
*widthPtr = gripSize;
} else {
@@ -589,8 +588,7 @@ static void GripElementDraw(
int i;
(void)state;
- Tk_GetPixelsFromObj(NULL, tkwin, grip->gripCountObj, &gripSize);
- gripSize *= 2;
+ Tk_GetPixelsFromObj(NULL, tkwin, grip->gripSizeObj, &gripSize);
if (orient == TTK_ORIENT_HORIZONTAL) {
int x = b.x + (b.width - gripSize) / 2;
@@ -633,7 +631,7 @@ typedef struct { /* Common element record for scrollbar elements */
Tcl_Obj *darkColorObj;
Tcl_Obj *arrowColorObj;
Tcl_Obj *arrowSizeObj;
- Tcl_Obj *gripCountObj;
+ Tcl_Obj *gripSizeObj;
Tcl_Obj *sliderlengthObj;
} ScrollbarElement;
@@ -654,8 +652,8 @@ static const Ttk_ElementOptionSpec ScrollbarElementOptions[] = {
offsetof(ScrollbarElement,arrowColorObj), "#000000" },
{ "-arrowsize", TK_OPTION_PIXELS,
offsetof(ScrollbarElement,arrowSizeObj), STR(SCROLLBAR_THICKNESS) },
- { "-gripcount", TK_OPTION_PIXELS,
- offsetof(ScrollbarElement,gripCountObj), "5" },
+ { "-gripsize", TK_OPTION_PIXELS,
+ offsetof(ScrollbarElement,gripSizeObj), "7.5p" },
{ "-sliderlength", TK_OPTION_PIXELS,
offsetof(ScrollbarElement,sliderlengthObj), "30" },
{ NULL, TK_OPTION_BOOLEAN, 0, NULL }
@@ -720,8 +718,7 @@ static void ThumbElementDraw(
* Draw grip:
*/
TtkGetOrientFromObj(NULL, sb->orientObj, &orient);
- Tk_GetPixelsFromObj(NULL, tkwin, sb->gripCountObj, &gripSize);
- gripSize *= 2;
+ Tk_GetPixelsFromObj(NULL, tkwin, sb->gripSizeObj, &gripSize);
lightGC = Ttk_GCForColor(tkwin,sb->lightColorObj,d);
darkGC = Ttk_GCForColor(tkwin,sb->borderColorObj,d);
diff --git a/generic/ttk/ttkClassicTheme.c b/generic/ttk/ttkClassicTheme.c
index bd02464..a9d07ee 100644
--- a/generic/ttk/ttkClassicTheme.c
+++ b/generic/ttk/ttkClassicTheme.c
@@ -220,7 +220,7 @@ static const Ttk_ElementOptionSpec IndicatorElementOptions[] = {
offsetof(IndicatorElement,colorObj), DEFAULT_BACKGROUND },
{ "-indicatorrelief", TK_OPTION_RELIEF,
offsetof(IndicatorElement,reliefObj), "raised" },
- { "-indicatordiameter", TK_OPTION_PIXELS,
+ { "-indicatorsize", TK_OPTION_PIXELS,
offsetof(IndicatorElement,sizeObj), "9p" },
{ "-indicatormargin", TK_OPTION_STRING,
offsetof(IndicatorElement,marginObj), "0 2 4 2" },
diff --git a/generic/ttk/ttkDefaultTheme.c b/generic/ttk/ttkDefaultTheme.c
index 531fe01..431a5af 100644
--- a/generic/ttk/ttkDefaultTheme.c
+++ b/generic/ttk/ttkDefaultTheme.c
@@ -1207,7 +1207,7 @@ typedef struct {
static const Ttk_ElementOptionSpec TreeitemIndicatorOptions[] = {
{ "-foreground", TK_OPTION_COLOR,
offsetof(TreeitemIndicator,colorObj), DEFAULT_FOREGROUND },
- { "-diameter", TK_OPTION_PIXELS,
+ { "-size", TK_OPTION_PIXELS,
offsetof(TreeitemIndicator,sizeObj), "6.75p" },
{ "-indicatormargins", TK_OPTION_STRING,
offsetof(TreeitemIndicator,marginObj), "2 2 4 2" },