mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
Having a global set margins and orientation (that were calculated from the panel containment) caused a lot of issues with the way bindings were evaluated across panels, and with high coupling. Now use properties from within containments to determine shell margins instead, which removes the dependency on other containments for measurements. This allows us to get rid of TaskPanelControls as well! Fixes: https://invent.kde.org/teams/plasma-mobile/issues/-/issues/198
22 lines
772 B
C++
22 lines
772 B
C++
// SPDX-FileCopyrightText: 2021 Devin Lin <devin@kde.org>
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#include "mobileshellstateplugin.h"
|
|
|
|
#include <QQmlContext>
|
|
#include <QQuickItem>
|
|
|
|
QUrl resolvePath(std::string str)
|
|
{
|
|
return QUrl("qrc:/org/kde/plasma/private/mobileshell/state/qml/" + QString::fromStdString(str));
|
|
}
|
|
|
|
void MobileShellStatePlugin::registerTypes(const char *uri)
|
|
{
|
|
Q_ASSERT(QLatin1String(uri) == QLatin1String("org.kde.plasma.private.mobileshell.state"));
|
|
|
|
// /
|
|
qmlRegisterSingletonType(resolvePath("HomeScreenControls.qml"), uri, 1, 0, "HomeScreenControls");
|
|
qmlRegisterSingletonType(resolvePath("Shell.qml"), uri, 1, 0, "Shell");
|
|
qmlRegisterSingletonType(resolvePath("TopPanelControls.qml"), uri, 1, 0, "TopPanelControls");
|
|
}
|