From 394a633f1f8f234406846277de5a86058183698a Mon Sep 17 00:00:00 2001 From: "fvogelnew1@free.fr" Date: Tue, 14 Jul 2015 20:14:02 +0000 Subject: Bug [1247115fff] - Added -proxyrelief option --- doc/panedwindow.n | 3 +++ generic/tkPanedWindow.c | 6 +++++- macosx/tkMacOSXDefault.h | 1 + tests/panedwindow.test | 19 +++++++++++-------- unix/tkUnixDefault.h | 1 + win/tkWinDefault.h | 1 + 6 files changed, 22 insertions(+), 9 deletions(-) diff --git a/doc/panedwindow.n b/doc/panedwindow.n index 53a7238..838587e 100644 --- a/doc/panedwindow.n +++ b/doc/panedwindow.n @@ -29,6 +29,9 @@ drawn as squares. May be any value accepted by \fBTk_GetPixels\fR. Specifies a desired height for the overall panedwindow widget. May be any value accepted by \fBTk_GetPixels\fR. If an empty string, the widget will be made high enough to allow all contained widgets to have their natural height. +.OP \-proxyrelief proxyRelief ProxyRelief +Relief to use when drawing the proxy. May be any of the standard Tk +relief values. .OP \-opaqueresize opaqueResize OpaqueResize Specifies whether panes should be resized as a sash is moved (true), or if resizing should be deferred until the sash is placed (false). diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c index 6a3766b..c7d5339 100644 --- a/generic/tkPanedWindow.c +++ b/generic/tkPanedWindow.c @@ -147,6 +147,7 @@ typedef struct PanedWindow { GC gc; /* Graphics context for copying from * off-screen pixmap onto screen. */ int proxyx, proxyy; /* Proxy x,y coordinates. */ + int proxyRelief; /* Relief used to draw proxy. */ Slave **slaves; /* Pointer to array of Slaves. */ int numSlaves; /* Number of slaves. */ int sizeofSlaves; /* Number of elements in the slaves array. */ @@ -298,6 +299,9 @@ static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_STRING_TABLE, "-orient", "orient", "Orient", DEF_PANEDWINDOW_ORIENT, -1, Tk_Offset(PanedWindow, orient), 0, (ClientData) orientStrings, GEOMETRY}, + {TK_OPTION_RELIEF, "-proxyrelief", "proxyRelief", "Relief", + DEF_PANEDWINDOW_PROXYRELIEF, -1, Tk_Offset(PanedWindow, proxyRelief), + 0, 0, 0}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", DEF_PANEDWINDOW_RELIEF, -1, Tk_Offset(PanedWindow, relief), 0, 0, 0}, {TK_OPTION_CURSOR, "-sashcursor", "sashCursor", "Cursor", @@ -2770,7 +2774,7 @@ DisplayProxyWindow( */ Tk_Fill3DRectangle(tkwin, pixmap, pwPtr->background, 0, 0, - Tk_Width(tkwin), Tk_Height(tkwin), 2, pwPtr->sashRelief); + Tk_Width(tkwin), Tk_Height(tkwin), 2, pwPtr->proxyRelief); #ifndef TK_NO_DOUBLE_BUFFERING /* diff --git a/macosx/tkMacOSXDefault.h b/macosx/tkMacOSXDefault.h index 0380de9..ad92dc6 100644 --- a/macosx/tkMacOSXDefault.h +++ b/macosx/tkMacOSXDefault.h @@ -409,6 +409,7 @@ #define DEF_PANEDWINDOW_HEIGHT "" #define DEF_PANEDWINDOW_OPAQUERESIZE "1" #define DEF_PANEDWINDOW_ORIENT "horizontal" +#define DEF_PANEDWINDOW_PROXYRELIEF "flat" #define DEF_PANEDWINDOW_RELIEF "flat" #define DEF_PANEDWINDOW_SASHCURSOR "" #define DEF_PANEDWINDOW_SASHPAD "0" diff --git a/tests/panedwindow.test b/tests/panedwindow.test index 724b40d..f66b35e 100644 --- a/tests/panedwindow.test +++ b/tests/panedwindow.test @@ -29,24 +29,27 @@ foreach {testName testData} { 20 20 badValue {bad screen distance "badValue"}} panedwindow-1.8 {-opaqueresize true 1 foo {expected boolean value but got "foo"}} - panedwindow-1.9 {-orient + panedwindow-1.9 {-proxyrelief + groove groove + 1.5 {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken}} + panedwindow-1.10 {-orient horizontal horizontal badValue {bad orient "badValue": must be horizontal or vertical}} - panedwindow-1.10 {-relief + panedwindow-1.11 {-relief groove groove 1.5 {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken}} - panedwindow-1.11 {-sashcursor + panedwindow-1.12 {-sashcursor arrow arrow badValue {bad cursor spec "badValue"}} - panedwindow-1.12 {-sashpad + panedwindow-1.13 {-sashpad 1.3 1 badValue {bad screen distance "badValue"}} - panedwindow-1.13 {-sashrelief + panedwindow-1.14 {-sashrelief groove groove 1.5 {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken}} - panedwindow-1.14 {-sashwidth + panedwindow-1.15 {-sashwidth 10 10 badValue {bad screen distance "badValue"}} - panedwindow-1.15 {-showhandle + panedwindow-1.16 {-showhandle true 1 foo {expected boolean value but got "foo"}} - panedwindow-1.16 {-width + panedwindow-1.17 {-width 402 402 badValue {bad screen distance "badValue"}} } { lassign $testData optionName goodIn goodOut badIn badOut diff --git a/unix/tkUnixDefault.h b/unix/tkUnixDefault.h index 4eb8778..78b10f5 100644 --- a/unix/tkUnixDefault.h +++ b/unix/tkUnixDefault.h @@ -367,6 +367,7 @@ #define DEF_PANEDWINDOW_HEIGHT "" #define DEF_PANEDWINDOW_OPAQUERESIZE "1" #define DEF_PANEDWINDOW_ORIENT "horizontal" +#define DEF_PANEDWINDOW_PROXYRELIEF "flat" #define DEF_PANEDWINDOW_RELIEF "flat" #define DEF_PANEDWINDOW_SASHCURSOR "" #define DEF_PANEDWINDOW_SASHPAD "0" diff --git a/win/tkWinDefault.h b/win/tkWinDefault.h index a1a76c7..19cbf31 100644 --- a/win/tkWinDefault.h +++ b/win/tkWinDefault.h @@ -370,6 +370,7 @@ #define DEF_PANEDWINDOW_HEIGHT "" #define DEF_PANEDWINDOW_OPAQUERESIZE "1" #define DEF_PANEDWINDOW_ORIENT "horizontal" +#define DEF_PANEDWINDOW_PROXYRELIEF "flat" #define DEF_PANEDWINDOW_RELIEF "flat" #define DEF_PANEDWINDOW_SASHCURSOR "" #define DEF_PANEDWINDOW_SASHPAD "0" -- cgit v0.12 From 559ef87d12abac019902fd9700e2744b8aae0591 Mon Sep 17 00:00:00 2001 From: "fvogelnew1@free.fr" Date: Tue, 14 Jul 2015 20:21:38 +0000 Subject: Fixed extra space --- doc/panedwindow.n | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/panedwindow.n b/doc/panedwindow.n index 838587e..b9df08e 100644 --- a/doc/panedwindow.n +++ b/doc/panedwindow.n @@ -30,7 +30,7 @@ Specifies a desired height for the overall panedwindow widget. May be any value accepted by \fBTk_GetPixels\fR. If an empty string, the widget will be made high enough to allow all contained widgets to have their natural height. .OP \-proxyrelief proxyRelief ProxyRelief -Relief to use when drawing the proxy. May be any of the standard Tk +Relief to use when drawing the proxy. May be any of the standard Tk relief values. .OP \-opaqueresize opaqueResize OpaqueResize Specifies whether panes should be resized as a sash is moved (true), -- cgit v0.12 From 1490fdfd92ae32c93a845eb4fa293689e44fba7e Mon Sep 17 00:00:00 2001 From: "fvogelnew1@free.fr" Date: Tue, 29 Sep 2015 20:26:29 +0000 Subject: Added -proxybackground option --- doc/panedwindow.n | 2 ++ generic/tkPanedWindow.c | 6 +++++- macosx/tkMacOSXDefault.h | 1 + tests/panedwindow.test | 18 ++++++++++-------- unix/tkUnixDefault.h | 1 + win/tkWinDefault.h | 1 + 6 files changed, 20 insertions(+), 9 deletions(-) diff --git a/doc/panedwindow.n b/doc/panedwindow.n index b9df08e..f3c22be 100644 --- a/doc/panedwindow.n +++ b/doc/panedwindow.n @@ -29,6 +29,8 @@ drawn as squares. May be any value accepted by \fBTk_GetPixels\fR. Specifies a desired height for the overall panedwindow widget. May be any value accepted by \fBTk_GetPixels\fR. If an empty string, the widget will be made high enough to allow all contained widgets to have their natural height. +.OP \-proxybackground proxyBackground ProxyBackground +Background color to use when drawing the proxy. .OP \-proxyrelief proxyRelief ProxyRelief Relief to use when drawing the proxy. May be any of the standard Tk relief values. diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c index c7d5339..96a4441 100644 --- a/generic/tkPanedWindow.c +++ b/generic/tkPanedWindow.c @@ -147,6 +147,7 @@ typedef struct PanedWindow { GC gc; /* Graphics context for copying from * off-screen pixmap onto screen. */ int proxyx, proxyy; /* Proxy x,y coordinates. */ + Tk_3DBorder proxyBackground;/* Background color used to draw proxy. */ int proxyRelief; /* Relief used to draw proxy. */ Slave **slaves; /* Pointer to array of Slaves. */ int numSlaves; /* Number of slaves. */ @@ -299,6 +300,9 @@ static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_STRING_TABLE, "-orient", "orient", "Orient", DEF_PANEDWINDOW_ORIENT, -1, Tk_Offset(PanedWindow, orient), 0, (ClientData) orientStrings, GEOMETRY}, + {TK_OPTION_BORDER, "-proxybackground", "proxyBackground", "ProxyBackground", + DEF_PANEDWINDOW_BG_COLOR, -1, Tk_Offset(PanedWindow, proxyBackground), 0, + (ClientData) DEF_PANEDWINDOW_BG_MONO}, {TK_OPTION_RELIEF, "-proxyrelief", "proxyRelief", "Relief", DEF_PANEDWINDOW_PROXYRELIEF, -1, Tk_Offset(PanedWindow, proxyRelief), 0, 0, 0}, @@ -2773,7 +2777,7 @@ DisplayProxyWindow( * Redraw the widget's background and border. */ - Tk_Fill3DRectangle(tkwin, pixmap, pwPtr->background, 0, 0, + Tk_Fill3DRectangle(tkwin, pixmap, pwPtr->proxyBackground, 0, 0, Tk_Width(tkwin), Tk_Height(tkwin), 2, pwPtr->proxyRelief); #ifndef TK_NO_DOUBLE_BUFFERING diff --git a/macosx/tkMacOSXDefault.h b/macosx/tkMacOSXDefault.h index ad92dc6..ce8af8f 100644 --- a/macosx/tkMacOSXDefault.h +++ b/macosx/tkMacOSXDefault.h @@ -409,6 +409,7 @@ #define DEF_PANEDWINDOW_HEIGHT "" #define DEF_PANEDWINDOW_OPAQUERESIZE "1" #define DEF_PANEDWINDOW_ORIENT "horizontal" +#define DEF_PANEDWINDOW_PROXYBACKGROUND WHITE #define DEF_PANEDWINDOW_PROXYRELIEF "flat" #define DEF_PANEDWINDOW_RELIEF "flat" #define DEF_PANEDWINDOW_SASHCURSOR "" diff --git a/tests/panedwindow.test b/tests/panedwindow.test index f66b35e..2e800bc 100644 --- a/tests/panedwindow.test +++ b/tests/panedwindow.test @@ -32,24 +32,26 @@ foreach {testName testData} { panedwindow-1.9 {-proxyrelief groove groove 1.5 {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken}} - panedwindow-1.10 {-orient + panedwindow-1.10 {-proxybackground + "#f0a0a0" "#f0a0a0" non-existent {unknown color name "non-existent"}} + panedwindow-1.11 {-orient horizontal horizontal badValue {bad orient "badValue": must be horizontal or vertical}} - panedwindow-1.11 {-relief + panedwindow-1.12 {-relief groove groove 1.5 {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken}} - panedwindow-1.12 {-sashcursor + panedwindow-1.13 {-sashcursor arrow arrow badValue {bad cursor spec "badValue"}} - panedwindow-1.13 {-sashpad + panedwindow-1.14 {-sashpad 1.3 1 badValue {bad screen distance "badValue"}} - panedwindow-1.14 {-sashrelief + panedwindow-1.15 {-sashrelief groove groove 1.5 {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken}} - panedwindow-1.15 {-sashwidth + panedwindow-1.16 {-sashwidth 10 10 badValue {bad screen distance "badValue"}} - panedwindow-1.16 {-showhandle + panedwindow-1.17 {-showhandle true 1 foo {expected boolean value but got "foo"}} - panedwindow-1.17 {-width + panedwindow-1.18 {-width 402 402 badValue {bad screen distance "badValue"}} } { lassign $testData optionName goodIn goodOut badIn badOut diff --git a/unix/tkUnixDefault.h b/unix/tkUnixDefault.h index 78b10f5..f2cdf4b 100644 --- a/unix/tkUnixDefault.h +++ b/unix/tkUnixDefault.h @@ -367,6 +367,7 @@ #define DEF_PANEDWINDOW_HEIGHT "" #define DEF_PANEDWINDOW_OPAQUERESIZE "1" #define DEF_PANEDWINDOW_ORIENT "horizontal" +#define DEF_PANEDWINDOW_PROXYBACKGROUND WHITE #define DEF_PANEDWINDOW_PROXYRELIEF "flat" #define DEF_PANEDWINDOW_RELIEF "flat" #define DEF_PANEDWINDOW_SASHCURSOR "" diff --git a/win/tkWinDefault.h b/win/tkWinDefault.h index 19cbf31..60c098f 100644 --- a/win/tkWinDefault.h +++ b/win/tkWinDefault.h @@ -370,6 +370,7 @@ #define DEF_PANEDWINDOW_HEIGHT "" #define DEF_PANEDWINDOW_OPAQUERESIZE "1" #define DEF_PANEDWINDOW_ORIENT "horizontal" +#define DEF_PANEDWINDOW_PROXYBACKGROUND WHITE #define DEF_PANEDWINDOW_PROXYRELIEF "flat" #define DEF_PANEDWINDOW_RELIEF "flat" #define DEF_PANEDWINDOW_SASHCURSOR "" -- cgit v0.12 From abf5b4c30ea665d64278ac42d5babd7664750988 Mon Sep 17 00:00:00 2001 From: "fvogelnew1@free.fr" Date: Wed, 30 Sep 2015 06:23:19 +0000 Subject: Added -proxyborderwidth option --- doc/panedwindow.n | 3 +++ generic/tkPanedWindow.c | 7 ++++++- macosx/tkMacOSXDefault.h | 37 +++++++++++++++++++------------------ tests/panedwindow.test | 18 ++++++++++-------- unix/tkUnixDefault.h | 37 +++++++++++++++++++------------------ win/tkWinDefault.h | 37 +++++++++++++++++++------------------ 6 files changed, 76 insertions(+), 63 deletions(-) diff --git a/doc/panedwindow.n b/doc/panedwindow.n index f3c22be..6263d05 100644 --- a/doc/panedwindow.n +++ b/doc/panedwindow.n @@ -31,6 +31,9 @@ value accepted by \fBTk_GetPixels\fR. If an empty string, the widget will be made high enough to allow all contained widgets to have their natural height. .OP \-proxybackground proxyBackground ProxyBackground Background color to use when drawing the proxy. +.OP \-proxyborderwidth proxyBorderWidth ProxyBorderWidth +Specifies the width of the proxy. May be any value accepted by +\fBTk_GetPixels\fR. .OP \-proxyrelief proxyRelief ProxyRelief Relief to use when drawing the proxy. May be any of the standard Tk relief values. diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c index 96a4441..244eb09 100644 --- a/generic/tkPanedWindow.c +++ b/generic/tkPanedWindow.c @@ -148,6 +148,7 @@ typedef struct PanedWindow { * off-screen pixmap onto screen. */ int proxyx, proxyy; /* Proxy x,y coordinates. */ Tk_3DBorder proxyBackground;/* Background color used to draw proxy. */ + int proxyBorderWidth; /* Borderwidth used to draw proxy. */ int proxyRelief; /* Relief used to draw proxy. */ Slave **slaves; /* Pointer to array of Slaves. */ int numSlaves; /* Number of slaves. */ @@ -303,6 +304,9 @@ static const Tk_OptionSpec optionSpecs[] = { {TK_OPTION_BORDER, "-proxybackground", "proxyBackground", "ProxyBackground", DEF_PANEDWINDOW_BG_COLOR, -1, Tk_Offset(PanedWindow, proxyBackground), 0, (ClientData) DEF_PANEDWINDOW_BG_MONO}, + {TK_OPTION_PIXELS, "-proxyborderwidth", "proxyBorderWidth", "ProxyBorderWidth", + DEF_PANEDWINDOW_PROXYBORDERWIDTH, -1, Tk_Offset(PanedWindow, proxyBorderWidth), + 0, 0, GEOMETRY}, {TK_OPTION_RELIEF, "-proxyrelief", "proxyRelief", "Relief", DEF_PANEDWINDOW_PROXYRELIEF, -1, Tk_Offset(PanedWindow, proxyRelief), 0, 0, 0}, @@ -2778,7 +2782,8 @@ DisplayProxyWindow( */ Tk_Fill3DRectangle(tkwin, pixmap, pwPtr->proxyBackground, 0, 0, - Tk_Width(tkwin), Tk_Height(tkwin), 2, pwPtr->proxyRelief); + Tk_Width(tkwin), Tk_Height(tkwin), pwPtr->proxyBorderWidth, + pwPtr->proxyRelief); #ifndef TK_NO_DOUBLE_BUFFERING /* diff --git a/macosx/tkMacOSXDefault.h b/macosx/tkMacOSXDefault.h index ce8af8f..0db03bc 100644 --- a/macosx/tkMacOSXDefault.h +++ b/macosx/tkMacOSXDefault.h @@ -400,24 +400,25 @@ * Defaults for panedwindows */ -#define DEF_PANEDWINDOW_BG_COLOR NORMAL_BG -#define DEF_PANEDWINDOW_BG_MONO WHITE -#define DEF_PANEDWINDOW_BORDERWIDTH "1" -#define DEF_PANEDWINDOW_CURSOR "" -#define DEF_PANEDWINDOW_HANDLEPAD "8" -#define DEF_PANEDWINDOW_HANDLESIZE "8" -#define DEF_PANEDWINDOW_HEIGHT "" -#define DEF_PANEDWINDOW_OPAQUERESIZE "1" -#define DEF_PANEDWINDOW_ORIENT "horizontal" -#define DEF_PANEDWINDOW_PROXYBACKGROUND WHITE -#define DEF_PANEDWINDOW_PROXYRELIEF "flat" -#define DEF_PANEDWINDOW_RELIEF "flat" -#define DEF_PANEDWINDOW_SASHCURSOR "" -#define DEF_PANEDWINDOW_SASHPAD "0" -#define DEF_PANEDWINDOW_SASHRELIEF "flat" -#define DEF_PANEDWINDOW_SASHWIDTH "3" -#define DEF_PANEDWINDOW_SHOWHANDLE "0" -#define DEF_PANEDWINDOW_WIDTH "" +#define DEF_PANEDWINDOW_BG_COLOR NORMAL_BG +#define DEF_PANEDWINDOW_BG_MONO WHITE +#define DEF_PANEDWINDOW_BORDERWIDTH "1" +#define DEF_PANEDWINDOW_CURSOR "" +#define DEF_PANEDWINDOW_HANDLEPAD "8" +#define DEF_PANEDWINDOW_HANDLESIZE "8" +#define DEF_PANEDWINDOW_HEIGHT "" +#define DEF_PANEDWINDOW_OPAQUERESIZE "1" +#define DEF_PANEDWINDOW_ORIENT "horizontal" +#define DEF_PANEDWINDOW_PROXYBORDERWIDTH "2" +#define DEF_PANEDWINDOW_PROXYBACKGROUND WHITE +#define DEF_PANEDWINDOW_PROXYRELIEF "flat" +#define DEF_PANEDWINDOW_RELIEF "flat" +#define DEF_PANEDWINDOW_SASHCURSOR "" +#define DEF_PANEDWINDOW_SASHPAD "0" +#define DEF_PANEDWINDOW_SASHRELIEF "flat" +#define DEF_PANEDWINDOW_SASHWIDTH "3" +#define DEF_PANEDWINDOW_SHOWHANDLE "0" +#define DEF_PANEDWINDOW_WIDTH "" /* * Defaults for panedwindow panes diff --git a/tests/panedwindow.test b/tests/panedwindow.test index 2e800bc..7620f84 100644 --- a/tests/panedwindow.test +++ b/tests/panedwindow.test @@ -34,24 +34,26 @@ foreach {testName testData} { 1.5 {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken}} panedwindow-1.10 {-proxybackground "#f0a0a0" "#f0a0a0" non-existent {unknown color name "non-existent"}} - panedwindow-1.11 {-orient + panedwindow-1.11 {-proxyborderwidth + 1.3 1 badValue {bad screen distance "badValue"}} + panedwindow-1.12 {-orient horizontal horizontal badValue {bad orient "badValue": must be horizontal or vertical}} - panedwindow-1.12 {-relief + panedwindow-1.13 {-relief groove groove 1.5 {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken}} - panedwindow-1.13 {-sashcursor + panedwindow-1.14 {-sashcursor arrow arrow badValue {bad cursor spec "badValue"}} - panedwindow-1.14 {-sashpad + panedwindow-1.15 {-sashpad 1.3 1 badValue {bad screen distance "badValue"}} - panedwindow-1.15 {-sashrelief + panedwindow-1.16 {-sashrelief groove groove 1.5 {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken}} - panedwindow-1.16 {-sashwidth + panedwindow-1.17 {-sashwidth 10 10 badValue {bad screen distance "badValue"}} - panedwindow-1.17 {-showhandle + panedwindow-1.18 {-showhandle true 1 foo {expected boolean value but got "foo"}} - panedwindow-1.18 {-width + panedwindow-1.19 {-width 402 402 badValue {bad screen distance "badValue"}} } { lassign $testData optionName goodIn goodOut badIn badOut diff --git a/unix/tkUnixDefault.h b/unix/tkUnixDefault.h index f2cdf4b..e5b2598 100644 --- a/unix/tkUnixDefault.h +++ b/unix/tkUnixDefault.h @@ -358,24 +358,25 @@ * Defaults for panedwindows */ -#define DEF_PANEDWINDOW_BG_COLOR NORMAL_BG -#define DEF_PANEDWINDOW_BG_MONO WHITE -#define DEF_PANEDWINDOW_BORDERWIDTH "1" -#define DEF_PANEDWINDOW_CURSOR "" -#define DEF_PANEDWINDOW_HANDLEPAD "8" -#define DEF_PANEDWINDOW_HANDLESIZE "8" -#define DEF_PANEDWINDOW_HEIGHT "" -#define DEF_PANEDWINDOW_OPAQUERESIZE "1" -#define DEF_PANEDWINDOW_ORIENT "horizontal" -#define DEF_PANEDWINDOW_PROXYBACKGROUND WHITE -#define DEF_PANEDWINDOW_PROXYRELIEF "flat" -#define DEF_PANEDWINDOW_RELIEF "flat" -#define DEF_PANEDWINDOW_SASHCURSOR "" -#define DEF_PANEDWINDOW_SASHPAD "0" -#define DEF_PANEDWINDOW_SASHRELIEF "flat" -#define DEF_PANEDWINDOW_SASHWIDTH "3" -#define DEF_PANEDWINDOW_SHOWHANDLE "0" -#define DEF_PANEDWINDOW_WIDTH "" +#define DEF_PANEDWINDOW_BG_COLOR NORMAL_BG +#define DEF_PANEDWINDOW_BG_MONO WHITE +#define DEF_PANEDWINDOW_BORDERWIDTH "1" +#define DEF_PANEDWINDOW_CURSOR "" +#define DEF_PANEDWINDOW_HANDLEPAD "8" +#define DEF_PANEDWINDOW_HANDLESIZE "8" +#define DEF_PANEDWINDOW_HEIGHT "" +#define DEF_PANEDWINDOW_OPAQUERESIZE "1" +#define DEF_PANEDWINDOW_ORIENT "horizontal" +#define DEF_PANEDWINDOW_PROXYBORDERWIDTH "2" +#define DEF_PANEDWINDOW_PROXYBACKGROUND WHITE +#define DEF_PANEDWINDOW_PROXYRELIEF "flat" +#define DEF_PANEDWINDOW_RELIEF "flat" +#define DEF_PANEDWINDOW_SASHCURSOR "" +#define DEF_PANEDWINDOW_SASHPAD "0" +#define DEF_PANEDWINDOW_SASHRELIEF "flat" +#define DEF_PANEDWINDOW_SASHWIDTH "3" +#define DEF_PANEDWINDOW_SHOWHANDLE "0" +#define DEF_PANEDWINDOW_WIDTH "" /* * Defaults for panedwindow panes diff --git a/win/tkWinDefault.h b/win/tkWinDefault.h index 60c098f..8cceb2e 100644 --- a/win/tkWinDefault.h +++ b/win/tkWinDefault.h @@ -361,24 +361,25 @@ * Defaults for panedwindows */ -#define DEF_PANEDWINDOW_BG_COLOR NORMAL_BG -#define DEF_PANEDWINDOW_BG_MONO WHITE -#define DEF_PANEDWINDOW_BORDERWIDTH "1" -#define DEF_PANEDWINDOW_CURSOR "" -#define DEF_PANEDWINDOW_HANDLEPAD "8" -#define DEF_PANEDWINDOW_HANDLESIZE "8" -#define DEF_PANEDWINDOW_HEIGHT "" -#define DEF_PANEDWINDOW_OPAQUERESIZE "1" -#define DEF_PANEDWINDOW_ORIENT "horizontal" -#define DEF_PANEDWINDOW_PROXYBACKGROUND WHITE -#define DEF_PANEDWINDOW_PROXYRELIEF "flat" -#define DEF_PANEDWINDOW_RELIEF "flat" -#define DEF_PANEDWINDOW_SASHCURSOR "" -#define DEF_PANEDWINDOW_SASHPAD "0" -#define DEF_PANEDWINDOW_SASHRELIEF "flat" -#define DEF_PANEDWINDOW_SASHWIDTH "3" -#define DEF_PANEDWINDOW_SHOWHANDLE "0" -#define DEF_PANEDWINDOW_WIDTH "" +#define DEF_PANEDWINDOW_BG_COLOR NORMAL_BG +#define DEF_PANEDWINDOW_BG_MONO WHITE +#define DEF_PANEDWINDOW_BORDERWIDTH "1" +#define DEF_PANEDWINDOW_CURSOR "" +#define DEF_PANEDWINDOW_HANDLEPAD "8" +#define DEF_PANEDWINDOW_HANDLESIZE "8" +#define DEF_PANEDWINDOW_HEIGHT "" +#define DEF_PANEDWINDOW_OPAQUERESIZE "1" +#define DEF_PANEDWINDOW_ORIENT "horizontal" +#define DEF_PANEDWINDOW_PROXYBORDERWIDTH "2" +#define DEF_PANEDWINDOW_PROXYBACKGROUND WHITE +#define DEF_PANEDWINDOW_PROXYRELIEF "flat" +#define DEF_PANEDWINDOW_RELIEF "flat" +#define DEF_PANEDWINDOW_SASHCURSOR "" +#define DEF_PANEDWINDOW_SASHPAD "0" +#define DEF_PANEDWINDOW_SASHRELIEF "flat" +#define DEF_PANEDWINDOW_SASHWIDTH "3" +#define DEF_PANEDWINDOW_SHOWHANDLE "0" +#define DEF_PANEDWINDOW_WIDTH "" /* * Defaults for panedwindow panes -- cgit v0.12 From fbf5c9bbcabeed6dd095e203f1e8699ca9b42a49 Mon Sep 17 00:00:00 2001 From: "fvogelnew1@free.fr" Date: Wed, 30 Sep 2015 06:27:15 +0000 Subject: Use correct default value for -proxybackground --- generic/tkPanedWindow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c index 244eb09..7919728 100644 --- a/generic/tkPanedWindow.c +++ b/generic/tkPanedWindow.c @@ -302,7 +302,7 @@ static const Tk_OptionSpec optionSpecs[] = { DEF_PANEDWINDOW_ORIENT, -1, Tk_Offset(PanedWindow, orient), 0, (ClientData) orientStrings, GEOMETRY}, {TK_OPTION_BORDER, "-proxybackground", "proxyBackground", "ProxyBackground", - DEF_PANEDWINDOW_BG_COLOR, -1, Tk_Offset(PanedWindow, proxyBackground), 0, + DEF_PANEDWINDOW_PROXYBACKGROUND, -1, Tk_Offset(PanedWindow, proxyBackground), 0, (ClientData) DEF_PANEDWINDOW_BG_MONO}, {TK_OPTION_PIXELS, "-proxyborderwidth", "proxyBorderWidth", "ProxyBorderWidth", DEF_PANEDWINDOW_PROXYBORDERWIDTH, -1, Tk_Offset(PanedWindow, proxyBorderWidth), -- cgit v0.12 From 35bb51c3458db1d9f5148d69248f9a0c6c4016d7 Mon Sep 17 00:00:00 2001 From: "fvogelnew1@free.fr" Date: Wed, 30 Sep 2015 06:29:04 +0000 Subject: Re-ordered tests of the new three options in alphabetical order, following convention in the rest of the code and tests --- tests/panedwindow.test | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/panedwindow.test b/tests/panedwindow.test index 7620f84..d088cfe 100644 --- a/tests/panedwindow.test +++ b/tests/panedwindow.test @@ -29,13 +29,13 @@ foreach {testName testData} { 20 20 badValue {bad screen distance "badValue"}} panedwindow-1.8 {-opaqueresize true 1 foo {expected boolean value but got "foo"}} - panedwindow-1.9 {-proxyrelief - groove groove - 1.5 {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken}} - panedwindow-1.10 {-proxybackground + panedwindow-1.9 {-proxybackground "#f0a0a0" "#f0a0a0" non-existent {unknown color name "non-existent"}} - panedwindow-1.11 {-proxyborderwidth + panedwindow-1.10 {-proxyborderwidth 1.3 1 badValue {bad screen distance "badValue"}} + panedwindow-1.11 {-proxyrelief + groove groove + 1.5 {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken}} panedwindow-1.12 {-orient horizontal horizontal badValue {bad orient "badValue": must be horizontal or vertical}} -- cgit v0.12 From 1ea3d0953c13328aa994934ca76a248a7d41f9f9 Mon Sep 17 00:00:00 2001 From: "nijtmans@users.sourceforge.net" Date: Wed, 30 Sep 2015 09:15:44 +0000 Subject: Bring panedwindow proxy behavior in line with TIP #437 description. --- doc/panedwindow.n | 11 +++++++---- generic/tkPanedWindow.c | 23 +++++++++++++---------- tests/panedwindow.test | 2 +- unix/tkUnixDefault.h | 35 ++++++++++++++++------------------- win/tkWinDefault.h | 35 ++++++++++++++++------------------- 5 files changed, 53 insertions(+), 53 deletions(-) diff --git a/doc/panedwindow.n b/doc/panedwindow.n index 6263d05..9ee79ec 100644 --- a/doc/panedwindow.n +++ b/doc/panedwindow.n @@ -30,13 +30,16 @@ Specifies a desired height for the overall panedwindow widget. May be any value accepted by \fBTk_GetPixels\fR. If an empty string, the widget will be made high enough to allow all contained widgets to have their natural height. .OP \-proxybackground proxyBackground ProxyBackground -Background color to use when drawing the proxy. +Background color to use when drawing the proxy. If an empty string, the +value of the \fB-background\fR option will be used. .OP \-proxyborderwidth proxyBorderWidth ProxyBorderWidth -Specifies the width of the proxy. May be any value accepted by -\fBTk_GetPixels\fR. +Specifies the borderwidth of the proxy. May be any value accepted by +\fBTk_GetPixels\fR. If an empty string, the +value of the \fB-borderwidth\fR option will be used. .OP \-proxyrelief proxyRelief ProxyRelief Relief to use when drawing the proxy. May be any of the standard Tk -relief values. +relief values. If an empty string, the value of the \fB-relief\fR +option will be used. .OP \-opaqueresize opaqueResize OpaqueResize Specifies whether panes should be resized as a sash is moved (true), or if resizing should be deferred until the sash is placed (false). diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c index 7919728..8699ac3 100644 --- a/generic/tkPanedWindow.c +++ b/generic/tkPanedWindow.c @@ -147,9 +147,10 @@ typedef struct PanedWindow { GC gc; /* Graphics context for copying from * off-screen pixmap onto screen. */ int proxyx, proxyy; /* Proxy x,y coordinates. */ - Tk_3DBorder proxyBackground;/* Background color used to draw proxy. */ + Tk_3DBorder proxyBackground;/* Background color used to draw proxy. If NULL, use background. */ + Tcl_Obj *proxyBorderWidthPtr; /* Tcl_Obj rep for proxyBorderWidth, if NULL then use borderWitdh */ int proxyBorderWidth; /* Borderwidth used to draw proxy. */ - int proxyRelief; /* Relief used to draw proxy. */ + int proxyRelief; /* Relief used to draw proxy, if TK_RELIEF_NULL then use relief. */ Slave **slaves; /* Pointer to array of Slaves. */ int numSlaves; /* Number of slaves. */ int sizeofSlaves; /* Number of elements in the slaves array. */ @@ -302,14 +303,14 @@ static const Tk_OptionSpec optionSpecs[] = { DEF_PANEDWINDOW_ORIENT, -1, Tk_Offset(PanedWindow, orient), 0, (ClientData) orientStrings, GEOMETRY}, {TK_OPTION_BORDER, "-proxybackground", "proxyBackground", "ProxyBackground", - DEF_PANEDWINDOW_PROXYBACKGROUND, -1, Tk_Offset(PanedWindow, proxyBackground), 0, + 0, -1, Tk_Offset(PanedWindow, proxyBackground), TK_OPTION_NULL_OK, (ClientData) DEF_PANEDWINDOW_BG_MONO}, {TK_OPTION_PIXELS, "-proxyborderwidth", "proxyBorderWidth", "ProxyBorderWidth", - DEF_PANEDWINDOW_PROXYBORDERWIDTH, -1, Tk_Offset(PanedWindow, proxyBorderWidth), - 0, 0, GEOMETRY}, + 0, Tk_Offset(PanedWindow, proxyBorderWidthPtr), Tk_Offset(PanedWindow, proxyBorderWidth), + TK_OPTION_NULL_OK, 0, GEOMETRY}, {TK_OPTION_RELIEF, "-proxyrelief", "proxyRelief", "Relief", - DEF_PANEDWINDOW_PROXYRELIEF, -1, Tk_Offset(PanedWindow, proxyRelief), - 0, 0, 0}, + 0, -1, Tk_Offset(PanedWindow, proxyRelief), + TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", DEF_PANEDWINDOW_RELIEF, -1, Tk_Offset(PanedWindow, relief), 0, 0, 0}, {TK_OPTION_CURSOR, "-sashcursor", "sashCursor", "Cursor", @@ -2781,9 +2782,11 @@ DisplayProxyWindow( * Redraw the widget's background and border. */ - Tk_Fill3DRectangle(tkwin, pixmap, pwPtr->proxyBackground, 0, 0, - Tk_Width(tkwin), Tk_Height(tkwin), pwPtr->proxyBorderWidth, - pwPtr->proxyRelief); + Tk_Fill3DRectangle(tkwin, pixmap, + pwPtr->proxyBackground ? pwPtr->proxyBackground : pwPtr->background, + 0, 0, Tk_Width(tkwin), Tk_Height(tkwin), + pwPtr->proxyBorderWidthPtr ? pwPtr->proxyBorderWidth : pwPtr->borderWidth, + (pwPtr->proxyRelief != TK_RELIEF_NULL) ? pwPtr->proxyRelief : pwPtr->relief); #ifndef TK_NO_DOUBLE_BUFFERING /* diff --git a/tests/panedwindow.test b/tests/panedwindow.test index d088cfe..b075e18 100644 --- a/tests/panedwindow.test +++ b/tests/panedwindow.test @@ -32,7 +32,7 @@ foreach {testName testData} { panedwindow-1.9 {-proxybackground "#f0a0a0" "#f0a0a0" non-existent {unknown color name "non-existent"}} panedwindow-1.10 {-proxyborderwidth - 1.3 1 badValue {bad screen distance "badValue"}} + 1.3 1.3 badValue {bad screen distance "badValue"}} panedwindow-1.11 {-proxyrelief groove groove 1.5 {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken}} diff --git a/unix/tkUnixDefault.h b/unix/tkUnixDefault.h index e5b2598..4eb8778 100644 --- a/unix/tkUnixDefault.h +++ b/unix/tkUnixDefault.h @@ -358,25 +358,22 @@ * Defaults for panedwindows */ -#define DEF_PANEDWINDOW_BG_COLOR NORMAL_BG -#define DEF_PANEDWINDOW_BG_MONO WHITE -#define DEF_PANEDWINDOW_BORDERWIDTH "1" -#define DEF_PANEDWINDOW_CURSOR "" -#define DEF_PANEDWINDOW_HANDLEPAD "8" -#define DEF_PANEDWINDOW_HANDLESIZE "8" -#define DEF_PANEDWINDOW_HEIGHT "" -#define DEF_PANEDWINDOW_OPAQUERESIZE "1" -#define DEF_PANEDWINDOW_ORIENT "horizontal" -#define DEF_PANEDWINDOW_PROXYBORDERWIDTH "2" -#define DEF_PANEDWINDOW_PROXYBACKGROUND WHITE -#define DEF_PANEDWINDOW_PROXYRELIEF "flat" -#define DEF_PANEDWINDOW_RELIEF "flat" -#define DEF_PANEDWINDOW_SASHCURSOR "" -#define DEF_PANEDWINDOW_SASHPAD "0" -#define DEF_PANEDWINDOW_SASHRELIEF "flat" -#define DEF_PANEDWINDOW_SASHWIDTH "3" -#define DEF_PANEDWINDOW_SHOWHANDLE "0" -#define DEF_PANEDWINDOW_WIDTH "" +#define DEF_PANEDWINDOW_BG_COLOR NORMAL_BG +#define DEF_PANEDWINDOW_BG_MONO WHITE +#define DEF_PANEDWINDOW_BORDERWIDTH "1" +#define DEF_PANEDWINDOW_CURSOR "" +#define DEF_PANEDWINDOW_HANDLEPAD "8" +#define DEF_PANEDWINDOW_HANDLESIZE "8" +#define DEF_PANEDWINDOW_HEIGHT "" +#define DEF_PANEDWINDOW_OPAQUERESIZE "1" +#define DEF_PANEDWINDOW_ORIENT "horizontal" +#define DEF_PANEDWINDOW_RELIEF "flat" +#define DEF_PANEDWINDOW_SASHCURSOR "" +#define DEF_PANEDWINDOW_SASHPAD "0" +#define DEF_PANEDWINDOW_SASHRELIEF "flat" +#define DEF_PANEDWINDOW_SASHWIDTH "3" +#define DEF_PANEDWINDOW_SHOWHANDLE "0" +#define DEF_PANEDWINDOW_WIDTH "" /* * Defaults for panedwindow panes diff --git a/win/tkWinDefault.h b/win/tkWinDefault.h index 8cceb2e..a1a76c7 100644 --- a/win/tkWinDefault.h +++ b/win/tkWinDefault.h @@ -361,25 +361,22 @@ * Defaults for panedwindows */ -#define DEF_PANEDWINDOW_BG_COLOR NORMAL_BG -#define DEF_PANEDWINDOW_BG_MONO WHITE -#define DEF_PANEDWINDOW_BORDERWIDTH "1" -#define DEF_PANEDWINDOW_CURSOR "" -#define DEF_PANEDWINDOW_HANDLEPAD "8" -#define DEF_PANEDWINDOW_HANDLESIZE "8" -#define DEF_PANEDWINDOW_HEIGHT "" -#define DEF_PANEDWINDOW_OPAQUERESIZE "1" -#define DEF_PANEDWINDOW_ORIENT "horizontal" -#define DEF_PANEDWINDOW_PROXYBORDERWIDTH "2" -#define DEF_PANEDWINDOW_PROXYBACKGROUND WHITE -#define DEF_PANEDWINDOW_PROXYRELIEF "flat" -#define DEF_PANEDWINDOW_RELIEF "flat" -#define DEF_PANEDWINDOW_SASHCURSOR "" -#define DEF_PANEDWINDOW_SASHPAD "0" -#define DEF_PANEDWINDOW_SASHRELIEF "flat" -#define DEF_PANEDWINDOW_SASHWIDTH "3" -#define DEF_PANEDWINDOW_SHOWHANDLE "0" -#define DEF_PANEDWINDOW_WIDTH "" +#define DEF_PANEDWINDOW_BG_COLOR NORMAL_BG +#define DEF_PANEDWINDOW_BG_MONO WHITE +#define DEF_PANEDWINDOW_BORDERWIDTH "1" +#define DEF_PANEDWINDOW_CURSOR "" +#define DEF_PANEDWINDOW_HANDLEPAD "8" +#define DEF_PANEDWINDOW_HANDLESIZE "8" +#define DEF_PANEDWINDOW_HEIGHT "" +#define DEF_PANEDWINDOW_OPAQUERESIZE "1" +#define DEF_PANEDWINDOW_ORIENT "horizontal" +#define DEF_PANEDWINDOW_RELIEF "flat" +#define DEF_PANEDWINDOW_SASHCURSOR "" +#define DEF_PANEDWINDOW_SASHPAD "0" +#define DEF_PANEDWINDOW_SASHRELIEF "flat" +#define DEF_PANEDWINDOW_SASHWIDTH "3" +#define DEF_PANEDWINDOW_SHOWHANDLE "0" +#define DEF_PANEDWINDOW_WIDTH "" /* * Defaults for panedwindow panes -- cgit v0.12 From 84330bb73323c60213bc289e12507972bfe7a15f Mon Sep 17 00:00:00 2001 From: "nijtmans@users.sourceforge.net" Date: Wed, 30 Sep 2015 09:28:05 +0000 Subject: .... forgot to bring back tkMacOSXDefault.h to original state --- macosx/tkMacOSXDefault.h | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/macosx/tkMacOSXDefault.h b/macosx/tkMacOSXDefault.h index 0db03bc..0380de9 100644 --- a/macosx/tkMacOSXDefault.h +++ b/macosx/tkMacOSXDefault.h @@ -400,25 +400,22 @@ * Defaults for panedwindows */ -#define DEF_PANEDWINDOW_BG_COLOR NORMAL_BG -#define DEF_PANEDWINDOW_BG_MONO WHITE -#define DEF_PANEDWINDOW_BORDERWIDTH "1" -#define DEF_PANEDWINDOW_CURSOR "" -#define DEF_PANEDWINDOW_HANDLEPAD "8" -#define DEF_PANEDWINDOW_HANDLESIZE "8" -#define DEF_PANEDWINDOW_HEIGHT "" -#define DEF_PANEDWINDOW_OPAQUERESIZE "1" -#define DEF_PANEDWINDOW_ORIENT "horizontal" -#define DEF_PANEDWINDOW_PROXYBORDERWIDTH "2" -#define DEF_PANEDWINDOW_PROXYBACKGROUND WHITE -#define DEF_PANEDWINDOW_PROXYRELIEF "flat" -#define DEF_PANEDWINDOW_RELIEF "flat" -#define DEF_PANEDWINDOW_SASHCURSOR "" -#define DEF_PANEDWINDOW_SASHPAD "0" -#define DEF_PANEDWINDOW_SASHRELIEF "flat" -#define DEF_PANEDWINDOW_SASHWIDTH "3" -#define DEF_PANEDWINDOW_SHOWHANDLE "0" -#define DEF_PANEDWINDOW_WIDTH "" +#define DEF_PANEDWINDOW_BG_COLOR NORMAL_BG +#define DEF_PANEDWINDOW_BG_MONO WHITE +#define DEF_PANEDWINDOW_BORDERWIDTH "1" +#define DEF_PANEDWINDOW_CURSOR "" +#define DEF_PANEDWINDOW_HANDLEPAD "8" +#define DEF_PANEDWINDOW_HANDLESIZE "8" +#define DEF_PANEDWINDOW_HEIGHT "" +#define DEF_PANEDWINDOW_OPAQUERESIZE "1" +#define DEF_PANEDWINDOW_ORIENT "horizontal" +#define DEF_PANEDWINDOW_RELIEF "flat" +#define DEF_PANEDWINDOW_SASHCURSOR "" +#define DEF_PANEDWINDOW_SASHPAD "0" +#define DEF_PANEDWINDOW_SASHRELIEF "flat" +#define DEF_PANEDWINDOW_SASHWIDTH "3" +#define DEF_PANEDWINDOW_SHOWHANDLE "0" +#define DEF_PANEDWINDOW_WIDTH "" /* * Defaults for panedwindow panes -- cgit v0.12 From 97fffef5bb58b20d57ad9762e6e9c01a97b1f84f Mon Sep 17 00:00:00 2001 From: "nijtmans@users.sourceforge.net" Date: Wed, 30 Sep 2015 09:39:01 +0000 Subject: Carefull inspection shows that the default for -proxyrelief should be the value of -sashrelief, in order to be 100% compatible with how it behaved before. --- doc/panedwindow.n | 2 +- generic/tkPanedWindow.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/panedwindow.n b/doc/panedwindow.n index 9ee79ec..ce7adc3 100644 --- a/doc/panedwindow.n +++ b/doc/panedwindow.n @@ -38,7 +38,7 @@ Specifies the borderwidth of the proxy. May be any value accepted by value of the \fB-borderwidth\fR option will be used. .OP \-proxyrelief proxyRelief ProxyRelief Relief to use when drawing the proxy. May be any of the standard Tk -relief values. If an empty string, the value of the \fB-relief\fR +relief values. If an empty string, the value of the \fB-sashrelief\fR option will be used. .OP \-opaqueresize opaqueResize OpaqueResize Specifies whether panes should be resized as a sash is moved (true), diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c index 8699ac3..85180bc 100644 --- a/generic/tkPanedWindow.c +++ b/generic/tkPanedWindow.c @@ -2786,7 +2786,7 @@ DisplayProxyWindow( pwPtr->proxyBackground ? pwPtr->proxyBackground : pwPtr->background, 0, 0, Tk_Width(tkwin), Tk_Height(tkwin), pwPtr->proxyBorderWidthPtr ? pwPtr->proxyBorderWidth : pwPtr->borderWidth, - (pwPtr->proxyRelief != TK_RELIEF_NULL) ? pwPtr->proxyRelief : pwPtr->relief); + (pwPtr->proxyRelief != TK_RELIEF_NULL) ? pwPtr->proxyRelief : pwPtr->sashRelief); #ifndef TK_NO_DOUBLE_BUFFERING /* -- cgit v0.12 From eef426e7d40864d7e495cdd9a2d3e7c3cfa9ab92 Mon Sep 17 00:00:00 2001 From: "nijtmans@users.sourceforge.net" Date: Wed, 30 Sep 2015 10:04:55 +0000 Subject: One more suggestion: Use the value of -sashwidth as default for -proxyborderwidth. It's one pixel different from the current behavior (2 -> 3 pixels), but would be consistant with -proxyrelief vs -sashrelief. --- doc/panedwindow.n | 2 +- generic/tkPanedWindow.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/panedwindow.n b/doc/panedwindow.n index ce7adc3..0060dcd 100644 --- a/doc/panedwindow.n +++ b/doc/panedwindow.n @@ -35,7 +35,7 @@ value of the \fB-background\fR option will be used. .OP \-proxyborderwidth proxyBorderWidth ProxyBorderWidth Specifies the borderwidth of the proxy. May be any value accepted by \fBTk_GetPixels\fR. If an empty string, the -value of the \fB-borderwidth\fR option will be used. +value of the \fB-sashwidth\fR option will be used. .OP \-proxyrelief proxyRelief ProxyRelief Relief to use when drawing the proxy. May be any of the standard Tk relief values. If an empty string, the value of the \fB-sashrelief\fR diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c index 85180bc..159091f 100644 --- a/generic/tkPanedWindow.c +++ b/generic/tkPanedWindow.c @@ -2785,7 +2785,7 @@ DisplayProxyWindow( Tk_Fill3DRectangle(tkwin, pixmap, pwPtr->proxyBackground ? pwPtr->proxyBackground : pwPtr->background, 0, 0, Tk_Width(tkwin), Tk_Height(tkwin), - pwPtr->proxyBorderWidthPtr ? pwPtr->proxyBorderWidth : pwPtr->borderWidth, + pwPtr->proxyBorderWidthPtr ? pwPtr->proxyBorderWidth : pwPtr->sashWidth, (pwPtr->proxyRelief != TK_RELIEF_NULL) ? pwPtr->proxyRelief : pwPtr->sashRelief); #ifndef TK_NO_DOUBLE_BUFFERING -- cgit v0.12 From 401c1dfd21c0b6513805b6d87c3866c96f3a4522 Mon Sep 17 00:00:00 2001 From: "nijtmans@users.sourceforge.net" Date: Wed, 30 Sep 2015 10:51:28 +0000 Subject: Hm, better keep the TIP as it is, not making it more difficult than it already is. --- doc/panedwindow.n | 3 +-- generic/tkPanedWindow.c | 9 ++++----- macosx/tkMacOSXDefault.h | 1 + unix/tkUnixDefault.h | 1 + win/tkWinDefault.h | 1 + 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/doc/panedwindow.n b/doc/panedwindow.n index 0060dcd..33e1e12 100644 --- a/doc/panedwindow.n +++ b/doc/panedwindow.n @@ -34,8 +34,7 @@ Background color to use when drawing the proxy. If an empty string, the value of the \fB-background\fR option will be used. .OP \-proxyborderwidth proxyBorderWidth ProxyBorderWidth Specifies the borderwidth of the proxy. May be any value accepted by -\fBTk_GetPixels\fR. If an empty string, the -value of the \fB-sashwidth\fR option will be used. +\fBTk_GetPixels\fR. .OP \-proxyrelief proxyRelief ProxyRelief Relief to use when drawing the proxy. May be any of the standard Tk relief values. If an empty string, the value of the \fB-sashrelief\fR diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c index 159091f..99ed179 100644 --- a/generic/tkPanedWindow.c +++ b/generic/tkPanedWindow.c @@ -148,7 +148,7 @@ typedef struct PanedWindow { * off-screen pixmap onto screen. */ int proxyx, proxyy; /* Proxy x,y coordinates. */ Tk_3DBorder proxyBackground;/* Background color used to draw proxy. If NULL, use background. */ - Tcl_Obj *proxyBorderWidthPtr; /* Tcl_Obj rep for proxyBorderWidth, if NULL then use borderWitdh */ + Tcl_Obj *proxyBorderWidthPtr; /* Tcl_Obj rep for proxyBorderWidth */ int proxyBorderWidth; /* Borderwidth used to draw proxy. */ int proxyRelief; /* Relief used to draw proxy, if TK_RELIEF_NULL then use relief. */ Slave **slaves; /* Pointer to array of Slaves. */ @@ -306,8 +306,8 @@ static const Tk_OptionSpec optionSpecs[] = { 0, -1, Tk_Offset(PanedWindow, proxyBackground), TK_OPTION_NULL_OK, (ClientData) DEF_PANEDWINDOW_BG_MONO}, {TK_OPTION_PIXELS, "-proxyborderwidth", "proxyBorderWidth", "ProxyBorderWidth", - 0, Tk_Offset(PanedWindow, proxyBorderWidthPtr), Tk_Offset(PanedWindow, proxyBorderWidth), - TK_OPTION_NULL_OK, 0, GEOMETRY}, + DEF_PANEDWINDOW_PROXYBORDER, Tk_Offset(PanedWindow, proxyBorderWidthPtr), + Tk_Offset(PanedWindow, proxyBorderWidth), 0, 0, GEOMETRY}, {TK_OPTION_RELIEF, "-proxyrelief", "proxyRelief", "Relief", 0, -1, Tk_Offset(PanedWindow, proxyRelief), TK_OPTION_NULL_OK, 0, 0}, @@ -2784,8 +2784,7 @@ DisplayProxyWindow( Tk_Fill3DRectangle(tkwin, pixmap, pwPtr->proxyBackground ? pwPtr->proxyBackground : pwPtr->background, - 0, 0, Tk_Width(tkwin), Tk_Height(tkwin), - pwPtr->proxyBorderWidthPtr ? pwPtr->proxyBorderWidth : pwPtr->sashWidth, + 0, 0, Tk_Width(tkwin), Tk_Height(tkwin), pwPtr->proxyBorderWidth, (pwPtr->proxyRelief != TK_RELIEF_NULL) ? pwPtr->proxyRelief : pwPtr->sashRelief); #ifndef TK_NO_DOUBLE_BUFFERING diff --git a/macosx/tkMacOSXDefault.h b/macosx/tkMacOSXDefault.h index 0380de9..60d6cda 100644 --- a/macosx/tkMacOSXDefault.h +++ b/macosx/tkMacOSXDefault.h @@ -409,6 +409,7 @@ #define DEF_PANEDWINDOW_HEIGHT "" #define DEF_PANEDWINDOW_OPAQUERESIZE "1" #define DEF_PANEDWINDOW_ORIENT "horizontal" +#define DEF_PANEDWINDOW_PROXYBORDER "2" #define DEF_PANEDWINDOW_RELIEF "flat" #define DEF_PANEDWINDOW_SASHCURSOR "" #define DEF_PANEDWINDOW_SASHPAD "0" diff --git a/unix/tkUnixDefault.h b/unix/tkUnixDefault.h index 4eb8778..a8ecdc1 100644 --- a/unix/tkUnixDefault.h +++ b/unix/tkUnixDefault.h @@ -367,6 +367,7 @@ #define DEF_PANEDWINDOW_HEIGHT "" #define DEF_PANEDWINDOW_OPAQUERESIZE "1" #define DEF_PANEDWINDOW_ORIENT "horizontal" +#define DEF_PANEDWINDOW_PROXYBORDER "2" #define DEF_PANEDWINDOW_RELIEF "flat" #define DEF_PANEDWINDOW_SASHCURSOR "" #define DEF_PANEDWINDOW_SASHPAD "0" diff --git a/win/tkWinDefault.h b/win/tkWinDefault.h index a1a76c7..d0bae8f 100644 --- a/win/tkWinDefault.h +++ b/win/tkWinDefault.h @@ -370,6 +370,7 @@ #define DEF_PANEDWINDOW_HEIGHT "" #define DEF_PANEDWINDOW_OPAQUERESIZE "1" #define DEF_PANEDWINDOW_ORIENT "horizontal" +#define DEF_PANEDWINDOW_PROXYBORDER "2" #define DEF_PANEDWINDOW_RELIEF "flat" #define DEF_PANEDWINDOW_SASHCURSOR "" #define DEF_PANEDWINDOW_SASHPAD "0" -- cgit v0.12