From f43c6906ffe3c77091b5063379849f7c493932e3 Mon Sep 17 00:00:00 2001 From: Kacper Donat Date: Mon, 10 Nov 2025 16:28:13 +0100 Subject: [PATCH 1/2] Gui: Enable Overlay only for new users This change tries to detect invalid state where overlay was half-initialized that resulted in overlay being enabled for more users that we initially aimed for. --- src/Gui/OverlayWidgets.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/Gui/OverlayWidgets.cpp b/src/Gui/OverlayWidgets.cpp index 61b8f21df8..643076db79 100644 --- a/src/Gui/OverlayWidgets.cpp +++ b/src/Gui/OverlayWidgets.cpp @@ -755,10 +755,19 @@ void OverlayTabWidget::restore(ParameterGrp::handle handle) hGrp = handle; return; } - if (!parentWidget()) - return; - std::string widgets = handle->GetASCII("Widgets", getDockArea() == Qt::RightDockWidgetArea ? "Tasks," : ""); + if (!parentWidget()) { + return; + } + + const char* defaultWidgets = ""; + + // If overlay was ever used and disabled by the user it should respect that choice + if (handle->GetInt("Width", 0) == 0 || handle->GetInt("Height", 0) == 0) { + defaultWidgets = getDockArea() == Qt::RightDockWidgetArea ? "Tasks," : ""; + } + + std::string widgets = handle->GetASCII("Widgets", defaultWidgets); for(auto &name : QString::fromUtf8(widgets.c_str()).split(QLatin1Char(','))) { if(name.isEmpty()) From f7908335e5625f570d634f785d0bd881f138522a Mon Sep 17 00:00:00 2001 From: Kacper Donat Date: Mon, 10 Nov 2025 16:29:29 +0100 Subject: [PATCH 2/2] Gui: Make overlay dragger respect palette This changes Overlay Dragger to not have hardcoded color but instead respect the palette from theme. --- src/Gui/OverlayWidgets.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Gui/OverlayWidgets.cpp b/src/Gui/OverlayWidgets.cpp index 643076db79..3a4fac8723 100644 --- a/src/Gui/OverlayWidgets.cpp +++ b/src/Gui/OverlayWidgets.cpp @@ -2235,7 +2235,7 @@ void OverlaySizeGrip::paintEvent(QPaintEvent*) QPainter painter(this); painter.setPen(Qt::transparent); painter.setOpacity(0.5); - painter.setBrush(QBrush(Qt::black, Qt::Dense6Pattern)); + painter.setBrush(QBrush(palette().color(QPalette::Shadow), Qt::Dense6Pattern)); QRect rect(this->rect()); painter.drawRect(rect); }