summaryrefslogtreecommitdiffstats
path: root/win/tkWinMenu.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2020-03-14 21:39:30 (GMT)
committerfvogel <fvogelnew1@free.fr>2020-03-14 21:39:30 (GMT)
commit3f0dcafac155e16619fa6d6bc6252e7cae45b11c (patch)
treea317f428176a2d13cff97fa9187169fa324a679f /win/tkWinMenu.c
parentb2f247407ac9d918c19e9846eb909a8ffb814094 (diff)
downloadtk-3f0dcafac155e16619fa6d6bc6252e7cae45b11c.zip
tk-3f0dcafac155e16619fa6d6bc6252e7cae45b11c.tar.gz
tk-3f0dcafac155e16619fa6d6bc6252e7cae45b11c.tar.bz2
Fix [655fe2754f]: Tearoff menu labels cut off
Diffstat (limited to 'win/tkWinMenu.c')
-rw-r--r--win/tkWinMenu.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c
index 6e856c7..908e8d4 100644
--- a/win/tkWinMenu.c
+++ b/win/tkWinMenu.c
@@ -1631,7 +1631,13 @@ GetMenuAccelGeometry(
{
*heightPtr = fmPtr->linespace;
if (mePtr->type == CASCADE_ENTRY) {
- *widthPtr = 0;
+ /*
+ * Cascade entries have no accelerator but do show an arrow. Set
+ * this field width to the width of the OBM_MNARROW system bitmap
+ * used to display the arrow. I couldn't find how to query the
+ * system for this value, therefore I resort to hardcoding.
+ */
+ *widthPtr = CASCADE_ARROW_WIDTH;
} else if ((menuPtr->menuType != MENUBAR) && (mePtr->accelPtr != NULL)) {
const char *accel = Tcl_GetString(mePtr->accelPtr);