summaryrefslogtreecommitdiffstats
path: root/generic/tkMenuDraw.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkMenuDraw.c')
-rw-r--r--generic/tkMenuDraw.c36
1 files changed, 10 insertions, 26 deletions
diff --git a/generic/tkMenuDraw.c b/generic/tkMenuDraw.c
index 1abe1c4..3f492db 100644
--- a/generic/tkMenuDraw.c
+++ b/generic/tkMenuDraw.c
@@ -624,7 +624,6 @@ DisplayMenu(
int width;
int borderWidth;
Tk_3DBorder border;
- int activeBorderWidth;
int relief;
@@ -636,8 +635,6 @@ DisplayMenu(
Tk_GetPixelsFromObj(NULL, menuPtr->tkwin, menuPtr->borderWidthPtr,
&borderWidth);
border = Tk_Get3DBorderFromObj(menuPtr->tkwin, menuPtr->borderPtr);
- Tk_GetPixelsFromObj(NULL, menuPtr->tkwin,
- menuPtr->activeBorderWidthPtr, &activeBorderWidth);
if (menuPtr->menuType == MENUBAR) {
Tk_Fill3DRectangle(tkwin, Tk_WindowId(tkwin), border, borderWidth,
@@ -668,28 +665,16 @@ DisplayMenu(
}
mePtr->entryFlags &= ~ENTRY_NEEDS_REDISPLAY;
- if (menuPtr->menuType == MENUBAR) {
- width = mePtr->width;
- } else {
- if (mePtr->entryFlags & ENTRY_LAST_COLUMN) {
- width = Tk_Width(menuPtr->tkwin) - mePtr->x
- - activeBorderWidth;
- } else {
- width = mePtr->width + borderWidth;
- }
- }
TkpDrawMenuEntry(mePtr, Tk_WindowId(menuPtr->tkwin), tkfont,
- &menuMetrics, mePtr->x, mePtr->y, width,
+ &menuMetrics, mePtr->x, mePtr->y, mePtr->width,
mePtr->height, strictMotif, 1);
if ((index > 0) && (menuPtr->menuType != MENUBAR)
&& mePtr->columnBreak) {
mePtr = menuPtr->entries[index - 1];
Tk_Fill3DRectangle(tkwin, Tk_WindowId(tkwin), border,
- mePtr->x, mePtr->y + mePtr->height,
- mePtr->width,
- Tk_Height(tkwin) - mePtr->y - mePtr->height -
- activeBorderWidth, 0,
- TK_RELIEF_FLAT);
+ mePtr->x, mePtr->y + mePtr->height, mePtr->width,
+ Tk_Height(tkwin) - mePtr->y - mePtr->height - borderWidth,
+ 0, TK_RELIEF_FLAT);
}
}
@@ -698,19 +683,18 @@ DisplayMenu(
if (menuPtr->numEntries == 0) {
x = y = borderWidth;
- width = Tk_Width(tkwin) - 2 * activeBorderWidth;
- height = Tk_Height(tkwin) - 2 * activeBorderWidth;
+ width = Tk_Width(tkwin) - 2 * borderWidth;
+ height = Tk_Height(tkwin) - 2 * borderWidth;
} else {
mePtr = menuPtr->entries[menuPtr->numEntries - 1];
Tk_Fill3DRectangle(tkwin, Tk_WindowId(tkwin),
border, mePtr->x, mePtr->y + mePtr->height, mePtr->width,
- Tk_Height(tkwin) - mePtr->y - mePtr->height
- - activeBorderWidth, 0,
- TK_RELIEF_FLAT);
+ Tk_Height(tkwin) - mePtr->y - mePtr->height - borderWidth,
+ 0, TK_RELIEF_FLAT);
x = mePtr->x + mePtr->width;
y = mePtr->y + mePtr->height;
- width = Tk_Width(tkwin) - x - activeBorderWidth;
- height = Tk_Height(tkwin) - y - activeBorderWidth;
+ width = Tk_Width(tkwin) - x - borderWidth;
+ height = Tk_Height(tkwin) - y - borderWidth;
}
Tk_Fill3DRectangle(tkwin, Tk_WindowId(tkwin), border, x, y,
width, height, 0, TK_RELIEF_FLAT);