Skip to content

Commit

Permalink
Restore opacity of GUI (fix Stellarium#3421)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-w committed Sep 25, 2023
1 parent f81894f commit d8d540f
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/gui/StelDialog.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,18 @@ class CustomProxy : public QGraphicsProxyWidget
bool event(QEvent* event) override
{
if (StelApp::getInstance().getSettings()->value("gui/flag_use_window_transparency", true).toBool())
widget()->setWindowOpacity(0.9);

{
switch (event->type())
{
case QEvent::WindowDeactivate:
widget()->setWindowOpacity(0.4);
break;
case QEvent::WindowActivate:
widget()->setWindowOpacity(0.9);
default:
break;
}
}
return QGraphicsProxyWidget::event(event);
}
void resizeEvent(QGraphicsSceneResizeEvent *event) override
Expand Down

0 comments on commit d8d540f

Please sign in to comment.