Skip to content

Provide Text's text metrics #6283

Open
@Enyium

Description

@Enyium

Text should provide the actual metrics of its text. These new out-properties could be named text-x, text-y, text-width, and text-height.

With these, you can, e.g., implement a text background that isn't rendered too wide when text is wrapped. This SlintPad demo demonstrates the basic idea, although the background is still rendered too wide for wrapped text (change the preview size all the way from wide to narrow).

Metadata

Metadata

Assignees

No one assigned

    Labels

    a:language-slintCompiler for the .slint language (mO,bF)rfcRequest for comments: proposals for changes

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions