Skip to content

Commit

Permalink
Fixed|libgui: Don't assume there is a shared blur widget
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Sep 1, 2019
1 parent e65d95d commit ba4c746
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
13 changes: 10 additions & 3 deletions doomsday/libs/gui/src/widgets/dialogwidget.cpp
Expand Up @@ -445,9 +445,16 @@ DE_GUI_PIMPL(DialogWidget)
}
else if (style().isBlurringAllowed())
{
/// @todo Should use the Style for this.
bg.type = Background::SharedBlurWithBorderGlow;
bg.blur = style().sharedBlurWidget();
if (auto *blur = style().sharedBlurWidget())
{
bg.type = Background::SharedBlurWithBorderGlow;
bg.blur = blur;
}
else
{
bg.type = Background::BlurredWithBorderGlow;
bg.blur = nullptr;
}
bg.solidFill = Vec4f(0, 0, 0, .65f);
}
else
Expand Down
6 changes: 4 additions & 2 deletions doomsday/libs/gui/src/widgets/popupwidget.cpp
Expand Up @@ -205,8 +205,10 @@ DE_GUI_PIMPL(PopupWidget)
else
{
Background bg(st.colors().colorf("background"),
!opaqueBackground && st.isBlurringAllowed()?
Background::SharedBlurWithBorderGlow : Background::BorderGlow,
!opaqueBackground && st.isBlurringAllowed()
? (style().sharedBlurWidget() ? Background::SharedBlurWithBorderGlow
: Background::BlurredWithBorderGlow)
: Background::BorderGlow,
st.colors().colorf("glow"),
st.rules().rule("glow").valuei());
bg.blur = style().sharedBlurWidget();
Expand Down

0 comments on commit ba4c746

Please sign in to comment.