Skip to content

Commit 55affaa

Browse files
committed
fix(setup): fixed layout of the setup-wizard, panel height was wrong
1 parent 8b99298 commit 55affaa

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

src/shell/setup_wizard/setup_wizard_panel.cpp

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,16 @@ void SetupWizardPanel::create() {
144144
auto root = std::make_unique<Flex>();
145145
root->setDirection(FlexDirection::Vertical);
146146
root->setAlign(FlexAlign::Stretch);
147+
root->setJustify(FlexJustify::SpaceBetween);
147148
root->setGap(Style::spaceLg * scale);
148149
root->setPadding(24.0f * scale, 28.0f * scale);
149150
m_root = root.get();
150151

152+
auto content = std::make_unique<Flex>();
153+
content->setDirection(FlexDirection::Vertical);
154+
content->setAlign(FlexAlign::Stretch);
155+
content->setGap(Style::spaceLg * scale);
156+
151157
// Header
152158
{
153159
auto header = std::make_unique<Flex>();
@@ -167,10 +173,10 @@ void SetupWizardPanel::create() {
167173
copy->addChild(makeLabel(i18n::tr("setup-wizard.subtitle"), Style::fontSizeBody * scale,
168174
colorSpecFromRole(ColorRole::OnSurfaceVariant)));
169175
header->addChild(std::move(copy));
170-
root->addChild(std::move(header));
176+
content->addChild(std::move(header));
171177
}
172178

173-
root->addChild(std::make_unique<Separator>());
179+
content->addChild(std::make_unique<Separator>());
174180

175181
// Telemetry
176182
{
@@ -195,7 +201,7 @@ void SetupWizardPanel::create() {
195201
row->addChild(std::move(toggle));
196202
}
197203
card->addChild(std::move(row));
198-
root->addChild(std::move(card));
204+
content->addChild(std::move(card));
199205
}
200206

201207
// Wallpaper
@@ -259,7 +265,7 @@ void SetupWizardPanel::create() {
259265
row->addChild(std::move(button));
260266
}
261267
card->addChild(std::move(row));
262-
root->addChild(std::move(card));
268+
content->addChild(std::move(card));
263269
}
264270

265271
// Theme
@@ -351,15 +357,12 @@ void SetupWizardPanel::create() {
351357
configureThemeOptionSelect();
352358
}
353359

354-
root->addChild(std::move(card));
360+
content->addChild(std::move(card));
355361
}
356362

363+
root->addChild(std::move(content));
364+
357365
// Footer
358-
{
359-
auto spacer = std::make_unique<Flex>();
360-
spacer->setFlexGrow(1.0f);
361-
root->addChild(std::move(spacer));
362-
}
363366
{
364367
auto footer = std::make_unique<Flex>();
365368
footer->setDirection(FlexDirection::Horizontal);

0 commit comments

Comments
 (0)