Commit 189a19f4 authored by David Edmundson's avatar David Edmundson

Add manual test for win deco palettes

Test Plan: Ran it.

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D9657
parent de7c99bd
......@@ -28,7 +28,7 @@ set(KF5_DEP_VERSION "5.33.0")
find_package(KF5 ${KF5_DEP_VERSION} REQUIRED COMPONENTS
Config ConfigWidgets I18n IconThemes KIO Notifications Wayland
WidgetsAddons WindowSystem
WidgetsAddons WindowSystem ConfigWidgets
)
find_package(XCB COMPONENTS XCB)
......
......@@ -2,4 +2,4 @@ add_executable(qfiledialogtest qfiledialogtest.cpp)
target_link_libraries(qfiledialogtest Qt5::Core Qt5::Widgets)
add_executable(windowdecotest windowdecotest.cpp)
target_link_libraries(windowdecotest Qt5::Core Qt5::Widgets)
target_link_libraries(windowdecotest Qt5::Core Qt5::Widgets KF5::ConfigWidgets)
......@@ -26,6 +26,12 @@
#include <QPushButton>
#include <QVBoxLayout>
#include <QTimer>
#include <KColorSchemeManager>
#include <KActionMenu>
#include <QComboBox>
#include <QToolButton>
#include <QDebug>
class ATestWindow: public QWidget
{
......@@ -50,8 +56,17 @@ ATestWindow::ATestWindow()
QTimer::singleShot(1000, this, [this](){this->show();});
});
QComboBox *colorCombo = new QComboBox();
KColorSchemeManager *schemes = new KColorSchemeManager(this);
colorCombo->setModel(schemes->model());
connect(colorCombo, QOverload<int>::of(&QComboBox::activated), schemes, [=](int row) {
schemes->activateScheme(colorCombo->model()->index(row, 0));
});
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(mBtn);
layout->addWidget(colorCombo);
setLayout(layout);
}
......
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