diff options
Diffstat (limited to '')
| -rw-r--r-- | src/widgets/Decorations.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/widgets/Decorations.cpp b/src/widgets/Decorations.cpp index d559776..82c1a65 100644 --- a/src/widgets/Decorations.cpp +++ b/src/widgets/Decorations.cpp @@ -45,12 +45,16 @@ Decorations::Decorations(QWidget *content_widget, QWebEngineProfile *profile, QW } void Decorations::set_enabled(DecorationType type, bool enabled) { - std::optional<EdgeDecoration *> decoration = get_decoration_widget(type); - + auto decoration = get_decoration_widget(type); if (decoration.has_value()) decoration.value()->set_enabled(enabled); } +bool Decorations::get_enabled(DecorationType type) { + auto decoration = get_decoration_widget(type); + return decoration.has_value() && decoration.value()->is_enabled(); +} + std::optional<EdgeDecoration *> Decorations::get_decoration_widget(DecorationType type) { switch (type) { case DecorationType::DecorationTop: |
