From 534592e9dcf87f5539c8136c744d8b40a9d6f90d Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Fri, 21 Apr 2017 16:45:59 +0300 Subject: [PATCH 1/2] fix #412,fix for groupDialog in plasma 5.8 --- plasmoid/contents/ui/main.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plasmoid/contents/ui/main.qml b/plasmoid/contents/ui/main.qml index 8cf81d0ca..39b9c0ea9 100644 --- a/plasmoid/contents/ui/main.qml +++ b/plasmoid/contents/ui/main.qml @@ -492,7 +492,9 @@ Item { //! otherwise it crashes. //! frameworks 5.29.0 provide id 335104 //! work only after Plasma 5.9 and frameworks 5.29 - if (Latte.WindowSystem.frameworksVersion >= 335104) { + //! + added a check for groupDialog also when it is present + //! in plasma 5.8 (that was introduced after 5.8.5) + if (Latte.WindowSystem.frameworksVersion >= 335104 || (groupDialog !== undefined)) { groupDialog = groupDialogGhost; } } From 597c457b9b42cb7adcf451da239c396d1ab3998f Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Fri, 21 Apr 2017 16:59:58 +0300 Subject: [PATCH 2/2] fix #385,load font through QFontDatabase --- app/dockcorona.cpp | 3 +++ app/packageplugins/shell/dockpackage.cpp | 5 +++-- shell/contents/configuration/LatteDockConfiguration.qml | 8 +------- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/app/dockcorona.cpp b/app/dockcorona.cpp index a49c85ab1..f004f1baa 100644 --- a/app/dockcorona.cpp +++ b/app/dockcorona.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -69,6 +70,8 @@ DockCorona::DockCorona(QObject *parent) setKPackage(package); qmlRegisterTypes(); + QFontDatabase::addApplicationFont(kPackage().filePath("tangerineFont")); + connect(this, &Corona::containmentAdded, this, &DockCorona::addDock); if (m_activityConsumer && (m_activityConsumer->serviceStatus() == KActivities::Consumer::Running)) { diff --git a/app/packageplugins/shell/dockpackage.cpp b/app/packageplugins/shell/dockpackage.cpp index c504176b1..2198297be 100644 --- a/app/packageplugins/shell/dockpackage.cpp +++ b/app/packageplugins/shell/dockpackage.cpp @@ -45,6 +45,7 @@ void DockPackage::initPackage(KPackage::Package *package) //Configuration package->addFileDefinition("lattedockconfigurationui", QStringLiteral("configuration/LatteDockConfiguration.qml"), i18n("Dock configuration UI")); package->addFileDefinition("configmodel", QStringLiteral("configuration/config.qml"), i18n("Config model")); + package->addFileDefinition("tangerineFont", QStringLiteral("fonts/tangerine.ttf"), i18n("Tangerine Font")); package->setFallbackPackage(fallback); qDebug() << "package is valid" << package->isValid(); } @@ -53,9 +54,9 @@ void DockPackage::pathChanged(KPackage::Package *package) { if (!package->metadata().isValid()) return; - + const QString pluginName = package->metadata().pluginId(); - + if (!pluginName.isEmpty() && pluginName != "org.kde.latte.shell") { auto fallback = KPackage::PackageLoader::self()->loadPackage("Plasma/Shell", "org.kde.latte.shell"); package->setFallbackPackage(fallback); diff --git a/shell/contents/configuration/LatteDockConfiguration.qml b/shell/contents/configuration/LatteDockConfiguration.qml index cfe836948..6fecf2a8d 100644 --- a/shell/contents/configuration/LatteDockConfiguration.qml +++ b/shell/contents/configuration/LatteDockConfiguration.qml @@ -46,12 +46,6 @@ PlasmaCore.FrameSvgItem { property bool panelIsVertical: plasmoid.formFactor === PlasmaCore.Types.Vertical - FontLoader { - id: tangerineFont - name: "Tangerine" - source: "../fonts/tangerine.ttf" - } - PlasmaComponents.ToolButton { id: pinButton @@ -130,7 +124,7 @@ PlasmaCore.FrameSvgItem { height: logo.height verticalAlignment: Text.AlignVCenter text: "atte" - font.family: tangerineFont.name + font.family: "Tangerine" font.pointSize: 2 * theme.defaultFont.pointSize font.italic: true