diff options
Diffstat (limited to 'generic/ttk')
-rw-r--r-- | generic/ttk/ttkClamTheme.c | 21 | ||||
-rw-r--r-- | generic/ttk/ttkDefaultTheme.c | 8 | ||||
-rw-r--r-- | generic/ttk/ttkElements.c | 10 |
3 files changed, 18 insertions, 21 deletions
diff --git a/generic/ttk/ttkClamTheme.c b/generic/ttk/ttkClamTheme.c index 807090e..5ec8e23 100644 --- a/generic/ttk/ttkClamTheme.c +++ b/generic/ttk/ttkClamTheme.c @@ -487,7 +487,7 @@ static const Ttk_ElementSpec MenuIndicatorElementSpec = typedef struct { Tcl_Obj *lightColorObj; Tcl_Obj *borderColorObj; - Tcl_Obj *gripCountObj; + Tcl_Obj *gripSizeObj; } GripElement; static const Ttk_ElementOptionSpec GripElementOptions[] = { @@ -495,8 +495,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 } }; @@ -509,8 +509,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 { @@ -531,8 +530,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; @@ -573,7 +571,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; @@ -594,8 +592,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_INT, offsetof(ScrollbarElement,sliderlengthObj), "30" }, { NULL, TK_OPTION_BOOLEAN, 0, NULL } @@ -660,8 +658,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/ttkDefaultTheme.c b/generic/ttk/ttkDefaultTheme.c index a8b13f0..ef2ec03 100644 --- a/generic/ttk/ttkDefaultTheme.c +++ b/generic/ttk/ttkDefaultTheme.c @@ -1159,14 +1159,14 @@ static const Ttk_ElementSpec SliderElementSpec = { typedef struct { Tcl_Obj *colorObj; Tcl_Obj *marginObj; - Tcl_Obj *diameterObj; + Tcl_Obj *sizeObj; } TreeitemIndicator; static const Ttk_ElementOptionSpec TreeitemIndicatorOptions[] = { { "-foreground", TK_OPTION_COLOR, offsetof(TreeitemIndicator,colorObj), DEFAULT_FOREGROUND }, - { "-diameter", TK_OPTION_PIXELS, - offsetof(TreeitemIndicator,diameterObj), "9" }, + { "-size", TK_OPTION_PIXELS, + offsetof(TreeitemIndicator,sizeObj), "6.75p" }, { "-indicatormargins", TK_OPTION_STRING, offsetof(TreeitemIndicator,marginObj), "2 2 4 2" }, { NULL, TK_OPTION_BOOLEAN, 0, NULL } @@ -1183,7 +1183,7 @@ static void TreeitemIndicatorSize( (void)paddingPtr; Ttk_GetPaddingFromObj(NULL, tkwin, indicator->marginObj, &margins); - Tk_GetPixelsFromObj(NULL, tkwin, indicator->diameterObj, &diameter); + Tk_GetPixelsFromObj(NULL, tkwin, indicator->sizeObj, &diameter); *widthPtr = diameter + Ttk_PaddingWidth(margins); *heightPtr = diameter + Ttk_PaddingHeight(margins); } diff --git a/generic/ttk/ttkElements.c b/generic/ttk/ttkElements.c index 698f460..428b236 100644 --- a/generic/ttk/ttkElements.c +++ b/generic/ttk/ttkElements.c @@ -549,7 +549,7 @@ typedef struct { Tcl_Obj *backgroundObj; Tcl_Obj *reliefObj; Tcl_Obj *colorObj; - Tcl_Obj *diameterObj; + Tcl_Obj *sizeObj; Tcl_Obj *marginObj; Tcl_Obj *borderWidthObj; } IndicatorElement; @@ -561,8 +561,8 @@ static const Ttk_ElementOptionSpec IndicatorElementOptions[] = { offsetof(IndicatorElement,colorObj), DEFAULT_BACKGROUND }, { "-indicatorrelief", TK_OPTION_RELIEF, offsetof(IndicatorElement,reliefObj), "raised" }, - { "-indicatordiameter", TK_OPTION_PIXELS, - offsetof(IndicatorElement,diameterObj), "12" }, + { "-indicatorsize", TK_OPTION_PIXELS, + offsetof(IndicatorElement,sizeObj), "9p" }, { "-indicatormargin", TK_OPTION_STRING, offsetof(IndicatorElement,marginObj), "0 2 4 2" }, { "-borderwidth", TK_OPTION_PIXELS, @@ -584,7 +584,7 @@ static void SquareIndicatorElementSize( (void)paddingPtr; Ttk_GetPaddingFromObj(NULL, tkwin, indicator->marginObj, &margins); - Tk_GetPixelsFromObj(NULL, tkwin, indicator->diameterObj, &diameter); + Tk_GetPixelsFromObj(NULL, tkwin, indicator->sizeObj, &diameter); *widthPtr = diameter + Ttk_PaddingWidth(margins); *heightPtr = diameter + Ttk_PaddingHeight(margins); } @@ -631,7 +631,7 @@ static void DiamondIndicatorElementSize( (void)paddingPtr; Ttk_GetPaddingFromObj(NULL, tkwin, indicator->marginObj, &margins); - Tk_GetPixelsFromObj(NULL, tkwin, indicator->diameterObj, &diameter); + Tk_GetPixelsFromObj(NULL, tkwin, indicator->sizeObj, &diameter); *widthPtr = diameter + 3 + Ttk_PaddingWidth(margins); *heightPtr = diameter + 3 + Ttk_PaddingHeight(margins); } |