Skip to content

Commit

Permalink
Calendars plugin: add drop shadow for better readability
Browse files Browse the repository at this point in the history
  • Loading branch information
gzotti committed Dec 11, 2024
1 parent 7332318 commit ca38340
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions plugins/Calendars/src/gui/CalendarsInfoPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
#include <QPen>
#include <QPushButton>
#include <QWidget>
#include <QGraphicsDropShadowEffect>

CalendarsInfoPanel::CalendarsInfoPanel(Calendars* plugin,
QGraphicsWidget *parent):
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit ca38340

Please sign in to comment.