Commit 17ea9a49 authored by Roman Gilg's avatar Roman Gilg Committed by Nicolas Fella
Browse files

Define content margins for settings app

The settings app is supposed to be used on its own. The buttons are without
any margins to the window border though (when borders are deactivated - the
default on Breeze).

Set the default layout margins to improve the look.

(cherry picked from commit f953678e)
parent 15d85987
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <QApplication> #include <QApplication>
#include <QCommandLineParser> #include <QCommandLineParser>
#include <QStyle>
#include <KCMultiDialog> #include <KCMultiDialog>
#include <KAboutData> #include <KAboutData>
...@@ -49,6 +50,13 @@ int main(int argc, char** argv) ...@@ -49,6 +50,13 @@ int main(int argc, char** argv)
KCMultiDialog* dialog = new KCMultiDialog; KCMultiDialog* dialog = new KCMultiDialog;
dialog->addModule(QStringLiteral("kcm_kdeconnect"), {parser.value(QStringLiteral("args"))}); dialog->addModule(QStringLiteral("kcm_kdeconnect"), {parser.value(QStringLiteral("args"))});
auto style = dialog->style();
dialog->setContentsMargins(style->pixelMetric(QStyle::PM_LayoutLeftMargin),
style->pixelMetric(QStyle::PM_LayoutTopMargin),
style->pixelMetric(QStyle::PM_LayoutRightMargin),
style->pixelMetric(QStyle::PM_LayoutBottomMargin));
dialog->setAttribute(Qt::WA_DeleteOnClose); dialog->setAttribute(Qt::WA_DeleteOnClose);
dialog->show(); dialog->show();
......
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