diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-09-30 09:15:44 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-09-30 09:15:44 (GMT) |
commit | b9e01a19baf686439841d3af49e82b0683c6bbb5 (patch) | |
tree | 2af4e7f9eab89ed7a6836d20e7b0dd64b02be000 /generic | |
parent | 2d0154284011157459e8af660019bf845c2e6048 (diff) | |
download | tk-b9e01a19baf686439841d3af49e82b0683c6bbb5.zip tk-b9e01a19baf686439841d3af49e82b0683c6bbb5.tar.gz tk-b9e01a19baf686439841d3af49e82b0683c6bbb5.tar.bz2 |
Bring panedwindow proxy behavior in line with TIP #437 description.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkPanedWindow.c | 23 |
1 files changed, 13 insertions, 10 deletions
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 /* |