Skip to content

ass::MinSize#

Controls the min size of AView.

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

Examples#

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

7GUIs Cells — Spreadsheet processor (Excel).

        mState->currentExpression = mCell.expression;
        ALayoutInflater::inflate(
            this,
            _new<ATextField>() AUI_OVERRIDE_STYLE {
                  MinSize { 0 },
                  Margin { 0 },
                  BorderRadius { 0 },
                } AUI_LET {
                    it && mState->currentExpression;
                    it->focus();
examples/app/notes/src/main.cpp

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

                              };
                          })
                          .build(),
                      /// [scrollarea]
                    } AUI_OVERRIDE_STYLE { MinSize { 200_dp } },

                    Vertical::Expanding {
                      Centered {
                        Button {
                          Horizontal { Icon { ":img/trash.svg" }, SpacerFixed { 2_dp }, Label { "Delete" } },
examples/ui/contacts/src/main.cpp

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

                                    mSearchQuery->empty() ? Visibility::VISIBLE : Visibility::GONE,
                                }), AUI_SLOT(it)::setCustomStyle);
                            },
                          } AUI_OVERRIDE_STYLE { Padding(0, 8_dp) })
                      .build() AUI_OVERRIDE_STYLE { Expanding(0, 1), MinSize(200_dp) },

              experimental::Dynamic {
                  .content = AUI_REACT(mSelectedContact != nullptr ? contactDetails(mSelectedContact) : nullptr),
              } AUI_OVERRIDE_STYLE { Expanding(), MinSize(300_dp), BackgroundSolid { AColor::WHITE } },
            } AUI_OVERRIDE_STYLE {
examples/ui/opengl_simple/src/main.cpp

OpenGL Example — Demonstrates how to integrate custom OpenGL rendering with AUI Framework.

                Label { AUI_REACT(fmt::format("FPS: {:.1f}", *state->fps)) },
              } AUI_OVERRIDE_STYLE {
                    Padding(16_dp),
                    BackgroundSolid { AColor::WHITE.transparentize(0.5f) },
                    MinSize { 150_dp, {} },
                  },
            },
          },
        } AUI_OVERRIDE_STYLE { Padding(0) });
    window->show();
examples/ui/views/src/ExampleWindow.cpp

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

                  Label { "Drag area" },

                  _new<ADragArea>() AUI_LET {
                          it AUI_OVERRIDE_STYLE {
                              MinSize { 100_dp },
                              Border { 1_px, 0x0_rgb },
                          };
                          it->addView(ADragArea::convertToDraggable(_new<AButton>("Drag me!"), false));
                      },
                } AUI_OVERRIDE_STYLE { Expanding {} },
examples/ui/contacts/src/view/ContactDetailsView.cpp

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

                  Label { "Note" } AUI_OVERRIDE_STYLE { FixedSize { 100_dp, {} }, Opacity { 0.5f }, ATextAlign::RIGHT },
                },
                _new<ATextArea>() && mContact->note,
              } AUI_OVERRIDE_STYLE {
                    MinSize { {}, 100_dp },
                    LayoutSpacing { 4_dp },
                  },
            } AUI_OVERRIDE_STYLE { MaxSize(EDITOR_CONTENT_MAX_WIDTH, {}), Padding(8_dp), LayoutSpacing { 4_dp } },
          }),
          Centered {