Ignore:
Timestamp:
2022-11-17T19:56:07Z (16 months ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
901b302
Parents:
5d62130
Message:

Implement text abbreviation

When rendering text, gfx_puttext can now abbreviate it with …
to fit within the specified width. Use on window captions.
Now Barber Pole can have a proper caption.

Note that now the caption is centered on the space between the left
edge and the buttons, instead on the entire title bar, so it
may look a little lopsided. It will look better once we put
something to the left side of the title bar.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/gfxfont/include/types/gfx/text.h

    r5d62130 ra130983  
    7373        /** Horizontal alignment */
    7474        gfx_halign_t halign;
    75         /** Justification width (for gfx_halign_justify) */
    76         gfx_coord_t justify_width;
     75        /** Width available for the text */
     76        gfx_coord_t width;
    7777        /** Vertical alignment */
    7878        gfx_valign_t valign;
     79        /** Abbreviate the text with ellipsis if it does not fit @c width */
     80        bool abbreviate;
    7981        /** Underline */
    8082        bool underline;
Note: See TracChangeset for help on using the changeset viewer.