diff --git a/docs/_static/images/snapcast.png b/docs/_static/images/snapcast.png deleted file mode 100644 index 83235d78..00000000 Binary files a/docs/_static/images/snapcast.png and /dev/null differ diff --git a/qtile_extras/widget/snapcast.py b/qtile_extras/widget/snapcast.py index d0b3db01..8c9a53b8 100644 --- a/qtile_extras/widget/snapcast.py +++ b/qtile_extras/widget/snapcast.py @@ -66,8 +66,6 @@ class SnapCast(base._Widget): ), ] - _screenshots = [("snapcast.png", "Snapclient active running in background")] - _dependencies = ["requests"] def __init__(self, **config): @@ -188,7 +186,7 @@ def draw(self): self.drawer.clear(self.background or self.bar.background) offsety = (self.bar.height - self.img.height) // 2 - self.img.draw(colour=self.status_colour, y=offsety) + self.img.draw(colour=self.status_colour, x=self.padding, y=offsety) self.drawer.draw(offsetx=self.offsetx, offsety=self.offsety, width=self.length) def finalize(self): diff --git a/test/widget/docs_screenshots/ss_snapcast.py b/test/widget/docs_screenshots/ss_snapcast.py new file mode 100644 index 00000000..d9f0c9de --- /dev/null +++ b/test/widget/docs_screenshots/ss_snapcast.py @@ -0,0 +1,31 @@ +# Copyright (c) 2024 elParaguayo +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +import pytest + +from qtile_extras.widget.snapcast import SnapCast + + +@pytest.fixture +def widget(): + yield SnapCast + + +def ss_snapcast(screenshot_manager): + screenshot_manager.take_screenshot()