diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-09-04 22:14:13 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-09-04 22:14:13 (GMT) |
commit | 26a23861e83eb5dd534ecbbcea75fd241bf97e16 (patch) | |
tree | 1445f1fcf8d78c271ed5bc1fa1b77994e6952d58 /generic | |
parent | d8d05bb819e3bacb9cc11fd4f72daf1d6c9d0a65 (diff) | |
parent | 0a52de9d2888ce857fb43205928b16c12ddb0268 (diff) | |
download | tk-26a23861e83eb5dd534ecbbcea75fd241bf97e16.zip tk-26a23861e83eb5dd534ecbbcea75fd241bf97e16.tar.gz tk-26a23861e83eb5dd534ecbbcea75fd241bf97e16.tar.bz2 |
Rebase to 8.7
Diffstat (limited to 'generic')
-rw-r--r-- | generic/ttk/ttkClamTheme.c | 21 | ||||
-rw-r--r-- | generic/ttk/ttkClassicTheme.c | 2 | ||||
-rw-r--r-- | generic/ttk/ttkDefaultTheme.c | 2 |
3 files changed, 11 insertions, 14 deletions
diff --git a/generic/ttk/ttkClamTheme.c b/generic/ttk/ttkClamTheme.c index bbf1b18..65b1ab8 100644 --- a/generic/ttk/ttkClamTheme.c +++ b/generic/ttk/ttkClamTheme.c @@ -549,7 +549,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[] = { @@ -557,8 +557,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 } }; @@ -571,8 +571,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 { @@ -593,8 +592,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; @@ -635,7 +633,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; @@ -656,8 +654,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 } @@ -722,8 +720,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 8c3131b..32a0b59 100644 --- a/generic/ttk/ttkDefaultTheme.c +++ b/generic/ttk/ttkDefaultTheme.c @@ -1106,7 +1106,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" }, |