Skip to content

ass::BorderRadius#

Controls border radius.

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

Examples#

examples/7guis/cells/src/main.cpp

7GUIs Cells — Spreadsheet processor (Excel).

            this,
            _new<ATextField>() AUI_OVERRIDE_STYLE {
                  MinSize { 0 },
                  Margin { 0 },
                  BorderRadius { 0 },
                } AUI_LET {
                    it && mState->currentExpression;
                    it->focus();
                    connect(it->focusLost, me::commitExpression);
                });
examples/app/notes/src/main.cpp

Notes App — Note taking app that demonstrates usage of AListModel, AProperty, user data saving and loading.

              Opacity { 0.7f },
            },
    } AUI_OVERRIDE_STYLE {
        Padding { 4_dp, 8_dp },
        BorderRadius { 8_dp },
        Margin { 4_dp, 8_dp },
    };
}
/// [notePreview]
examples/ui/contacts/src/view/ContactDetailsView.cpp

AUI Contacts — Usage of AUI_DECLARATIVE_FOR to make a contacts-like application.

          AUI_REACT(contact->displayName->empty() ? "?" : AString(1, contact->displayName->first()).uppercase())
        } AUI_OVERRIDE_STYLE { Opacity(0.5f), FontSize { 32_dp } },
    } AUI_OVERRIDE_STYLE {
        FixedSize { 64_dp },
        BorderRadius { 32_dp },
        BackgroundGradient { AColor::GRAY.lighter(0.5f), AColor::GRAY, 163_deg },
    };
}

template <typename T>
examples/ui/backdrop/src/main.cpp

Backdrop — Backdrop effects demo.

          Centered {
            Horizontal {
                  Label { "boll" } AUI_OVERRIDE_STYLE {
                      FixedSize { 60_dp },
                      BorderRadius { 60_dp / 2.f },
                      Padding { 0 },
                      ATextAlign::CENTER,
                      Backdrop {
                          Backdrop::LiquidFluid {},
                      },
examples/ui/views/src/ExampleWindow.cpp

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

                                      TextColor { i.readableBlackOrWhite() },
                                  }
                              } AUI_OVERRIDE_STYLE {
                                  BackgroundSolid { i },
                                  BorderRadius { 6_pt },
                                  Margin { 2_dp, 4_dp },
                              };
                          }
                      };
                  }(),