global shortcuts and different flags for the dashboard
it should be actually usable
This commit is contained in:
parent
44ab365d2c
commit
ad54cc0187
@ -65,6 +65,7 @@ target_link_libraries(plasma-shell
|
||||
KF5::XmlGui
|
||||
KF5::IconThemes
|
||||
KF5::Activities
|
||||
KF5::GlobalAccel
|
||||
)
|
||||
target_include_directories(plasma-shell PRIVATE "${CMAKE_BINARY_DIR}")
|
||||
|
||||
|
@ -93,10 +93,12 @@ void DesktopView::setDashboardShown(bool shown)
|
||||
if (shown) {
|
||||
if (m_stayBehind) {
|
||||
KWindowSystem::setType(winId(), NET::Normal);
|
||||
KWindowSystem::clearState(winId(), NET::SkipTaskbar|NET::KeepBelow);
|
||||
}
|
||||
raise();
|
||||
KWindowSystem::raiseWindow(winId());
|
||||
|
||||
KWindowSystem::forceActiveWindow(winId());
|
||||
|
||||
QObject *wpGraphicObject = containment()->property("wallpaperGraphicsObject").value<QObject *>();
|
||||
if (wpGraphicObject) {
|
||||
wpGraphicObject->setProperty("opacity", 0.3);
|
||||
@ -104,6 +106,7 @@ void DesktopView::setDashboardShown(bool shown)
|
||||
} else {
|
||||
if (m_stayBehind) {
|
||||
KWindowSystem::setType(winId(), NET::Desktop);
|
||||
KWindowSystem::setState(winId(), NET::SkipTaskbar|NET::SkipPager|NET::KeepBelow);
|
||||
}
|
||||
lower();
|
||||
KWindowSystem::lowerWindow(winId());
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <kactivities/consumer.h>
|
||||
#include <ksycoca.h>
|
||||
#include <kservicetypetrader.h>
|
||||
#include <KGlobalAccel>
|
||||
|
||||
|
||||
#include "activity.h"
|
||||
@ -140,12 +141,13 @@ ShellCorona::ShellCorona(QObject *parent)
|
||||
QObject::connect(dashboardAction, &QAction::triggered,
|
||||
this, &ShellCorona::setDashboardShown);
|
||||
dashboardAction->setText(i18n("Show Dashboard"));
|
||||
|
||||
dashboardAction->setAutoRepeat(true);
|
||||
dashboardAction->setCheckable(true);
|
||||
dashboardAction->setIcon(QIcon::fromTheme("dashboard-show"));
|
||||
dashboardAction->setData(Plasma::Types::ControlAction);
|
||||
dashboardAction->setShortcut(QKeySequence("ctrl+f12"));
|
||||
dashboardAction->setShortcutContext(Qt::ApplicationShortcut);
|
||||
KGlobalAccel::self()->setDefaultShortcut(dashboardAction, QList<QKeySequence>() << QKeySequence(Qt::Key_Control + Qt::Key_F12));
|
||||
KGlobalAccel::self()->setShortcut(dashboardAction, QList<QKeySequence>() << QKeySequence(Qt::Key_Control + Qt::Key_F12));
|
||||
|
||||
|
||||
checkAddPanelAction();
|
||||
|
Loading…
Reference in New Issue
Block a user