Commit 522a7fe0 authored by Ismael Asensio's avatar Ismael Asensio

Fix extra bottom spacing for QML KCMs

For QWidget KCMs, the spacing between main content and general
buttons is achieved via `VBoxLayout.spacing`.

For QML KCMs on the other hand, this spacing gets added to the
button row `contentMargins`, so we need to remove this extra
spacing to keep consistency.
parent 7157c45d
......@@ -212,7 +212,7 @@ void ModuleView::updatePageIconHeader( KPageWidgetItem * page, bool light )
if( !moduleInfo ) {
// Seems like we have some form of a race condition going on here...
return;
return;
}
page->setHeader( moduleInfo->moduleName() );
......@@ -363,6 +363,7 @@ void ModuleView::activeModuleChanged(KPageWidgetItem * current, KPageWidgetItem
style()->pixelMetric(QStyle::PM_LayoutRightMargin),
style()->pixelMetric(QStyle::PM_LayoutBottomMargin));
d->mLayout->setContentsMargins(0, 0, 0, 0);
d->mLayout->setSpacing(0);
} else {
d->mButtons->setContentsMargins(0, 0, 0, 0);
d->mLayout->setContentsMargins(
......@@ -370,6 +371,7 @@ void ModuleView::activeModuleChanged(KPageWidgetItem * current, KPageWidgetItem
style()->pixelMetric(QStyle::PM_LayoutTopMargin),
style()->pixelMetric(QStyle::PM_LayoutRightMargin),
style()->pixelMetric(QStyle::PM_LayoutBottomMargin));
d->mLayout->setSpacing(style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing));
}
moduleShowDefaultsIndicators(d->mDefaultsIndicatorsVisible);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment