diff --git a/.clang-format b/.clang-format index 96200df..dd5268c 100644 --- a/.clang-format +++ b/.clang-format @@ -32,13 +32,13 @@ SortIncludes: Never BracedInitializerIndentWidth: 2 ConstructorInitializerIndentWidth: 2 -# better spacing around with_style and let. +# better spacing around AUI_WITH_STYLE and let. # before: -# view with_style{Expanding()}, +# view AUI_WITH_STYLE{Expanding()}, # view let{printf("Hello");}, # # after: -# view with_style { Expanding() }, +# view AUI_WITH_STYLE { Expanding() }, # view let { printf("Hello"); }, Cpp11BracedListStyle: false SpaceBeforeCpp11BracedList: true diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 73acb98..7793c70 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -11,7 +11,7 @@ using namespace declarative; MainWindow::MainWindow(_ updater) : AWindow("Project template app", 300_dp, 200_dp), mUpdater(std::move(updater)) { setContents(Centered { Vertical { - Centered { Icon { ":img/icon.svg" } with_style { FixedSize(64_dp) } }, + Centered { Icon { ":img/icon.svg" } AUI_WITH_STYLE { FixedSize(64_dp) } }, Centered { Label { "Hello world from AUI!" } }, _new("Visit GitHub repo") .connect(&AView::clicked, this, [] { APlatform::openUrl("https://github.com/aui-framework/aui"); }), @@ -22,7 +22,7 @@ MainWindow::MainWindow(_ updater) &AView::clicked, this, [] { APlatform::openUrl("https://github.com/aui-framework/aui/issues/new"); }), CustomLayout {} & mUpdater->status.readProjected([&updater = mUpdater](const std::any& status) -> _ { if (std::any_cast(&status)) { - return _new("Check for updates").connect(&AView::clicked, slot(updater)::checkForUpdates); + return _new("Check for updates").connect(&AView::clicked, AUI_SLOT(updater)::checkForUpdates); } if (std::any_cast(&status)) { return Label { "Checking for updates..." }; @@ -35,7 +35,7 @@ MainWindow::MainWindow(_ updater) } if (std::any_cast(&status)) { return _new("Apply update and restart") - .connect(&AView::clicked, slot(updater)::applyUpdateAndRestart); + .connect(&AView::clicked, AUI_SLOT(updater)::applyUpdateAndRestart); } return nullptr; }),