Skip to content

ass::Padding#

Controls the padding of AView.

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

Detailed Description#

See AUI Box Model.

Examples#

examples/app/minesweeper/src/Style.cpp

Minesweeper Game - Minesweeper game implementation driven by ass.

            class_of(".frame"),
            Border { 1_dp, 0x444444_rgb },
          },
          { class_of(".frame") > t<AButton>(), Margin { 4_dp } },
          { t<NewGameWindow>(), Padding { 4_dp } },
        });
    }
} s;

examples/app/fractal/src/FractalWindow.cpp

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

    auto centerPosDisplay = _new<ALabel>("-");
    {
        centerPosDisplay->setCustomStyle({
          BackgroundSolid { 0x80000000_argb },
          Padding { 4_dp },
          TextColor { 0xffffff_rgb },
          FontSize { 11_pt },
        });
    }

examples/ui/backdrop/src/main.cpp

Backdrop - Backdrop effects demo.

static auto headerWithContents(_<AView> content) {
    auto result = Stacked {
        AScrollArea::Builder().withContents(content).build() AUI_WITH_STYLE {
              Expanding(),
              Padding { 80_dp, 0, 0 },
            } AUI_LET { it->setExtraStylesheet(
                     AStylesheet {
                         {
                             t<AScrollAreaViewport>(),
                             AOverflow::VISIBLE,

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

7GUIs Cells - Spreadsheet processor (Excel).

                  .build() AUI_WITH_STYLE {
                Expanding(),
                ScrollbarAppearance(ScrollbarAppearance::ALWAYS, ScrollbarAppearance::ALWAYS),
              },
        } AUI_WITH_STYLE { Padding(0) });
    }
};

AUI_ENTRY {
    _new<CellsWindow>()->show();

examples/ui/contacts/src/view/ContactDetailsView.cpp

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

              } AUI_WITH_STYLE {
                    MinSize { {}, 100_dp },
                    LayoutSpacing { 4_dp },
                  },
            } AUI_WITH_STYLE { MaxSize(EDITOR_CONTENT_MAX_WIDTH, {}), Padding(8_dp), LayoutSpacing { 4_dp } },
          }),
          Centered {
            Horizontal::Expanding {
              SpacerExpanding(),
              Button { Label { mEditorMode ? "Discard" : "Delete" }, {me::drop} },