diff options
author | fvogel <fvogelnew1@free.fr> | 2024-06-02 07:15:19 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2024-06-02 07:15:19 (GMT) |
commit | 1848ec03ee8320a18dd9323469e4aeb8e33a5f0c (patch) | |
tree | 11f514ffc385996922e34750dd7e9dcdb4d56975 | |
parent | f90a1c9c963255657d02c8e5a026a73581631c29 (diff) | |
parent | f09f3edc000b01969a94f11290f4352b403fe7e7 (diff) | |
download | tk-1848ec03ee8320a18dd9323469e4aeb8e33a5f0c.zip tk-1848ec03ee8320a18dd9323469e4aeb8e33a5f0c.tar.gz tk-1848ec03ee8320a18dd9323469e4aeb8e33a5f0c.tar.bz2 |
Fix [0fb337ea84]: ttk::combobox selection overruns downarrow element. Thanks to Emiliano Gavilan.
-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 85d65e9..8c023d4 100644 --- a/generic/ttk/ttkEntry.c +++ b/generic/ttk/ttkEntry.c @@ -1257,10 +1257,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); } } |