Ticket UUID: | e64820c1dea2ffe69ae7d704dd48fa0098e7ad84 | |||
Title: | The -justify configure option is duplicated for ttk::label | |||
Type: | Bug | Version: | 8.7b1 | |
Submitter: | serhiy.storchaka | Created on: | 2024-05-31 18:36:22 | |
Subsystem: | 88. Themed Tk | Assigned To: | fvogel | |
Priority: | 5 Medium | Severity: | Minor | |
Status: | Closed | Last Modified: | 2024-06-03 06:10:14 | |
Resolution: | Fixed | Closed By: | fvogel | |
Closed on: | 2024-06-03 06:10:14 | |||
Description: |
Example: ``` ttk::label .x .x configure ``` Output: ``` {-background frameColor FrameColor {} {}} {-foreground textColor TextColor {} {}} {-font font Font {} {}} {-borderwidth borderWidth BorderWidth {} {}} {-relief relief Relief {} {}} {-anchor anchor Anchor w w} {-justify justify Justify left left} {-wraplength wrapLength WrapLength {} {}} {-takefocus takeFocus TakeFocus {} {}} {-justify justify Justify left left} {-text text Text {} {}} {-textvariable textVariable Variable {} {}} {-underline underline Underline -1 -1} {-width width Width {} {}} {-image image Image {} {}} {-compound compound Compound {} {}} {-padding padding Pad {} {}} {-state state State normal normal} {-cursor cursor Cursor {} {}} {-style style Style {} {}} {-class {} {} {} {}} ``` You can see that {-justify justify Justify left left} is repeated twice in the output. This breaks the Tkinter tests in Python. Of course, the tests or the Tkinter code can be made to ignore the duplication, but this is clearly a Tk bug. | |||
User Comments: |
fvogel added on 2024-06-03 06:10:14:
Merged. fvogel added on 2024-06-02 14:05:24: Thanks for the report! Fix in [ca68e2948e]. The options for the ttk::label widget are declared in ttkButon:c in the LabelOptionSpecs array, which inherits from the BaseOptionSpecs array. It turns out that both arrays were declaring the same -justify option. I believe the duplication was introduced when merging the code implementing TIP #442 in [5a16de13]. That code promoted the -justify option to the base options, are forgot to remove -justify from the widget-specific options of the ttk::label widget. |
