From 53462d1f0b3e4d97e4ac70bf6700cc102bec212e Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Thu, 27 Jun 2019 20:21:53 +0200 Subject: [PATCH] [core/theme] Add a way to exclude themeing for widget Allow a widget to set "theme.exclude" to extend any part of a theme (e.g. the suffix). Note that this can later, on demand, be extended to allow a list of elements to be passed in. see #401 --- bumblebee/theme.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bumblebee/theme.py b/bumblebee/theme.py index e57d58d..946da59 100644 --- a/bumblebee/theme.py +++ b/bumblebee/theme.py @@ -223,6 +223,9 @@ class Theme(object): if not self._widget: self._widget = widget + if self._widget.get("theme.exclude", "") == name: + return None + if self._widget != widget: self._prevbg = self.bg(self._widget) self._widget = widget