diff options
author | fvogel <fvogelnew1@free.fr> | 2020-03-29 12:56:08 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2020-03-29 12:56:08 (GMT) |
commit | 4956905e806f57e734630c226b4d52266414f671 (patch) | |
tree | 44b5cf65c5ae5e91d7f0463ed2d8dbe021eb8077 /generic | |
parent | d4febdf180216a9b48c78f4905d39bbe7192699c (diff) | |
parent | c9a5779ed8262de2ee55db19ea637ce9d2c19624 (diff) | |
download | tk-4956905e806f57e734630c226b4d52266414f671.zip tk-4956905e806f57e734630c226b4d52266414f671.tar.gz tk-4956905e806f57e734630c226b4d52266414f671.tar.bz2 |
Fix [655fe2754f]: Tearoff menu labels cut off.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkMenuDraw.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/generic/tkMenuDraw.c b/generic/tkMenuDraw.c index 74ba9ef..2512f7c 100644 --- a/generic/tkMenuDraw.c +++ b/generic/tkMenuDraw.c @@ -675,8 +675,27 @@ DisplayMenu( TkpDrawMenuEntry(mePtr, Tk_WindowId(menuPtr->tkwin), tkfont, &menuMetrics, mePtr->x, mePtr->y, mePtr->width, mePtr->height, strictMotif, 1); + + if (mePtr->entryFlags & ENTRY_LAST_COLUMN) { + + /* + * Paint the area at the right of an entry in the last column. + * This has zero width except after menu resizing. + */ + + Tk_Fill3DRectangle(tkwin, Tk_WindowId(tkwin), border, + mePtr->x + mePtr->width, mePtr->y, + Tk_Width(tkwin) - mePtr->x - mePtr->width - borderWidth, + mePtr->height, 0, TK_RELIEF_FLAT); + } + if ((index > 0) && (menuPtr->menuType != MENUBAR) && mePtr->columnBreak) { + + /* + * Paint the area under the last entry in a column. + */ + mePtr = menuPtr->entries[index - 1]; Tk_Fill3DRectangle(tkwin, Tk_WindowId(tkwin), border, mePtr->x, mePtr->y + mePtr->height, mePtr->width, @@ -694,6 +713,11 @@ DisplayMenu( height = Tk_Height(tkwin) - 2 * borderWidth; } else { mePtr = menuPtr->entries[menuPtr->numEntries - 1]; + + /* + * Paint the area under the last entry of the menu. + */ + Tk_Fill3DRectangle(tkwin, Tk_WindowId(tkwin), border, mePtr->x, mePtr->y + mePtr->height, mePtr->width, Tk_Height(tkwin) - mePtr->y - mePtr->height - borderWidth, @@ -703,6 +727,12 @@ DisplayMenu( width = Tk_Width(tkwin) - x - borderWidth; height = Tk_Height(tkwin) - y - borderWidth; } + + /* + * Paint the area at the bottom right of the last entry. + * This has zero width except after menu resizing. + */ + Tk_Fill3DRectangle(tkwin, Tk_WindowId(tkwin), border, x, y, width, height, 0, TK_RELIEF_FLAT); } |