@@ -176,13 +176,6 @@ namespace settings {
176176 .padding = popupPadding,
177177 });
178178
179- const auto configureIconButton = [this ](Button& button) {
180- button.setMinWidth (Style::controlHeightSm * m_scale);
181- button.setMinHeight (Style::controlHeightSm * m_scale);
182- button.setPadding (Style::spaceXs * m_scale);
183- button.setRadius (Style::scaledRadiusMd (m_scale));
184- };
185-
186179 root->addChild (ui::row (
187180 {
188181 .align = FlexAlign::Center,
@@ -199,8 +192,12 @@ namespace settings {
199192 .glyph = " close" ,
200193 .glyphSize = Style::fontSizeBody * m_scale,
201194 .variant = ButtonVariant::Default,
195+ // Dialog header icon style.
196+ .minWidth = Style::controlHeightSm * m_scale,
197+ .minHeight = Style::controlHeightSm * m_scale,
198+ .padding = Style::spaceXs * m_scale,
199+ .radius = Style::scaledRadiusMd (m_scale),
202200 .onClick = [this ]() { DeferredCall::callLater ([this ]() { close (); }); },
203- .configure = configureIconButton,
204201 })));
205202
206203 root->addChild (ui::column (
@@ -213,12 +210,6 @@ namespace settings {
213210 makeOption (ConfigExportMode::FullEffective, i18n::tr (" settings.export-config.full-effective-title" ),
214211 i18n::tr (" settings.export-config.full-effective-description" ))));
215212
216- const auto configureFooterButton = [this ](Button& button) {
217- button.setMinHeight (Style::controlHeight * m_scale);
218- button.setPadding (Style::spaceXs * m_scale, Style::spaceMd * m_scale);
219- button.setRadius (Style::scaledRadiusMd (m_scale));
220- };
221-
222213 root->addChild (ui::row (
223214 {
224215 .align = FlexAlign::Center,
@@ -229,15 +220,23 @@ namespace settings {
229220 .text = i18n::tr (" common.actions.cancel" ),
230221 .fontSize = Style::fontSizeBody * m_scale,
231222 .variant = ButtonVariant::Ghost,
223+ // Dialog footer action style.
224+ .minHeight = Style::controlHeight * m_scale,
225+ .paddingV = Style::spaceXs * m_scale,
226+ .paddingH = Style::spaceMd * m_scale,
227+ .radius = Style::scaledRadiusMd (m_scale),
232228 .onClick = [this ]() { DeferredCall::callLater ([this ]() { close (); }); },
233- .configure = configureFooterButton,
234229 }),
235230 ui::button ({
236231 .text = i18n::tr (" settings.export-config.export" ),
237232 .fontSize = Style::fontSizeBody * m_scale,
238233 .variant = ButtonVariant::Primary,
234+ // Dialog footer action style.
235+ .minHeight = Style::controlHeight * m_scale,
236+ .paddingV = Style::spaceXs * m_scale,
237+ .paddingH = Style::spaceMd * m_scale,
238+ .radius = Style::scaledRadiusMd (m_scale),
239239 .onClick = [this ]() { DeferredCall::callLater ([this ]() { accept (); }); },
240- .configure = configureFooterButton,
241240 })));
242241
243242 contentParent->addChild (std::move (root));
0 commit comments