From ca38340d5839301880e3e8a3ea23176d19a8e9aa Mon Sep 17 00:00:00 2001 From: Georg Zotti Date: Wed, 11 Dec 2024 17:19:56 +0100 Subject: [PATCH] Calendars plugin: add drop shadow for better readability --- plugins/Calendars/src/gui/CalendarsInfoPanel.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/plugins/Calendars/src/gui/CalendarsInfoPanel.cpp b/plugins/Calendars/src/gui/CalendarsInfoPanel.cpp index f3b4a6e695234..ff67aeeca3957 100644 --- a/plugins/Calendars/src/gui/CalendarsInfoPanel.cpp +++ b/plugins/Calendars/src/gui/CalendarsInfoPanel.cpp @@ -32,6 +32,7 @@ Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. #include #include #include +#include CalendarsInfoPanel::CalendarsInfoPanel(Calendars* plugin, QGraphicsWidget *parent): @@ -87,6 +88,18 @@ CalendarsInfoPanel::CalendarsInfoPanel(Calendars* plugin, //Night mode connect(&stelApp, SIGNAL(colorSchemeChanged(const QString&)), this, SLOT(setColorScheme(const QString&))); setColorScheme(stelApp.getCurrentStelStyle()); + + QSettings* conf = StelApp::getInstance().getSettings(); + Q_ASSERT(conf); + if (conf->value("gui/flag_info_shadow", false).toBool()) + { + // Add a drop shadow for better visibility (not on the infopixmap, though) + QGraphicsDropShadowEffect *effect = new QGraphicsDropShadowEffect(this); + effect->setBlurRadius(6); + effect->setColor(QColor(0, 0, 0)); + effect->setOffset(0,0); + setGraphicsEffect(effect); + } } void CalendarsInfoPanel::updatePosition(bool resetPos)