Skip to content

Documentation of TextArea's fontprops keyword argument is misleading #12121

Closed

Description

@galenlynch

The documentation for TextArea strongly suggests that the keyword argument fontprops should be a FontProperties object. However, inspecting the source code suggests that fontprops should instead be a dictionary of keyword arguments that will be passed to the Text object inside TextArea.

I propose rewording the documentation to make it clear that fontprops should be a dictionary of keyword arguments.

Activity

  1. ImportanceOfBeingErnest commented on Oct 7, 2018

    @ImportanceOfBeingErnest
    Member

    There are two options:

    1. Update the documentation with what the code does. (easy)
    2. Update the code such that it'll indeed also allow for FontProperties objects as input. Then update the documentation.

    @galenlynch Any interest in making that change an submitting a pull request?

  2. timhoffm commented on Oct 7, 2018

    @timhoffm
    Member

    Actually, 1. is the way to go. The argument is correctly called textprops and passed as Text(..., **textprops). Thus FontProperties is just plain wrong.

  3. galenlynch commented on Oct 7, 2018

    @galenlynch
    ContributorAuthor

    Sure, glad to make a PR with option 1.

  4. added this to the v3.1 milestone on Oct 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions