| Ticket UUID: | efbedd5ff5864ea56310fb68b72667095c0e5dec | |||
| Title: | Aqua: bugs for compound non-Ttk button-like widgets | |||
| Type: | Bug | Version: | core-8-6-branch | |
| Submitter: | chrstphrchvz | Created on: | 2020-03-30 05:46:53 | |
| Subsystem: | 03. [*button] and [label] | Assigned To: | kevin_walzer | |
| Priority: | 5 Medium | Severity: | Minor | |
| Status: | Closed | Last Modified: | 2020-04-03 12:24:37 | |
| Resolution: | Accepted | Closed By: | kevin_walzer | |
| Closed on: | 2020-04-03 12:24:37 | |||
| Description: |
Bug 1: On X11 and Windows, setting non-zero The radio.tcl widget demo specifically expects to be able to create a compound label ( More recent changes (or possibly bugs) in geometry/redrawing behavior can cause stale drawing artifacts when A simplified example (the label will not be 100x100, and clicking it will change its dimensions):
I believe this issue was introduced when these lines were removed from
Either duplicating equivalent statements (plus handling for Bug 2: On X11 and Windows, when a non-Ttk button-like widget has both image (or bitmap) and text, setting
The faulty appearance is because in
to
but unlike in TkpComputeButtonGeometry(), there is nothing in DrawButtonImageAndText() that checks for butPtr->compound != COMPOUND_NONE before setting haveText = 1.
The widget looks correct initially because The attached patch restores the I am uncertain whether other similar issues remain unaddressed or regressions are introduced. | |||
| User Comments: |
kevin_walzer added on 2020-04-03 12:24:37:
Patch committed to trunk and core-8-6--branch. Thank you for the patch, Christopher. kevin_walzer added on 2020-03-31 13:10:19: The macbuttonfix branch includes Christopher's patch. It corrects the behavior he has diagnosed. Please test the branch and if there are no objections, I will commit in a day or so. chrstphrchvz added on 2020-03-30 18:46:47: I did notice that some intervening commits from about a year ago did slightly affect the appearance of these issues, but understanding that some of those changes were reversions and also trying to find when it began to diverge from the X11 code (tkUnixButton.c) I went looking further back. I also notice that the patch I posted for [06d8246baf] eliminates the stale drawing artifacts the first issue exhibits. I don't know of any way to test appearances, however. Sorry, I meant just for the first issue. The second issue indeed is probably beyond what Tk can verify programmatically. marc_culler (claiming to be Marc Culler) added on 2020-03-30 13:07:35: Kevin, the commit to which Christopher refers was from 2015. I think these were errors that I made while trying to reorganize confusing code that I didn't fully understand. The patch looks good to me. Many thanks, Christoper! It might be possible to add some regression tests that check sizes of compound buttons. I don't know of any way to test appearances, however. kevin_walzer added on 2020-03-30 12:18:59: Christopher, thank you for your thorough documentation of this bug, and your detective work in clarifying how it was introduced and for proposing a patch. We were doing a lot of work on the button code in the last year or so - Marc, do you recall what led to these changes? Based on Christopher's work, it seems safe to implement his patch, but I am also not certain of the potential side effects. If you don't recall any specific issues, I will be glad to test the patch in a branch, and then merge if no objections arise. | |||
Attachments:
- efbedd5ff5.diff [download] added by chrstphrchvz on 2020-03-30 05:48:15. [details]
