Commit 6a9df821 authored by Marco Martin's avatar Marco Martin
Browse files

QML applets need to manage padding by themselves

Summary:
remove our padding from qml kcms
this fixes the cutted away shadow for InlineMessage

Test Plan: InlineMessages work better now

Reviewers: #plasma, hein

Reviewed By: #plasma, hein

Subscribers: hein, abetts, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D12515
parent c39152a8
......@@ -348,6 +348,21 @@ void ModuleView::activeModuleChanged(KPageWidgetItem * current, KPageWidgetItem
if (activeModule) {
KActivities::ResourceInstance::notifyAccessed(QUrl(QStringLiteral("kcm:") + activeModule->moduleInfo().service()->storageId()),
QStringLiteral("org.kde.systemsettings"));
if (activeModule->realModule() && activeModule->realModule()->inherits("KCModuleQml")) {
d->mButtons->setContentsMargins(
style()->pixelMetric(QStyle::PM_LayoutLeftMargin),
style()->pixelMetric(QStyle::PM_LayoutTopMargin),
style()->pixelMetric(QStyle::PM_LayoutRightMargin),
style()->pixelMetric(QStyle::PM_LayoutBottomMargin));
d->mLayout->setContentsMargins(0, 0, 0, 0);
} else {
d->mButtons->setContentsMargins(0, 0, 0, 0);
d->mLayout->setContentsMargins(
style()->pixelMetric(QStyle::PM_LayoutLeftMargin),
style()->pixelMetric(QStyle::PM_LayoutTopMargin),
style()->pixelMetric(QStyle::PM_LayoutRightMargin),
style()->pixelMetric(QStyle::PM_LayoutBottomMargin));
}
}
}
......
Supports Markdown
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