diff options
author | fvogel <fvogelnew1@free.fr> | 2024-05-29 19:56:00 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2024-05-29 19:56:00 (GMT) |
commit | ab9f916ca0322b3de7e03b26a99cdef02c9dcd84 (patch) | |
tree | 0dfe096d6e03062657368cfdcd4a9c7251d20c3a /generic | |
parent | b0b7b4f0c5fb08be19e68c71e6d812444120a4e8 (diff) | |
download | tk-ab9f916ca0322b3de7e03b26a99cdef02c9dcd84.zip tk-ab9f916ca0322b3de7e03b26a99cdef02c9dcd84.tar.gz tk-ab9f916ca0322b3de7e03b26a99cdef02c9dcd84.tar.bz2 |
Fix [0fb337ea84]: ttk::combobox selection overruns downarrow element. Thanks to Emiliano Gavilan.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/ttk/ttkEntry.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c index fb76149..08fd085 100644 --- a/generic/ttk/ttkEntry.c +++ b/generic/ttk/ttkEntry.c @@ -1230,10 +1230,15 @@ static void EntryDisplay(void *clientData, Drawable d) Tk_GetPixelsFromObj(NULL, tkwin, es.selBorderWidthObj, &borderWidth); if (selBorder) { - Tk_Fill3DRectangle(tkwin, d, selBorder, + int selWidth; + int textareaEnd = textarea.x + textarea.width; + if (selEndX > textareaEnd) + selEndX = textareaEnd; + selWidth = selEndX - selStartX + 2 * borderWidth; + if (selWidth > 0) + Tk_Fill3DRectangle(tkwin, d, selBorder, selStartX - borderWidth, entryPtr->entry.layoutY - borderWidth, - selEndX - selStartX + 2*borderWidth, - entryPtr->entry.layoutHeight + 2*borderWidth, + selWidth, entryPtr->entry.layoutHeight + 2*borderWidth, borderWidth, TK_RELIEF_RAISED); } } |