diff options
-rw-r--r-- | generic/tkMenuDraw.c | 15 | ||||
-rw-r--r-- | macosx/tkMacOSXMenu.c | 2 | ||||
-rw-r--r-- | unix/tkUnixMenu.c | 2 | ||||
-rw-r--r-- | win/tkWinMenu.c | 6 |
4 files changed, 7 insertions, 18 deletions
diff --git a/generic/tkMenuDraw.c b/generic/tkMenuDraw.c index 8a82a27..3f492db 100644 --- a/generic/tkMenuDraw.c +++ b/generic/tkMenuDraw.c @@ -665,25 +665,14 @@ 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 - - borderWidth; - } 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, + mePtr->x, mePtr->y + mePtr->height, mePtr->width, Tk_Height(tkwin) - mePtr->y - mePtr->height - borderWidth, 0, TK_RELIEF_FLAT); } diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c index 404f625..ea7a97f 100644 --- a/macosx/tkMacOSXMenu.c +++ b/macosx/tkMacOSXMenu.c @@ -1139,7 +1139,7 @@ TkpComputeStandardMenuGeometry( columnEntryPtr->x = x; columnEntryPtr->entryFlags &= ~ENTRY_LAST_COLUMN; } - x += maxIndicatorSpace + maxWidth + 2 * borderWidth; + x += maxIndicatorSpace + maxWidth + 2 * activeBorderWidth; maxWidth = maxIndicatorSpace = 0; lastColumnBreak = i; y = borderWidth; diff --git a/unix/tkUnixMenu.c b/unix/tkUnixMenu.c index bc1bd2e..acee61f 100644 --- a/unix/tkUnixMenu.c +++ b/unix/tkUnixMenu.c @@ -1718,7 +1718,7 @@ TkpComputeStandardMenuGeometry( menuPtr->entries[j]->entryFlags |= ENTRY_LAST_COLUMN; } windowWidth = x + indicatorSpace + labelWidth + accelWidth - + 2 * activeBorderWidth + 2 * borderWidth; + + 2 * activeBorderWidth + borderWidth; windowHeight += borderWidth; diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c index 5dc8f8a..99da158 100644 --- a/win/tkWinMenu.c +++ b/win/tkWinMenu.c @@ -2874,7 +2874,7 @@ TkpComputeStandardMenuGeometry( menuPtr->entries[j]->entryFlags &= ~ENTRY_LAST_COLUMN; } x += indicatorSpace + labelWidth + accelWidth - + 2 * borderWidth; + + 2 * activeBorderWidth; indicatorSpace = labelWidth = accelWidth = 0; lastColumnBreak = i; y = borderWidth; @@ -2944,8 +2944,8 @@ TkpComputeStandardMenuGeometry( menuPtr->entries[j]->x = x; menuPtr->entries[j]->entryFlags |= ENTRY_LAST_COLUMN; } - windowWidth = x + indicatorSpace + labelWidth + accelWidth + accelSpace - + 2 * activeBorderWidth + 2 * borderWidth; + windowWidth = x + indicatorSpace + labelWidth + accelWidth + + 2 * activeBorderWidth + borderWidth; windowHeight += borderWidth; |