Compare commits

...

5 Commits

Author SHA1 Message Date
Jacopo De Simoi fe5ae9c685 Add shortcut to hide panel 3 years ago
Fushan Wen 8a35e3418b
kcms/colors: update accent color reply type 4 years ago
Fushan Wen 2eb8978517 wallpapers/image: fix wrong usage of `std::bind` 4 years ago
Fushan Wen df793b9bbd Revert "Revert "Prevent panel going out of screen boundaries"" 4 years ago
l10n daemon script 8766314279 SVN_SILENT made messages (.desktop file) - always resolve ours 4 years ago
  1. 4
      kcms/colors/colors.cpp
  2. 4
      menu/desktop/kf5-utilities-accessibility.directory
  3. 3
      shell/panelview.cpp
  4. 30
      shell/shellcorona.cpp
  5. 1
      shell/shellcorona.h
  6. 14
      wallpapers/image/plugin/utils/maximizedwindowmonitor.cpp

@ -445,9 +445,9 @@ void KCMColors::applyWallpaperAccentColor()
void KCMColors::wallpaperAccentColorArrivedSlot(QDBusPendingCallWatcher *call)
{
QDBusPendingReply<QString> reply = *call;
QDBusPendingReply<uint> reply = *call;
if (!reply.isError()) {
setAccentColor(QColor(reply.value()));
setAccentColor(QColor::fromRgba(reply.value()));
}
call->deleteLater();
}

@ -44,7 +44,7 @@ Name[id]=Aksesibilitas
Name[is]=Auðveldað aðgengi
Name[it]=Accessibilità
Name[ja]=アクセシビリティ
Name[ka]=_დამხმარე საშუალებები
Name[ka]=წვდომადობა
Name[kk]=Арнайы мүмкіндіктер
Name[km]=មធយស
Name[kn]=ನಿಕಣ (ಆಕಿಿಿಿ)
@ -139,7 +139,7 @@ Comment[id]=Aksesibilitas
Comment[is]=Auðveldað aðgengi
Comment[it]=Accessibilità
Comment[ja]=アクセシビリティ
Comment[ka]=_დამხმარე საშუალებები
Comment[ka]=წვდომადობა
Comment[kk]=Арнайы мүмкіндіктер
Comment[km]=មធយស
Comment[kn]=ನಿಕಣ (ಆಕಿಿಿಿ)

@ -859,6 +859,9 @@ void PanelView::moveEvent(QMoveEvent *ev)
updateEnabledBorders();
m_strutsTimer.start(STRUTSTIMERDELAY);
PlasmaQuick::ContainmentView::moveEvent(ev);
if (m_screenToFollow && !m_screenToFollow->geometry().contains(geometry())) {
positionPanel();
}
}
void PanelView::keyPressEvent(QKeyEvent *event)

@ -165,6 +165,8 @@ void ShellCorona::init()
connect(this, &ShellCorona::containmentAdded, this, &ShellCorona::handleContainmentAdded);
QAction *dashboardAction = actions()->addAction(QStringLiteral("show dashboard"));
QObject::connect(dashboardAction, &QAction::triggered, this, &ShellCorona::setDashboardShown);
dashboardAction->setText(i18n("Show Desktop"));
@ -179,6 +181,21 @@ void ShellCorona::init()
dashboardAction->setData(Plasma::Types::ControlAction);
KGlobalAccel::self()->setGlobalShortcut(dashboardAction, Qt::CTRL | Qt::Key_F12);
QAction *panelAction = actions()->addAction(QStringLiteral("show panel"));
QObject::connect(panelAction, &QAction::triggered,
this, &ShellCorona::togglePanelVisibility);
panelAction->setText(i18n("Toggle Panel"));
// connect(KWindowSystem::self(), &KWindowSystem::showingDesktopChanged, [panelAction](bool showing) {
// panelAction->setText(showing ? i18n("Hide Desktop") : i18n("Show Desktop"));
// panelAction->setChecked(showing);
// });
// panelAction->setAutoRepeat(true);
// panelAction->setCheckable(true);
// panelAction->setIcon(QIcon::fromTheme(QStringLiteral("panel-show")));
// panelAction->setData(Plasma::Types::ControlAction);
KGlobalAccel::self()->setGlobalShortcut(panelAction, Qt::CTRL + Qt::Key_F11);
checkAddPanelAction();
connect(KSycoca::self(), &KSycoca::databaseChanged, this, &ShellCorona::checkAddPanelAction);
@ -1220,7 +1237,17 @@ QList<PanelView *> ShellCorona::panelsForScreen(QScreen *screen) const
return ret;
}
DesktopView *ShellCorona::desktopForScreen(QScreen *screen) const
void ShellCorona::togglePanelVisibility()
{
for (auto it = m_panelViews.constBegin(), end = m_panelViews.constEnd(); it != end; ++it) {
if (it.value()->screen() != qGuiApp->primaryScreen()) {
continue;
}
it.value()->setVisible(!it.value()->isVisible());
}
}
DesktopView *ShellCorona::desktopForScreen(QScreen* screen) const
{
DesktopView *view = m_desktopViewForScreen.value(screen);
//An output may have been renamed, fall back to a linear check
@ -2431,5 +2458,4 @@ void ShellCorona::refreshCurrentShell()
// Desktop corona handler
#include "moc_shellcorona.cpp"
#include "shellcorona.moc"

@ -224,6 +224,7 @@ protected Q_SLOTS:
void showAlternativesForApplet(Plasma::Applet *applet);
void togglePanelVisibility();
private Q_SLOTS:
void createWaitingPanels();
void handleContainmentAdded(Plasma::Containment *c);

@ -50,16 +50,14 @@ void MaximizedWindowMonitor::Private::init()
q->setGroupMode(GroupMode::GroupDisabled);
q->setActivity(m_activityInfo->currentActivity());
q->connect(m_activityInfo,
&TaskManager::ActivityInfo::currentActivityChanged,
q,
std::bind(&MaximizedWindowMonitor::setActivity, q, m_activityInfo->currentActivity()));
q->connect(m_activityInfo, &TaskManager::ActivityInfo::currentActivityChanged, q, [this] {
q->setActivity(m_activityInfo->currentActivity());
});
q->setVirtualDesktop(m_virtualDesktopInfo->currentDesktop());
q->connect(m_virtualDesktopInfo,
&TaskManager::VirtualDesktopInfo::currentDesktopChanged,
q,
std::bind(&MaximizedWindowMonitor::setVirtualDesktop, q, m_virtualDesktopInfo->currentDesktop()));
q->connect(m_virtualDesktopInfo, &TaskManager::VirtualDesktopInfo::currentDesktopChanged, q, [this]() {
q->setVirtualDesktop(m_virtualDesktopInfo->currentDesktop());
});
q->setFilterByActivity(true);
q->setFilterByVirtualDesktop(true);

Loading…
Cancel
Save