Merge branch 'Plasma/5.12'
This commit is contained in:
commit
9e32829f43
4 changed files with 10 additions and 12 deletions
|
@ -34,6 +34,7 @@ add_library(kwincompositing MODULE ${kwincomposing_SRC})
|
|||
|
||||
target_link_libraries(kwincompositing
|
||||
Qt5::Quick
|
||||
Qt5::QuickWidgets
|
||||
Qt5::DBus
|
||||
Qt5::Widgets
|
||||
KF5::CoreAddons
|
||||
|
@ -64,6 +65,7 @@ ecm_mark_as_test(effectModelTest)
|
|||
|
||||
target_link_libraries(effectModelTest
|
||||
Qt5::Quick
|
||||
Qt5::QuickWidgets
|
||||
Qt5::DBus
|
||||
Qt5::Test
|
||||
Qt5::Widgets
|
||||
|
|
|
@ -229,16 +229,12 @@ KWinCompositingKCM::KWinCompositingKCM(QWidget* parent, const QVariantList& args
|
|||
{
|
||||
QVBoxLayout *vl = new QVBoxLayout(this);
|
||||
|
||||
QWidget *w = QWidget::createWindowContainer(m_view.data(), this);
|
||||
connect(m_view.data(), &QWindow::minimumWidthChanged, w, &QWidget::setMinimumWidth);
|
||||
connect(m_view.data(), &QWindow::minimumHeightChanged, w, &QWidget::setMinimumHeight);
|
||||
w->setMinimumSize(m_view->initialSize());
|
||||
vl->addWidget(w);
|
||||
vl->addWidget(m_view.data());
|
||||
setLayout(vl);
|
||||
connect(m_view.data(), &KWin::Compositing::EffectView::changed, [this]{
|
||||
emit changed(true);
|
||||
});
|
||||
w->setFocusPolicy(Qt::StrongFocus);
|
||||
m_view->setFocusPolicy(Qt::StrongFocus);
|
||||
}
|
||||
|
||||
KWinCompositingKCM::~KWinCompositingKCM()
|
||||
|
|
|
@ -581,8 +581,8 @@ void EffectFilterModel::defaults()
|
|||
m_effectModel->defaults();
|
||||
}
|
||||
|
||||
EffectView::EffectView(ViewType type, QWindow *parent)
|
||||
: QQuickView(parent)
|
||||
EffectView::EffectView(ViewType type, QWidget *parent)
|
||||
: QQuickWidget(parent)
|
||||
{
|
||||
qRegisterMetaType<OpenGLPlatformInterfaceModel*>();
|
||||
qmlRegisterType<EffectConfig>("org.kde.kwin.kwincompositing", 1, 0, "EffectConfig");
|
||||
|
@ -608,7 +608,7 @@ void EffectView::init(ViewType type)
|
|||
break;
|
||||
}
|
||||
QString mainFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, path, QStandardPaths::LocateFile);
|
||||
setResizeMode(QQuickView::SizeRootObjectToView);
|
||||
setResizeMode(QQuickWidget::SizeRootObjectToView);
|
||||
setSource(QUrl(mainFile));
|
||||
rootObject()->setProperty("color",
|
||||
KColorScheme(QPalette::Active, KColorScheme::Window, KSharedConfigPtr(0)).background(KColorScheme::NormalBackground).color());
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <QAbstractItemModel>
|
||||
#include <QHash>
|
||||
#include <QList>
|
||||
#include <QQuickView>
|
||||
#include <QQuickWidget>
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <QString>
|
||||
#include <KPluginInfo>
|
||||
|
@ -114,7 +114,7 @@ private:
|
|||
|
||||
};
|
||||
|
||||
class EffectView : public QQuickView
|
||||
class EffectView : public QQuickWidget
|
||||
{
|
||||
|
||||
Q_OBJECT
|
||||
|
@ -124,7 +124,7 @@ public:
|
|||
DesktopEffectsView,
|
||||
CompositingSettingsView
|
||||
};
|
||||
EffectView(ViewType type, QWindow *parent = 0);
|
||||
EffectView(ViewType type, QWidget *parent = 0);
|
||||
|
||||
void save();
|
||||
void load();
|
||||
|
|
Loading…
Reference in a new issue