summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcsaba <csaba>2023-11-14 19:00:14 (GMT)
committercsaba <csaba>2023-11-14 19:00:14 (GMT)
commit94ce89f89b77378ab4b463f1bbef41e3c55f4e97 (patch)
tree933dd05fadcb4baeba4c10f56ae86ae9137b3549
parent5bf51441dc9e76798a384cffcec208e3db3a2962 (diff)
downloadtk-94ce89f89b77378ab4b463f1bbef41e3c55f4e97.zip
tk-94ce89f89b77378ab4b463f1bbef41e3c55f4e97.tar.gz
tk-94ce89f89b77378ab4b463f1bbef41e3c55f4e97.tar.bz2
For now undo the changes related to -gripcount/-gripsize, slipped from trunk into ttkClamTheme.c.
-rw-r--r--generic/ttk/ttkClamTheme.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/generic/ttk/ttkClamTheme.c b/generic/ttk/ttkClamTheme.c
index e17ee82..2a13bb6 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 *gripSizeObj;
+ Tcl_Obj *gripCountObj;
} 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 },
- { "-gripsize", TK_OPTION_PIXELS,
- offsetof(GripElement,gripSizeObj), "7.5p" },
+ { "-gripcount", TK_OPTION_PIXELS,
+ offsetof(GripElement,gripCountObj), "5" },
{ NULL, TK_OPTION_BOOLEAN, 0, NULL }
};
@@ -567,7 +567,8 @@ static void GripElementSize(
int gripSize = 0;
(void)paddingPtr;
- Tk_GetPixelsFromObj(NULL, tkwin, grip->gripSizeObj, &gripSize);
+ Tk_GetPixelsFromObj(NULL, tkwin, grip->gripCountObj, &gripSize);
+ gripSize *= 2;
if (orient == TTK_ORIENT_HORIZONTAL) {
*widthPtr = gripSize;
} else {
@@ -588,7 +589,8 @@ static void GripElementDraw(
int i;
(void)state;
- Tk_GetPixelsFromObj(NULL, tkwin, grip->gripSizeObj, &gripSize);
+ Tk_GetPixelsFromObj(NULL, tkwin, grip->gripCountObj, &gripSize);
+ gripSize *= 2;
if (orient == TTK_ORIENT_HORIZONTAL) {
int x = b.x + (b.width - gripSize) / 2;
@@ -631,7 +633,7 @@ typedef struct { /* Common element record for scrollbar elements */
Tcl_Obj *darkColorObj;
Tcl_Obj *arrowColorObj;
Tcl_Obj *arrowSizeObj;
- Tcl_Obj *gripSizeObj;
+ Tcl_Obj *gripCountObj;
Tcl_Obj *sliderlengthObj;
} ScrollbarElement;
@@ -652,8 +654,8 @@ static const Ttk_ElementOptionSpec ScrollbarElementOptions[] = {
offsetof(ScrollbarElement,arrowColorObj), "#000000" },
{ "-arrowsize", TK_OPTION_PIXELS,
offsetof(ScrollbarElement,arrowSizeObj), STR(SCROLLBAR_THICKNESS) },
- { "-gripsize", TK_OPTION_PIXELS,
- offsetof(ScrollbarElement,gripSizeObj), "7.5p" },
+ { "-gripcount", TK_OPTION_PIXELS,
+ offsetof(ScrollbarElement,gripCountObj), "5" },
{ "-sliderlength", TK_OPTION_PIXELS,
offsetof(ScrollbarElement,sliderlengthObj), "30" },
{ NULL, TK_OPTION_BOOLEAN, 0, NULL }
@@ -718,7 +720,8 @@ static void ThumbElementDraw(
* Draw grip:
*/
TtkGetOrientFromObj(NULL, sb->orientObj, &orient);
- Tk_GetPixelsFromObj(NULL, tkwin, sb->gripSizeObj, &gripSize);
+ Tk_GetPixelsFromObj(NULL, tkwin, sb->gripCountObj, &gripSize);
+ gripSize *= 2;
lightGC = Ttk_GCForColor(tkwin,sb->lightColorObj,d);
darkGC = Ttk_GCForColor(tkwin,sb->borderColorObj,d);