Skip to content

Commit

Permalink
libappfw|Style: Don't require "Config.ui.translucency" to exist
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Sep 1, 2019
1 parent a72ac90 commit 0747500
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion doomsday/libs/appfw/src/style.cpp
Expand Up @@ -48,6 +48,8 @@ DE_PIMPL(Style)
: Base(i)
, rules(DENG2_BASE_GUI_APP->pixelRatio())
{
defaultTranslucency = new NumberValue(true);

// The Style is available as a native module.
App::scriptSystem().addNativeModule("Style", module);
pixelRatio.audienceForChange() += this;
Expand Down Expand Up @@ -243,7 +245,12 @@ Font const *Style::richStyleFont(Font::RichFormat::Style fontStyle) const

bool Style::isBlurringAllowed() const
{
return d->uiTranslucency.value().isTrue();
if (!d->uiTranslucency)
{
d->uiTranslucency = Config::get().has("ui.translucency") ? &Config::get("ui.translucency")
: &d->defaultTranslucency;
}
return d->uiTranslucency->value().isTrue();
}

GuiWidget *Style::sharedBlurWidget() const
Expand Down

0 comments on commit 0747500

Please sign in to comment.