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. 28
      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) void KCMColors::wallpaperAccentColorArrivedSlot(QDBusPendingCallWatcher *call)
{ {
QDBusPendingReply<QString> reply = *call; QDBusPendingReply<uint> reply = *call;
if (!reply.isError()) { if (!reply.isError()) {
setAccentColor(QColor(reply.value())); setAccentColor(QColor::fromRgba(reply.value()));
} }
call->deleteLater(); call->deleteLater();
} }

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

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

@ -165,6 +165,8 @@ void ShellCorona::init()
connect(this, &ShellCorona::containmentAdded, this, &ShellCorona::handleContainmentAdded); connect(this, &ShellCorona::containmentAdded, this, &ShellCorona::handleContainmentAdded);
QAction *dashboardAction = actions()->addAction(QStringLiteral("show dashboard")); QAction *dashboardAction = actions()->addAction(QStringLiteral("show dashboard"));
QObject::connect(dashboardAction, &QAction::triggered, this, &ShellCorona::setDashboardShown); QObject::connect(dashboardAction, &QAction::triggered, this, &ShellCorona::setDashboardShown);
dashboardAction->setText(i18n("Show Desktop")); dashboardAction->setText(i18n("Show Desktop"));
@ -179,6 +181,21 @@ void ShellCorona::init()
dashboardAction->setData(Plasma::Types::ControlAction); dashboardAction->setData(Plasma::Types::ControlAction);
KGlobalAccel::self()->setGlobalShortcut(dashboardAction, Qt::CTRL | Qt::Key_F12); 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(); checkAddPanelAction();
connect(KSycoca::self(), &KSycoca::databaseChanged, this, &ShellCorona::checkAddPanelAction); connect(KSycoca::self(), &KSycoca::databaseChanged, this, &ShellCorona::checkAddPanelAction);
@ -1220,6 +1237,16 @@ QList<PanelView *> ShellCorona::panelsForScreen(QScreen *screen) const
return ret; return ret;
} }
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 *ShellCorona::desktopForScreen(QScreen* screen) const
{ {
DesktopView *view = m_desktopViewForScreen.value(screen); DesktopView *view = m_desktopViewForScreen.value(screen);
@ -2431,5 +2458,4 @@ void ShellCorona::refreshCurrentShell()
// Desktop corona handler // Desktop corona handler
#include "moc_shellcorona.cpp"
#include "shellcorona.moc" #include "shellcorona.moc"

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

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

Loading…
Cancel
Save