diff --git a/kcmcontainer.cpp b/kcmcontainer.cpp --- a/kcmcontainer.cpp +++ b/kcmcontainer.cpp @@ -26,6 +26,7 @@ #include //QT +#include #include #include @@ -60,7 +61,8 @@ centerWidgetLayout->setContentsMargins(0, 0, 0, 0); QFont font; - font.setPointSize(qRound(font.pointSize() * 1.4)); + // Adapted from KTitleWidget to match KCM qml title size + font.setPointSize(qRound(QApplication::font().pointSize() * 1.6)); m_titleLabel = new QLabel(m_centerWidget); m_titleLabel->setFont(font); @@ -81,6 +83,11 @@ m_mod = new KCModuleProxy(info); m_modInfo = info; + // Adpated from systemsettings ModuleView::updatePageIconHeader similar hack + if (!m_mod->realModule()->inherits("KCModuleQml") ) { + m_centerWidget->setContentsMargins(5,5,5,5); + } + setKcmTitle(info); m_mod->setWhatsThis(m_mod->quickHelp()); @@ -102,6 +109,11 @@ void KcmContainer::setKcmTitle(const KCModuleInfo &info) { + //HACK: not much other ways to detect is a qml kcm + // Adpated from systemsettings ModuleView::updatePageIconHeader similar hack + if (m_mod->realModule()->inherits("KCModuleQml") ) { + m_titleLabel->setVisible(false); + } m_titleLabel->setText(info.comment()); }