mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-20 10:38:09 +08:00
Use shared_ptr instead of unique_ptr for elements.
This allow users to pass it into initializer list. Then clang-format will produce 'acceptable' indentations. This fixes: https://github.com/ArthurSonzogni/FTXUI/issues/18
This commit is contained in:
@@ -15,11 +15,11 @@ int main(int argc, const char* argv[]) {
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
auto img1 = []() { return text(L"img") | border; };
|
||||
auto img2 = []() { return vbox(text(L"big"), text(L"image")) | border; };
|
||||
auto img2 = []() { return vbox({text(L"big"), text(L"image")}) | border; };
|
||||
|
||||
std::string reset_position;
|
||||
for (int i = 0;; ++i) {
|
||||
auto document =
|
||||
auto document = //
|
||||
hflow(
|
||||
paragraph(L"Hello world! Here is an image:"), img1(),
|
||||
paragraph(L" Here is a text "), text(L"underlined ") | underlined,
|
||||
|
Reference in New Issue
Block a user