summaryrefslogtreecommitdiffstats
path: root/generic/tkMenuDraw.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2018-09-29 08:00:36 (GMT)
committerfvogel <fvogelnew1@free.fr>2018-09-29 08:00:36 (GMT)
commitea0200f3f7bb5e9837114f2a9f674a9ef330ec2b (patch)
tree4ab6f3cf1dec9624345723f45496201ceb97301b /generic/tkMenuDraw.c
parent65ba89c907a5b7c966d6ba5904daf97f4e39d199 (diff)
downloadtk-ea0200f3f7bb5e9837114f2a9f674a9ef330ec2b.zip
tk-ea0200f3f7bb5e9837114f2a9f674a9ef330ec2b.tar.gz
tk-ea0200f3f7bb5e9837114f2a9f674a9ef330ec2b.tar.bz2
Once the menu geometry is correctly computed there is no need anymore for questionable hacks in menu width calculation when displaying it
Diffstat (limited to 'generic/tkMenuDraw.c')
-rw-r--r--generic/tkMenuDraw.c15
1 files changed, 2 insertions, 13 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);
}