ass::Opacity#
Controls the opacity of AView.
| Header: | #include <AUI/ASS/Property/Opacity.h> |
| CMake: | aui_link(my_target PUBLIC aui::views) |
Examples#
examples/7guis/cells/src/main.cpp
7GUIs Cells - Spreadsheet processor (Excel).
};
static _<AView> labelTitle(AString s) {
return _new<ALabel>(std::move(s)) AUI_WITH_STYLE {
Opacity { 0.5f },
ATextAlign::CENTER,
};
}
class CellView : public AViewContainer {
examples/ui/contacts/src/view/ContactDetailsView.cpp
AUI Contacts - Usage of AUI_DECLARATIVE_FOR to make a contacts-like application.
_<AView> profilePhoto(const _<Contact>& contact) {
return Centered {
Label {
AUI_REACT(contact->displayName->empty() ? "?" : AString(1, contact->displayName->first()).uppercase())
} AUI_WITH_STYLE { Opacity(0.5f), FontSize { 32_dp } },
} AUI_WITH_STYLE {
FixedSize { 64_dp },
BorderRadius { 32_dp },
BackgroundGradient { AColor::GRAY.lighter(0.5f), AColor::GRAY, 163_deg },
};