mirror of
https://github.com/KDE/latte-dock.git
synced 2025-01-09 17:18:11 +03:00
improve settings windows shown trigerring behavior
--when the user uses Meta+A to cycle between the Views configuration windows then in such case when NO Config window is shown the LAST ONE USED should be shown again. IF a Config View is already shown then the NEXT should be shown afterwards
This commit is contained in:
parent
804d3d4d73
commit
eb0c52c52b
@ -292,6 +292,16 @@ void CentralLayout::addView(Plasma::Containment *containment, bool forceOnPrimar
|
||||
}
|
||||
}
|
||||
|
||||
bool CentralLayout::configViewIsShown() const
|
||||
{
|
||||
bool genericShown = GenericLayout::configViewIsShown();
|
||||
if (m_sharedLayout) {
|
||||
return (m_sharedLayout->configViewIsShown() || genericShown);
|
||||
}
|
||||
|
||||
return genericShown;
|
||||
}
|
||||
|
||||
const QStringList CentralLayout::appliedActivities()
|
||||
{
|
||||
if (!m_corona) {
|
||||
|
@ -67,8 +67,6 @@ public:
|
||||
QStringList activities() const;
|
||||
void setActivities(QStringList activities);
|
||||
|
||||
Latte::View *lastSettingsView();
|
||||
|
||||
SharedLayout *sharedLayout() const;
|
||||
void setSharedLayout(SharedLayout *layout);
|
||||
|
||||
@ -76,6 +74,7 @@ public:
|
||||
void addView(Plasma::Containment *containment, bool forceOnPrimary = false, int explicitScreen = -1, Layout::ViewsMap *occupied = nullptr);
|
||||
void syncLatteViewsToScreens(Layout::ViewsMap *occupiedMap = nullptr) override;
|
||||
void unloadContainments() override;
|
||||
bool configViewIsShown() const override;
|
||||
const QStringList appliedActivities() override;
|
||||
Types::ViewType latteViewType(int containmentId) const override;
|
||||
QList<Latte::View *> latteViews() override;
|
||||
|
@ -139,6 +139,17 @@ void GenericLayout::setBlockAutomaticLatteViewCreation(bool block)
|
||||
m_blockAutomaticLatteViewCreation = block;
|
||||
}
|
||||
|
||||
bool GenericLayout::configViewIsShown() const
|
||||
{
|
||||
for (const auto view : m_latteViews) {
|
||||
if (view && view->settingsWindowIsShown()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool GenericLayout::isActive() const
|
||||
{
|
||||
if (!m_corona) {
|
||||
|
@ -76,6 +76,8 @@ public:
|
||||
bool isWritable() const;
|
||||
bool layoutIsBroken() const;
|
||||
|
||||
virtual bool configViewIsShown() const;
|
||||
|
||||
virtual int viewsCount(int screen) const;
|
||||
virtual int viewsCount(QScreen *screen) const;
|
||||
virtual int viewsCount() const;
|
||||
|
@ -732,7 +732,7 @@ void GlobalShortcuts::showSettings()
|
||||
}
|
||||
|
||||
if (openSettings >= 0 && sortedViews.count() > 1) {
|
||||
openSettings = openSettings + 1;
|
||||
openSettings = currentLayout->configViewIsShown() ? openSettings + 1 : openSettings;
|
||||
|
||||
if (openSettings >= sortedViews.size()) {
|
||||
openSettings = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user