Add transparent overlay window (#4746)
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include "widgets/FramelessEmbedWindow.hpp"
|
||||
#include "widgets/helper/NotebookTab.hpp"
|
||||
#include "widgets/Notebook.hpp"
|
||||
#include "widgets/OverlayWindow.hpp"
|
||||
#include "widgets/splits/Split.hpp"
|
||||
#include "widgets/splits/SplitContainer.hpp"
|
||||
#include "widgets/Window.hpp"
|
||||
@@ -544,6 +545,37 @@ void WindowManager::queueSave()
|
||||
this->saveTimer->start(10s);
|
||||
}
|
||||
|
||||
void WindowManager::toggleAllOverlayInertia()
|
||||
{
|
||||
// check if any window is not inert
|
||||
bool anyNonInert = false;
|
||||
for (auto *window : this->windows_)
|
||||
{
|
||||
if (anyNonInert)
|
||||
{
|
||||
break;
|
||||
}
|
||||
window->getNotebook().forEachSplit([&](auto *split) {
|
||||
auto *overlay = split->overlayWindow();
|
||||
if (overlay)
|
||||
{
|
||||
anyNonInert = anyNonInert || !overlay->isInert();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
for (auto *window : this->windows_)
|
||||
{
|
||||
window->getNotebook().forEachSplit([&](auto *split) {
|
||||
auto *overlay = split->overlayWindow();
|
||||
if (overlay)
|
||||
{
|
||||
overlay->setInert(anyNonInert);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void WindowManager::encodeTab(SplitContainer *tab, bool isSelected,
|
||||
QJsonObject &obj)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user