[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kscreen/sebas/osd] /: rework kscreen's OSD logic
From:       Sebastian_Kügler <sebas () kde ! org>
Date:       2016-12-05 22:40:52
Message-ID: E1cE1wK-00034I-6N () code ! kde ! org
[Download RAW message or body]

Git commit 8b2ecea7ada2b47d2b7c0918a18061bb39cf32da by Sebastian Kügler.
Committed on 05/12/2016 at 17:15.
Pushed by sebas into branch 'sebas/osd'.

rework kscreen's OSD logic

Summary:
This changeset moves the various OSDs used in kscreen (output identifier, display \
button feedback) into the kded module.

The functional change in here is that instead of calling into plasmashell, now \
kscreen renders its own OSD. Plasmashell falls short since it doesn't offer the \
controls which kscreen needs, namely deciding what ends up on which output. The \
display button feedback is done entirely in the kded module, the output \
identification bits will be called over dbus by the new kscreen module. (I don't want \
to change the old one too much at this point.)

The ui code also now works better on high dpi displays.

I've tested this code on Wayland and X11, and it works on both. The previous OSD code \
doesn't.

Delaying the display button switch now also allows us to indicate what actually \
happened after pressing the button, so the user gets much better feedback (after the \
changes have been applied.)

Test Plan:
- tested on X11 and wayland, multi and single screen
- changeset contains a test app

Reviewers: #plasma

Subscribers: plasma-devel, davidedmundson

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D3598

M  +1    -1    CMakeLists.txt
M  +7    -4    tests/osd/CMakeLists.txt
M  +0    -4    tests/osd/main.cpp

https://commits.kde.org/kscreen/8b2ecea7ada2b47d2b7c0918a18061bb39cf32da

diff --git a/CMakeLists.txt b/CMakeLists.txt
index ed28b19..875b400 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,7 +12,7 @@ set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
 
 find_package(Qt5 REQUIRED COMPONENTS QuickWidgets Test)
 find_package(KF5 REQUIRED COMPONENTS DBusAddons Config ConfigWidgets I18n XmlGui \
                GlobalAccel WidgetsAddons
-                                     Declarative IconThemes Plasma WindowSystem
+                                     Declarative IconThemes Plasma
 )
 # WARNING PlasmaQuick provides unversioned CMake config
 find_package(KF5 REQUIRED COMPONENTS PlasmaQuick)
diff --git a/tests/osd/CMakeLists.txt b/tests/osd/CMakeLists.txt
index 51b2eb2..b7c5e9e 100644
--- a/tests/osd/CMakeLists.txt
+++ b/tests/osd/CMakeLists.txt
@@ -1,16 +1,19 @@
 include_directories(${CMAKE_SOURCE_DIR}/kcm/src)
 
-add_executable(osdtest main.cpp osdtest.cpp ../../kded/osd.cpp \
../../kded/osdmanager.cpp ../../kcm/src/utils.cpp) +add_executable(osdtest main.cpp
+                       osdtest.cpp
+                       ../../kded/osd.cpp
+                       ../../kded/osdmanager.cpp
+                       ../../kcm/src/utils.cpp
+)
+
 target_link_libraries(osdtest Qt5::Core
                               Qt5::DBus
                               Qt5::Quick
                               Qt5::Qml
                               KF5::Screen
-                              #KF5::PlasmaQuick
                               KF5::I18n
                               KF5::Declarative
-                              #KF5::IconThemes
-                              #KF5::QuickAddons
 )
 
 add_test(kscreen-kded-osdtest osdtest)
diff --git a/tests/osd/main.cpp b/tests/osd/main.cpp
index d406ab4..a63151d 100644
--- a/tests/osd/main.cpp
+++ b/tests/osd/main.cpp
@@ -26,12 +26,8 @@ int main(int argc, char **argv)
     QGuiApplication app(argc, argv);
 
     KScreen::OsdTest osdtest;
-
-    QCommandLineOption config = QCommandLineOption(QStringList() << \
                QStringLiteral("c") << "config",
-                                                  QStringLiteral("Config file"), \
"config");  QCommandLineParser parser;
     parser.addHelpOption();
-    parser.addOption(config);
     parser.process(app);
 
     osdtest.start();


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic