52 _sideStart{backend.createSpacer(_sidebar.get())},
53 _side{backend.createStack(_sidebar.get(),
Axis::
Vertical)},
54 _sideTop{backend.createSpacer(_side.get())},
55 _name{backend.createText(_side.get())},
56 _navigator{std::make_unique<
Navigator>(backend, _side.get(), std::move(options.
navigator))},
57 _sideEnd{backend.createSpacer(_sidebar.get())},
60 _topStart{backend.createSpacer(_topBar.get())},
61 _title{backend.createText(_topBar.get())},
63 _principal{backend.createText(_topBar.get())},
64 _signOut{backend.createButton(_topBar.get())},
65 _topEnd{backend.createSpacer(_topBar.get())},
67 _top{backend.createSpacer(_page.get())},
69 _left{backend.createSpacer(_padded.get())},
70 _content{backend.createStack(_padded.get(),
Axis::
Vertical)},
71 _right{backend.createSpacer(_padded.get())} {
73 _root->setTestId(
"shell");
75 _sidebar->setSurface(
"sidebar");
78 _sidebar->setTestId(
"shell_sidebar");
80 _sideStart->setLayout({.width =
Sizing::fixed(0), .height = {}});
83 _sideTop->setLayout({.width = {}, .height =
Sizing::fixed(0)});
84 _sideEnd->setLayout({.width =
Sizing::fixed(0), .height = {}});
87 _name->setTestId(
"shell_application");
89 _main->setLayout({.width = Sizing::stretch(), .height = Sizing::stretch()});
90 _topBar->setSurface(
"toolbar");
93 _topStart->setLayout({.width = Sizing::fixed(0), .height = {}});
94 _topEnd->setLayout({.width =
Sizing::fixed(0), .height = {}});
95 _topBar->setTestId(
"shell_topbar");
97 _topBar->setAlign(Align::Center);
98 _title->setRole(TextRole::Heading);
100 _title->setTestId(
"shell_title");
105 _headSlot->setTestId(
"shell_head");
106 _principal->setRole(TextRole::Muted);
107 _principal->setTestId(
"shell_principal");
108 _signOut->setLabel(
"Sign out");
109 _signOut->setTestId(
"shell_signOut");
110 _signOut->setVisible(
static_cast<bool>(options.onSignOut));
111 _signOut->setOnClick(std::move(options.onSignOut));
114 _page->setSurface(
"page");
115 _page->setLayout({.width = Sizing::stretch(), .height = Sizing::stretch()});
117 _page->setTestId(
"shell_page");
123 _right->setLayout({.width =
Sizing::fixed(0), .height = {}});