Skip to content

ass::TextColor#

Controls the text color of AView.

Header:#include <AUI/ASS/Property/TextColor.h>
CMake:aui_link(my_target PUBLIC aui::views)

Examples#

examples/app/fractal/src/FractalWindow.cpp

Fractal Example — Fractal viewer application demonstrating usage of custom shaders.

    {
        centerPosDisplay->setCustomStyle({
          BackgroundSolid { 0x80000000_argb },
          Padding { 4_dp },
          TextColor { 0xffffff_rgb },
          FontSize { 11_pt },
        });
    }

    auto fractal = _new<FractalView>();
examples/ui/views/src/ExampleWindow.cpp

Views Example — All-in-one views building example.

/// [label_coloring]
static _<AView> link(const AString& url) {
    return Label { url } AUI_OVERRIDE_STYLE {
               TextColor { AColor::BLUE },
               BorderBottom { 1_px, AColor::BLUE },
               ACursor::POINTER,
           } AUI_LET { AObject::connect(it->clicked, AObject::GENERIC_OBSERVER, [url] { APlatform::openUrl(url); }); };
}
/// [label_coloring]